diff options
author | Christian König <christian.koenig@amd.com> | 2015-08-06 14:44:47 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-17 16:51:08 -0400 |
commit | 713293b82563006df3cc91582b5b36b092481d76 (patch) | |
tree | 6d3c1a9acd49c9b1c9957443d44531e528d274d1 | |
parent | 3cdb8119d95411ddbca9f9af13b72e4afce6e6d2 (diff) |
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>
-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 f114c6b49b9d..b56cace92fc6 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, | |||
513 | { | 513 | { |
514 | struct amdgpu_device *adev = ctx->parser->adev; | 514 | struct amdgpu_device *adev = ctx->parser->adev; |
515 | int32_t *msg, msg_type, handle; | 515 | int32_t *msg, msg_type, handle; |
516 | struct fence *f; | ||
517 | void *ptr; | 516 | void *ptr; |
518 | 517 | ||
519 | int i, r; | 518 | int i, r; |
@@ -523,13 +522,11 @@ static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx, | |||
523 | return -EINVAL; | 522 | return -EINVAL; |
524 | } | 523 | } |
525 | 524 | ||
526 | f = reservation_object_get_excl(bo->tbo.resv); | 525 | r = reservation_object_wait_timeout_rcu(bo->tbo.resv, true, false, |
527 | if (f) { | 526 | MAX_SCHEDULE_TIMEOUT); |
528 | r = amdgpu_fence_wait((struct amdgpu_fence *)f, false); | 527 | if (r) { |
529 | if (r) { | 528 | DRM_ERROR("Failed waiting for UVD message (%d)!\n", r); |
530 | DRM_ERROR("Failed waiting for UVD message (%d)!\n", r); | 529 | return r; |
531 | return r; | ||
532 | } | ||
533 | } | 530 | } |
534 | 531 | ||
535 | r = amdgpu_bo_kmap(bo, &ptr); | 532 | r = amdgpu_bo_kmap(bo, &ptr); |