diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2010-10-20 15:50:24 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-12-03 00:11:07 -0500 |
commit | 382d62e524db528cdf53563ad9a018adc170dfde (patch) | |
tree | 84a7268a64ce58a4dfe533b4e3a5cef79b883053 /drivers/gpu/drm/nouveau/nouveau_bo.c | |
parent | 5f80198e43cf96542923269ccb607052e5f144cc (diff) |
drm/nouveau: fix annoying nouveau_fence type issue
nouveau_fence_* functions are not type safe, which could lead to bugs.
Additionally every use of nouveau_fence_unref had to cast struct
nouveau_fence to void **.
Fix it by renaming old functions and creating static inline functions with
new prototypes. We still need old functions, because we pass function
pointers to ttm.
As we are wrapping functions, drop unused "void *arg" parameter where possible.
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bo.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 8442bfbf5d42..c09928322eb9 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c | |||
@@ -487,7 +487,7 @@ nouveau_bo_move_accel_cleanup(struct nouveau_channel *chan, | |||
487 | 487 | ||
488 | ret = ttm_bo_move_accel_cleanup(&nvbo->bo, fence, NULL, evict, | 488 | ret = ttm_bo_move_accel_cleanup(&nvbo->bo, fence, NULL, evict, |
489 | no_wait_reserve, no_wait_gpu, new_mem); | 489 | no_wait_reserve, no_wait_gpu, new_mem); |
490 | nouveau_fence_unref((void *)&fence); | 490 | nouveau_fence_unref(&fence); |
491 | return ret; | 491 | return ret; |
492 | } | 492 | } |
493 | 493 | ||
@@ -949,11 +949,11 @@ struct ttm_bo_driver nouveau_bo_driver = { | |||
949 | .evict_flags = nouveau_bo_evict_flags, | 949 | .evict_flags = nouveau_bo_evict_flags, |
950 | .move = nouveau_bo_move, | 950 | .move = nouveau_bo_move, |
951 | .verify_access = nouveau_bo_verify_access, | 951 | .verify_access = nouveau_bo_verify_access, |
952 | .sync_obj_signaled = nouveau_fence_signalled, | 952 | .sync_obj_signaled = __nouveau_fence_signalled, |
953 | .sync_obj_wait = nouveau_fence_wait, | 953 | .sync_obj_wait = __nouveau_fence_wait, |
954 | .sync_obj_flush = nouveau_fence_flush, | 954 | .sync_obj_flush = __nouveau_fence_flush, |
955 | .sync_obj_unref = nouveau_fence_unref, | 955 | .sync_obj_unref = __nouveau_fence_unref, |
956 | .sync_obj_ref = nouveau_fence_ref, | 956 | .sync_obj_ref = __nouveau_fence_ref, |
957 | .fault_reserve_notify = &nouveau_ttm_fault_reserve_notify, | 957 | .fault_reserve_notify = &nouveau_ttm_fault_reserve_notify, |
958 | .io_mem_reserve = &nouveau_ttm_io_mem_reserve, | 958 | .io_mem_reserve = &nouveau_ttm_io_mem_reserve, |
959 | .io_mem_free = &nouveau_ttm_io_mem_free, | 959 | .io_mem_free = &nouveau_ttm_io_mem_free, |