diff options
author | Maarten Lankhorst <maarten.lankhorst@canonical.com> | 2012-10-12 11:02:19 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-11-20 01:09:55 -0500 |
commit | 5fb4ef0e36b4c6ecc7fb025aaacb3b63b1114e87 (patch) | |
tree | 425e7b5c48bbe54769925ad5c48cf3d9de74e088 /drivers/gpu/drm/ttm/ttm_bo.c | |
parent | be013367fd6fbab52ddf6f76c243f4109090c890 (diff) |
drm/ttm: remove sync_obj_arg member
vmwgfx was its only user and always sets it to the same..
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-By: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_bo.c')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 4066e788cff8..4cb3f493da76 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c | |||
@@ -501,7 +501,6 @@ static void ttm_bo_cleanup_refs_or_queue(struct ttm_buffer_object *bo) | |||
501 | struct ttm_bo_global *glob = bo->glob; | 501 | struct ttm_bo_global *glob = bo->glob; |
502 | struct ttm_bo_driver *driver; | 502 | struct ttm_bo_driver *driver; |
503 | void *sync_obj = NULL; | 503 | void *sync_obj = NULL; |
504 | void *sync_obj_arg; | ||
505 | int put_count; | 504 | int put_count; |
506 | int ret; | 505 | int ret; |
507 | 506 | ||
@@ -537,7 +536,6 @@ queue: | |||
537 | driver = bdev->driver; | 536 | driver = bdev->driver; |
538 | if (bo->sync_obj) | 537 | if (bo->sync_obj) |
539 | sync_obj = driver->sync_obj_ref(bo->sync_obj); | 538 | sync_obj = driver->sync_obj_ref(bo->sync_obj); |
540 | sync_obj_arg = bo->sync_obj_arg; | ||
541 | 539 | ||
542 | kref_get(&bo->list_kref); | 540 | kref_get(&bo->list_kref); |
543 | list_add_tail(&bo->ddestroy, &bdev->ddestroy); | 541 | list_add_tail(&bo->ddestroy, &bdev->ddestroy); |
@@ -545,7 +543,7 @@ queue: | |||
545 | spin_unlock(&bdev->fence_lock); | 543 | spin_unlock(&bdev->fence_lock); |
546 | 544 | ||
547 | if (sync_obj) { | 545 | if (sync_obj) { |
548 | driver->sync_obj_flush(sync_obj, sync_obj_arg); | 546 | driver->sync_obj_flush(sync_obj, NULL); |
549 | driver->sync_obj_unref(&sync_obj); | 547 | driver->sync_obj_unref(&sync_obj); |
550 | } | 548 | } |
551 | schedule_delayed_work(&bdev->wq, | 549 | schedule_delayed_work(&bdev->wq, |
@@ -1716,7 +1714,6 @@ int ttm_bo_wait(struct ttm_buffer_object *bo, | |||
1716 | struct ttm_bo_driver *driver = bo->bdev->driver; | 1714 | struct ttm_bo_driver *driver = bo->bdev->driver; |
1717 | struct ttm_bo_device *bdev = bo->bdev; | 1715 | struct ttm_bo_device *bdev = bo->bdev; |
1718 | void *sync_obj; | 1716 | void *sync_obj; |
1719 | void *sync_obj_arg; | ||
1720 | int ret = 0; | 1717 | int ret = 0; |
1721 | 1718 | ||
1722 | if (likely(bo->sync_obj == NULL)) | 1719 | if (likely(bo->sync_obj == NULL)) |
@@ -1724,7 +1721,7 @@ int ttm_bo_wait(struct ttm_buffer_object *bo, | |||
1724 | 1721 | ||
1725 | while (bo->sync_obj) { | 1722 | while (bo->sync_obj) { |
1726 | 1723 | ||
1727 | if (driver->sync_obj_signaled(bo->sync_obj, bo->sync_obj_arg)) { | 1724 | if (driver->sync_obj_signaled(bo->sync_obj, NULL)) { |
1728 | void *tmp_obj = bo->sync_obj; | 1725 | void *tmp_obj = bo->sync_obj; |
1729 | bo->sync_obj = NULL; | 1726 | bo->sync_obj = NULL; |
1730 | clear_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags); | 1727 | clear_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags); |
@@ -1738,9 +1735,8 @@ int ttm_bo_wait(struct ttm_buffer_object *bo, | |||
1738 | return -EBUSY; | 1735 | return -EBUSY; |
1739 | 1736 | ||
1740 | sync_obj = driver->sync_obj_ref(bo->sync_obj); | 1737 | sync_obj = driver->sync_obj_ref(bo->sync_obj); |
1741 | sync_obj_arg = bo->sync_obj_arg; | ||
1742 | spin_unlock(&bdev->fence_lock); | 1738 | spin_unlock(&bdev->fence_lock); |
1743 | ret = driver->sync_obj_wait(sync_obj, sync_obj_arg, | 1739 | ret = driver->sync_obj_wait(sync_obj, NULL, |
1744 | lazy, interruptible); | 1740 | lazy, interruptible); |
1745 | if (unlikely(ret != 0)) { | 1741 | if (unlikely(ret != 0)) { |
1746 | driver->sync_obj_unref(&sync_obj); | 1742 | driver->sync_obj_unref(&sync_obj); |
@@ -1748,8 +1744,7 @@ int ttm_bo_wait(struct ttm_buffer_object *bo, | |||
1748 | return ret; | 1744 | return ret; |
1749 | } | 1745 | } |
1750 | spin_lock(&bdev->fence_lock); | 1746 | spin_lock(&bdev->fence_lock); |
1751 | if (likely(bo->sync_obj == sync_obj && | 1747 | if (likely(bo->sync_obj == sync_obj)) { |
1752 | bo->sync_obj_arg == sync_obj_arg)) { | ||
1753 | void *tmp_obj = bo->sync_obj; | 1748 | void *tmp_obj = bo->sync_obj; |
1754 | bo->sync_obj = NULL; | 1749 | bo->sync_obj = NULL; |
1755 | clear_bit(TTM_BO_PRIV_FLAG_MOVING, | 1750 | clear_bit(TTM_BO_PRIV_FLAG_MOVING, |