Commit 713293b8 authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: use the reservation obj wait for the UVD msg

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3cdb8119
...@@ -513,7 +513,6 @@ static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx, ...@@ -513,7 +513,6 @@ static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx,
{ {
struct amdgpu_device *adev = ctx->parser->adev; struct amdgpu_device *adev = ctx->parser->adev;
int32_t *msg, msg_type, handle; int32_t *msg, msg_type, handle;
struct fence *f;
void *ptr; void *ptr;
int i, r; int i, r;
...@@ -523,13 +522,11 @@ static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx, ...@@ -523,13 +522,11 @@ static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx,
return -EINVAL; return -EINVAL;
} }
f = reservation_object_get_excl(bo->tbo.resv); r = reservation_object_wait_timeout_rcu(bo->tbo.resv, true, false,
if (f) { MAX_SCHEDULE_TIMEOUT);
r = amdgpu_fence_wait((struct amdgpu_fence *)f, false); if (r) {
if (r) { DRM_ERROR("Failed waiting for UVD message (%d)!\n", r);
DRM_ERROR("Failed waiting for UVD message (%d)!\n", r); return r;
return r;
}
} }
r = amdgpu_bo_kmap(bo, &ptr); r = amdgpu_bo_kmap(bo, &ptr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment