diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2005-11-12 05:52:46 -0500 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2005-11-12 05:52:46 -0500 |
commit | 925142431bd653175b80ae153bd7a8bc13628bde (patch) | |
tree | 594c1e65d3bf25b10961ea2b97dee5704b4f6cb5 /drivers/char/drm/via_mm.c | |
parent | 792d2b9a12594522111fbe2a7f17460a4d7edff7 (diff) |
drm: update VIA driver to 2.7.2
Add PCI DMA blitengine to VIA DRM
Add portability code for porting VIA to FreeBSD.
Sync via_drm.h with 3d driver
From: Thomas Hellstrom <unichrome@shipmail.org>, Eric Anholt <anholt@freebsd.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/via_mm.c')
-rw-r--r-- | drivers/char/drm/via_mm.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/char/drm/via_mm.c b/drivers/char/drm/via_mm.c index 3baddacdff26..62e692556a1d 100644 --- a/drivers/char/drm/via_mm.c +++ b/drivers/char/drm/via_mm.c | |||
@@ -199,13 +199,13 @@ int via_mem_alloc(DRM_IOCTL_ARGS) | |||
199 | sizeof(mem)); | 199 | sizeof(mem)); |
200 | 200 | ||
201 | switch (mem.type) { | 201 | switch (mem.type) { |
202 | case VIDEO: | 202 | case VIA_MEM_VIDEO: |
203 | if (via_fb_alloc(&mem) < 0) | 203 | if (via_fb_alloc(&mem) < 0) |
204 | return -EFAULT; | 204 | return -EFAULT; |
205 | DRM_COPY_TO_USER_IOCTL((drm_via_mem_t __user *) data, mem, | 205 | DRM_COPY_TO_USER_IOCTL((drm_via_mem_t __user *) data, mem, |
206 | sizeof(mem)); | 206 | sizeof(mem)); |
207 | return 0; | 207 | return 0; |
208 | case AGP: | 208 | case VIA_MEM_AGP: |
209 | if (via_agp_alloc(&mem) < 0) | 209 | if (via_agp_alloc(&mem) < 0) |
210 | return -EFAULT; | 210 | return -EFAULT; |
211 | DRM_COPY_TO_USER_IOCTL((drm_via_mem_t __user *) data, mem, | 211 | DRM_COPY_TO_USER_IOCTL((drm_via_mem_t __user *) data, mem, |
@@ -232,7 +232,7 @@ static int via_fb_alloc(drm_via_mem_t * mem) | |||
232 | if (block) { | 232 | if (block) { |
233 | fb.offset = block->ofs; | 233 | fb.offset = block->ofs; |
234 | fb.free = (unsigned long)block; | 234 | fb.free = (unsigned long)block; |
235 | if (!add_alloc_set(fb.context, VIDEO, fb.free)) { | 235 | if (!add_alloc_set(fb.context, VIA_MEM_VIDEO, fb.free)) { |
236 | DRM_DEBUG("adding to allocation set fails\n"); | 236 | DRM_DEBUG("adding to allocation set fails\n"); |
237 | via_mmFreeMem((PMemBlock) fb.free); | 237 | via_mmFreeMem((PMemBlock) fb.free); |
238 | retval = -1; | 238 | retval = -1; |
@@ -269,7 +269,7 @@ static int via_agp_alloc(drm_via_mem_t * mem) | |||
269 | if (block) { | 269 | if (block) { |
270 | agp.offset = block->ofs; | 270 | agp.offset = block->ofs; |
271 | agp.free = (unsigned long)block; | 271 | agp.free = (unsigned long)block; |
272 | if (!add_alloc_set(agp.context, AGP, agp.free)) { | 272 | if (!add_alloc_set(agp.context, VIA_MEM_AGP, agp.free)) { |
273 | DRM_DEBUG("adding to allocation set fails\n"); | 273 | DRM_DEBUG("adding to allocation set fails\n"); |
274 | via_mmFreeMem((PMemBlock) agp.free); | 274 | via_mmFreeMem((PMemBlock) agp.free); |
275 | retval = -1; | 275 | retval = -1; |
@@ -297,11 +297,11 @@ int via_mem_free(DRM_IOCTL_ARGS) | |||
297 | 297 | ||
298 | switch (mem.type) { | 298 | switch (mem.type) { |
299 | 299 | ||
300 | case VIDEO: | 300 | case VIA_MEM_VIDEO: |
301 | if (via_fb_free(&mem) == 0) | 301 | if (via_fb_free(&mem) == 0) |
302 | return 0; | 302 | return 0; |
303 | break; | 303 | break; |
304 | case AGP: | 304 | case VIA_MEM_AGP: |
305 | if (via_agp_free(&mem) == 0) | 305 | if (via_agp_free(&mem) == 0) |
306 | return 0; | 306 | return 0; |
307 | break; | 307 | break; |
@@ -329,7 +329,7 @@ static int via_fb_free(drm_via_mem_t * mem) | |||
329 | 329 | ||
330 | via_mmFreeMem((PMemBlock) fb.free); | 330 | via_mmFreeMem((PMemBlock) fb.free); |
331 | 331 | ||
332 | if (!del_alloc_set(fb.context, VIDEO, fb.free)) { | 332 | if (!del_alloc_set(fb.context, VIA_MEM_VIDEO, fb.free)) { |
333 | retval = -1; | 333 | retval = -1; |
334 | } | 334 | } |
335 | 335 | ||
@@ -352,7 +352,7 @@ static int via_agp_free(drm_via_mem_t * mem) | |||
352 | 352 | ||
353 | via_mmFreeMem((PMemBlock) agp.free); | 353 | via_mmFreeMem((PMemBlock) agp.free); |
354 | 354 | ||
355 | if (!del_alloc_set(agp.context, AGP, agp.free)) { | 355 | if (!del_alloc_set(agp.context, VIA_MEM_AGP, agp.free)) { |
356 | retval = -1; | 356 | retval = -1; |
357 | } | 357 | } |
358 | 358 | ||