drm/ttm: remove sync_arg from driver functions
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Reviewed-By: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
committed by
Dave Airlie
parent
b03640b1de
commit
dedfdffd44
@@ -1472,19 +1472,19 @@ nouveau_bo_fence_ref(void *sync_obj)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
nouveau_bo_fence_signalled(void *sync_obj, void *sync_arg)
|
nouveau_bo_fence_signalled(void *sync_obj)
|
||||||
{
|
{
|
||||||
return nouveau_fence_done(sync_obj);
|
return nouveau_fence_done(sync_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
nouveau_bo_fence_wait(void *sync_obj, void *sync_arg, bool lazy, bool intr)
|
nouveau_bo_fence_wait(void *sync_obj, bool lazy, bool intr)
|
||||||
{
|
{
|
||||||
return nouveau_fence_wait(sync_obj, lazy, intr);
|
return nouveau_fence_wait(sync_obj, lazy, intr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
nouveau_bo_fence_flush(void *sync_obj, void *sync_arg)
|
nouveau_bo_fence_flush(void *sync_obj)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -471,13 +471,12 @@ static void radeon_ttm_io_mem_free(struct ttm_bo_device *bdev, struct ttm_mem_re
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static int radeon_sync_obj_wait(void *sync_obj, void *sync_arg,
|
static int radeon_sync_obj_wait(void *sync_obj, bool lazy, bool interruptible)
|
||||||
bool lazy, bool interruptible)
|
|
||||||
{
|
{
|
||||||
return radeon_fence_wait((struct radeon_fence *)sync_obj, interruptible);
|
return radeon_fence_wait((struct radeon_fence *)sync_obj, interruptible);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int radeon_sync_obj_flush(void *sync_obj, void *sync_arg)
|
static int radeon_sync_obj_flush(void *sync_obj)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -492,7 +491,7 @@ static void *radeon_sync_obj_ref(void *sync_obj)
|
|||||||
return radeon_fence_ref((struct radeon_fence *)sync_obj);
|
return radeon_fence_ref((struct radeon_fence *)sync_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool radeon_sync_obj_signaled(void *sync_obj, void *sync_arg)
|
static bool radeon_sync_obj_signaled(void *sync_obj)
|
||||||
{
|
{
|
||||||
return radeon_fence_signaled((struct radeon_fence *)sync_obj);
|
return radeon_fence_signaled((struct radeon_fence *)sync_obj);
|
||||||
}
|
}
|
||||||
|
@@ -543,7 +543,7 @@ queue:
|
|||||||
spin_unlock(&bdev->fence_lock);
|
spin_unlock(&bdev->fence_lock);
|
||||||
|
|
||||||
if (sync_obj) {
|
if (sync_obj) {
|
||||||
driver->sync_obj_flush(sync_obj, NULL);
|
driver->sync_obj_flush(sync_obj);
|
||||||
driver->sync_obj_unref(&sync_obj);
|
driver->sync_obj_unref(&sync_obj);
|
||||||
}
|
}
|
||||||
schedule_delayed_work(&bdev->wq,
|
schedule_delayed_work(&bdev->wq,
|
||||||
@@ -1721,7 +1721,7 @@ int ttm_bo_wait(struct ttm_buffer_object *bo,
|
|||||||
|
|
||||||
while (bo->sync_obj) {
|
while (bo->sync_obj) {
|
||||||
|
|
||||||
if (driver->sync_obj_signaled(bo->sync_obj, NULL)) {
|
if (driver->sync_obj_signaled(bo->sync_obj)) {
|
||||||
void *tmp_obj = bo->sync_obj;
|
void *tmp_obj = bo->sync_obj;
|
||||||
bo->sync_obj = NULL;
|
bo->sync_obj = NULL;
|
||||||
clear_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags);
|
clear_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags);
|
||||||
@@ -1736,7 +1736,7 @@ int ttm_bo_wait(struct ttm_buffer_object *bo,
|
|||||||
|
|
||||||
sync_obj = driver->sync_obj_ref(bo->sync_obj);
|
sync_obj = driver->sync_obj_ref(bo->sync_obj);
|
||||||
spin_unlock(&bdev->fence_lock);
|
spin_unlock(&bdev->fence_lock);
|
||||||
ret = driver->sync_obj_wait(sync_obj, NULL,
|
ret = driver->sync_obj_wait(sync_obj,
|
||||||
lazy, interruptible);
|
lazy, interruptible);
|
||||||
if (unlikely(ret != 0)) {
|
if (unlikely(ret != 0)) {
|
||||||
driver->sync_obj_unref(&sync_obj);
|
driver->sync_obj_unref(&sync_obj);
|
||||||
|
@@ -310,21 +310,20 @@ static void vmw_sync_obj_unref(void **sync_obj)
|
|||||||
vmw_fence_obj_unreference((struct vmw_fence_obj **) sync_obj);
|
vmw_fence_obj_unreference((struct vmw_fence_obj **) sync_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vmw_sync_obj_flush(void *sync_obj, void *sync_arg)
|
static int vmw_sync_obj_flush(void *sync_obj)
|
||||||
{
|
{
|
||||||
vmw_fence_obj_flush((struct vmw_fence_obj *) sync_obj);
|
vmw_fence_obj_flush((struct vmw_fence_obj *) sync_obj);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool vmw_sync_obj_signaled(void *sync_obj, void *sync_arg)
|
static bool vmw_sync_obj_signaled(void *sync_obj)
|
||||||
{
|
{
|
||||||
return vmw_fence_obj_signaled((struct vmw_fence_obj *) sync_obj,
|
return vmw_fence_obj_signaled((struct vmw_fence_obj *) sync_obj,
|
||||||
DRM_VMW_FENCE_FLAG_EXEC);
|
DRM_VMW_FENCE_FLAG_EXEC);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vmw_sync_obj_wait(void *sync_obj, void *sync_arg,
|
static int vmw_sync_obj_wait(void *sync_obj, bool lazy, bool interruptible)
|
||||||
bool lazy, bool interruptible)
|
|
||||||
{
|
{
|
||||||
return vmw_fence_obj_wait((struct vmw_fence_obj *) sync_obj,
|
return vmw_fence_obj_wait((struct vmw_fence_obj *) sync_obj,
|
||||||
DRM_VMW_FENCE_FLAG_EXEC,
|
DRM_VMW_FENCE_FLAG_EXEC,
|
||||||
|
@@ -422,10 +422,10 @@ struct ttm_bo_driver {
|
|||||||
* documentation.
|
* documentation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool (*sync_obj_signaled) (void *sync_obj, void *sync_arg);
|
bool (*sync_obj_signaled) (void *sync_obj);
|
||||||
int (*sync_obj_wait) (void *sync_obj, void *sync_arg,
|
int (*sync_obj_wait) (void *sync_obj,
|
||||||
bool lazy, bool interruptible);
|
bool lazy, bool interruptible);
|
||||||
int (*sync_obj_flush) (void *sync_obj, void *sync_arg);
|
int (*sync_obj_flush) (void *sync_obj);
|
||||||
void (*sync_obj_unref) (void **sync_obj);
|
void (*sync_obj_unref) (void **sync_obj);
|
||||||
void *(*sync_obj_ref) (void *sync_obj);
|
void *(*sync_obj_ref) (void *sync_obj);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user