diff options
Diffstat (limited to 'drivers/char/drm/sis_mm.c')
-rw-r--r-- | drivers/char/drm/sis_mm.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/char/drm/sis_mm.c b/drivers/char/drm/sis_mm.c index a8529728fa63..6774d2fe3452 100644 --- a/drivers/char/drm/sis_mm.c +++ b/drivers/char/drm/sis_mm.c | |||
@@ -86,7 +86,7 @@ static int sis_fb_alloc(DRM_IOCTL_ARGS) | |||
86 | { | 86 | { |
87 | drm_sis_mem_t fb; | 87 | drm_sis_mem_t fb; |
88 | struct sis_memreq req; | 88 | struct sis_memreq req; |
89 | drm_sis_mem_t __user *argp = (void __user *)data; | 89 | drm_sis_mem_t __user *argp = (drm_sis_mem_t __user *)data; |
90 | int retval = 0; | 90 | int retval = 0; |
91 | 91 | ||
92 | DRM_COPY_FROM_USER_IOCTL(fb, argp, sizeof(fb)); | 92 | DRM_COPY_FROM_USER_IOCTL(fb, argp, sizeof(fb)); |
@@ -110,7 +110,7 @@ static int sis_fb_alloc(DRM_IOCTL_ARGS) | |||
110 | 110 | ||
111 | DRM_COPY_TO_USER_IOCTL(argp, fb, sizeof(fb)); | 111 | DRM_COPY_TO_USER_IOCTL(argp, fb, sizeof(fb)); |
112 | 112 | ||
113 | DRM_DEBUG("alloc fb, size = %d, offset = %d\n", fb.size, req.offset); | 113 | DRM_DEBUG("alloc fb, size = %d, offset = %ld\n", fb.size, req.offset); |
114 | 114 | ||
115 | return retval; | 115 | return retval; |
116 | } | 116 | } |
@@ -127,9 +127,9 @@ static int sis_fb_free(DRM_IOCTL_ARGS) | |||
127 | 127 | ||
128 | if (!del_alloc_set(fb.context, VIDEO_TYPE, fb.free)) | 128 | if (!del_alloc_set(fb.context, VIDEO_TYPE, fb.free)) |
129 | retval = DRM_ERR(EINVAL); | 129 | retval = DRM_ERR(EINVAL); |
130 | sis_free((u32) fb.free); | 130 | sis_free(fb.free); |
131 | 131 | ||
132 | DRM_DEBUG("free fb, offset = %lu\n", fb.free); | 132 | DRM_DEBUG("free fb, offset = 0x%lx\n", fb.free); |
133 | 133 | ||
134 | return retval; | 134 | return retval; |
135 | } | 135 | } |
@@ -176,7 +176,7 @@ static int sis_fb_alloc(DRM_IOCTL_ARGS) | |||
176 | { | 176 | { |
177 | DRM_DEVICE; | 177 | DRM_DEVICE; |
178 | drm_sis_private_t *dev_priv = dev->dev_private; | 178 | drm_sis_private_t *dev_priv = dev->dev_private; |
179 | drm_sis_mem_t __user *argp = (void __user *)data; | 179 | drm_sis_mem_t __user *argp = (drm_sis_mem_t __user *)data; |
180 | drm_sis_mem_t fb; | 180 | drm_sis_mem_t fb; |
181 | PMemBlock block; | 181 | PMemBlock block; |
182 | int retval = 0; | 182 | int retval = 0; |
@@ -267,7 +267,7 @@ static int sis_ioctl_agp_alloc(DRM_IOCTL_ARGS) | |||
267 | { | 267 | { |
268 | DRM_DEVICE; | 268 | DRM_DEVICE; |
269 | drm_sis_private_t *dev_priv = dev->dev_private; | 269 | drm_sis_private_t *dev_priv = dev->dev_private; |
270 | drm_sis_mem_t __user *argp = (void __user *)data; | 270 | drm_sis_mem_t __user *argp = (drm_sis_mem_t __user *)data; |
271 | drm_sis_mem_t agp; | 271 | drm_sis_mem_t agp; |
272 | PMemBlock block; | 272 | PMemBlock block; |
273 | int retval = 0; | 273 | int retval = 0; |
@@ -367,7 +367,7 @@ int sis_final_context(struct drm_device *dev, int context) | |||
367 | 367 | ||
368 | if (i < MAX_CONTEXT) { | 368 | if (i < MAX_CONTEXT) { |
369 | set_t *set; | 369 | set_t *set; |
370 | unsigned int item; | 370 | ITEM_TYPE item; |
371 | int retval; | 371 | int retval; |
372 | 372 | ||
373 | DRM_DEBUG("find socket %d, context = %d\n", i, context); | 373 | DRM_DEBUG("find socket %d, context = %d\n", i, context); |
@@ -376,7 +376,7 @@ int sis_final_context(struct drm_device *dev, int context) | |||
376 | set = global_ppriv[i].sets[0]; | 376 | set = global_ppriv[i].sets[0]; |
377 | retval = setFirst(set, &item); | 377 | retval = setFirst(set, &item); |
378 | while (retval) { | 378 | while (retval) { |
379 | DRM_DEBUG("free video memory 0x%x\n", item); | 379 | DRM_DEBUG("free video memory 0x%lx\n", item); |
380 | #if defined(__linux__) && defined(CONFIG_FB_SIS) | 380 | #if defined(__linux__) && defined(CONFIG_FB_SIS) |
381 | sis_free(item); | 381 | sis_free(item); |
382 | #else | 382 | #else |
@@ -390,7 +390,7 @@ int sis_final_context(struct drm_device *dev, int context) | |||
390 | set = global_ppriv[i].sets[1]; | 390 | set = global_ppriv[i].sets[1]; |
391 | retval = setFirst(set, &item); | 391 | retval = setFirst(set, &item); |
392 | while (retval) { | 392 | while (retval) { |
393 | DRM_DEBUG("free agp memory 0x%x\n", item); | 393 | DRM_DEBUG("free agp memory 0x%lx\n", item); |
394 | mmFreeMem((PMemBlock) item); | 394 | mmFreeMem((PMemBlock) item); |
395 | retval = setNext(set, &item); | 395 | retval = setNext(set, &item); |
396 | } | 396 | } |
@@ -403,12 +403,12 @@ int sis_final_context(struct drm_device *dev, int context) | |||
403 | } | 403 | } |
404 | 404 | ||
405 | drm_ioctl_desc_t sis_ioctls[] = { | 405 | drm_ioctl_desc_t sis_ioctls[] = { |
406 | [DRM_IOCTL_NR(DRM_SIS_FB_ALLOC)] = {sis_fb_alloc, 1, 0}, | 406 | [DRM_IOCTL_NR(DRM_SIS_FB_ALLOC)] = {sis_fb_alloc, DRM_AUTH}, |
407 | [DRM_IOCTL_NR(DRM_SIS_FB_FREE)] = {sis_fb_free, 1, 0}, | 407 | [DRM_IOCTL_NR(DRM_SIS_FB_FREE)] = {sis_fb_free, DRM_AUTH}, |
408 | [DRM_IOCTL_NR(DRM_SIS_AGP_INIT)] = {sis_ioctl_agp_init, 1, 1}, | 408 | [DRM_IOCTL_NR(DRM_SIS_AGP_INIT)] = {sis_ioctl_agp_init, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY}, |
409 | [DRM_IOCTL_NR(DRM_SIS_AGP_ALLOC)] = {sis_ioctl_agp_alloc, 1, 0}, | 409 | [DRM_IOCTL_NR(DRM_SIS_AGP_ALLOC)] = {sis_ioctl_agp_alloc, DRM_AUTH}, |
410 | [DRM_IOCTL_NR(DRM_SIS_AGP_FREE)] = {sis_ioctl_agp_free, 1, 0}, | 410 | [DRM_IOCTL_NR(DRM_SIS_AGP_FREE)] = {sis_ioctl_agp_free, DRM_AUTH}, |
411 | [DRM_IOCTL_NR(DRM_SIS_FB_INIT)] = {sis_fb_init, 1, 1} | 411 | [DRM_IOCTL_NR(DRM_SIS_FB_INIT)] = {sis_fb_init, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY} |
412 | }; | 412 | }; |
413 | 413 | ||
414 | int sis_max_ioctl = DRM_ARRAY_SIZE(sis_ioctls); | 414 | int sis_max_ioctl = DRM_ARRAY_SIZE(sis_ioctls); |