aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPekka Paalanen <pq@iki.fi>2009-08-23 05:40:55 -0400
committerDave Airlie <airlied@redhat.com>2009-08-26 21:21:08 -0400
commita1a2d1d32250f6fcc317419e9dfb4a5a6946d2e6 (patch)
tree3ef2ff19e439764d73c78ed77f15cce554920a5f /drivers
parent3f7dc91adef90a20f806282724c40d68d5b020aa (diff)
drm: GEM handles are u32, not int
Several functions in the GEM kernel API used int as handle type, but user API has it __u32 which is also the intended type. Replace int with u32. Signed-off-by: Pekka Paalanen <pq@iki.fi> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/drm_gem.c11
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c3
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index ffe8f4394d50..230c9ffdd5e9 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -164,7 +164,7 @@ EXPORT_SYMBOL(drm_gem_object_alloc);
164 * Removes the mapping from handle to filp for this object. 164 * Removes the mapping from handle to filp for this object.
165 */ 165 */
166static int 166static int
167drm_gem_handle_delete(struct drm_file *filp, int handle) 167drm_gem_handle_delete(struct drm_file *filp, u32 handle)
168{ 168{
169 struct drm_device *dev; 169 struct drm_device *dev;
170 struct drm_gem_object *obj; 170 struct drm_gem_object *obj;
@@ -207,7 +207,7 @@ drm_gem_handle_delete(struct drm_file *filp, int handle)
207int 207int
208drm_gem_handle_create(struct drm_file *file_priv, 208drm_gem_handle_create(struct drm_file *file_priv,
209 struct drm_gem_object *obj, 209 struct drm_gem_object *obj,
210 int *handlep) 210 u32 *handlep)
211{ 211{
212 int ret; 212 int ret;
213 213
@@ -221,7 +221,7 @@ again:
221 221
222 /* do the allocation under our spinlock */ 222 /* do the allocation under our spinlock */
223 spin_lock(&file_priv->table_lock); 223 spin_lock(&file_priv->table_lock);
224 ret = idr_get_new_above(&file_priv->object_idr, obj, 1, handlep); 224 ret = idr_get_new_above(&file_priv->object_idr, obj, 1, (int *)handlep);
225 spin_unlock(&file_priv->table_lock); 225 spin_unlock(&file_priv->table_lock);
226 if (ret == -EAGAIN) 226 if (ret == -EAGAIN)
227 goto again; 227 goto again;
@@ -237,7 +237,7 @@ EXPORT_SYMBOL(drm_gem_handle_create);
237/** Returns a reference to the object named by the handle. */ 237/** Returns a reference to the object named by the handle. */
238struct drm_gem_object * 238struct drm_gem_object *
239drm_gem_object_lookup(struct drm_device *dev, struct drm_file *filp, 239drm_gem_object_lookup(struct drm_device *dev, struct drm_file *filp,
240 int handle) 240 u32 handle)
241{ 241{
242 struct drm_gem_object *obj; 242 struct drm_gem_object *obj;
243 243
@@ -344,7 +344,7 @@ drm_gem_open_ioctl(struct drm_device *dev, void *data,
344 struct drm_gem_open *args = data; 344 struct drm_gem_open *args = data;
345 struct drm_gem_object *obj; 345 struct drm_gem_object *obj;
346 int ret; 346 int ret;
347 int handle; 347 u32 handle;
348 348
349 if (!(dev->driver->driver_features & DRIVER_GEM)) 349 if (!(dev->driver->driver_features & DRIVER_GEM))
350 return -ENODEV; 350 return -ENODEV;
@@ -539,7 +539,6 @@ int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma)
539 vma->vm_flags |= VM_RESERVED | VM_IO | VM_PFNMAP | VM_DONTEXPAND; 539 vma->vm_flags |= VM_RESERVED | VM_IO | VM_PFNMAP | VM_DONTEXPAND;
540 vma->vm_ops = obj->dev->driver->gem_vm_ops; 540 vma->vm_ops = obj->dev->driver->gem_vm_ops;
541 vma->vm_private_data = map->handle; 541 vma->vm_private_data = map->handle;
542 /* FIXME: use pgprot_writecombine when available */
543 vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); 542 vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
544 543
545 /* Take a ref for this mapping of the object, so that the fault 544 /* Take a ref for this mapping of the object, so that the fault
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 140bee142fc2..0e6c9cca897c 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -111,7 +111,8 @@ i915_gem_create_ioctl(struct drm_device *dev, void *data,
111{ 111{
112 struct drm_i915_gem_create *args = data; 112 struct drm_i915_gem_create *args = data;
113 struct drm_gem_object *obj; 113 struct drm_gem_object *obj;
114 int handle, ret; 114 int ret;
115 u32 handle;
115 116
116 args->size = roundup(args->size, PAGE_SIZE); 117 args->size = roundup(args->size, PAGE_SIZE);
117 118