diff options
author | Christian König <christian.koenig@amd.com> | 2015-08-06 18:44:47 (GMT) |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-17 20:51:08 (GMT) |
commit | 713293b82563006df3cc91582b5b36b092481d76 (patch) | |
tree | 6d3c1a9acd49c9b1c9957443d44531e528d274d1 /drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | |
parent | 3cdb8119d95411ddbca9f9af13b72e4afce6e6d2 (diff) | |
download | linux-713293b82563006df3cc91582b5b36b092481d76.tar.xz |
drm/amdgpu: use the reservation obj wait for the UVD msg
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c index f114c6b..b56cace 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c @@ -513,7 +513,6 @@ static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx, { struct amdgpu_device *adev = ctx->parser->adev; int32_t *msg, msg_type, handle; - struct fence *f; void *ptr; int i, r; @@ -523,13 +522,11 @@ static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx, return -EINVAL; } - f = reservation_object_get_excl(bo->tbo.resv); - if (f) { - r = amdgpu_fence_wait((struct amdgpu_fence *)f, false); - if (r) { - DRM_ERROR("Failed waiting for UVD message (%d)!\n", r); - return r; - } + r = reservation_object_wait_timeout_rcu(bo->tbo.resv, true, false, + MAX_SCHEDULE_TIMEOUT); + if (r) { + DRM_ERROR("Failed waiting for UVD message (%d)!\n", r); + return r; } r = amdgpu_bo_kmap(bo, &ptr); |