Commit 4127a59e authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: fix UVD return code checking

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Tested-and-Reviewed-by: default avatarLeo Liu <leo.liu@amd.com>
parent 5b232c2a
...@@ -514,8 +514,8 @@ static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx, ...@@ -514,8 +514,8 @@ 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;
void *ptr; void *ptr;
long r;
int i, r; int i;
if (offset & 0x3F) { if (offset & 0x3F) {
DRM_ERROR("UVD messages must be 64 byte aligned!\n"); DRM_ERROR("UVD messages must be 64 byte aligned!\n");
...@@ -524,14 +524,14 @@ static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx, ...@@ -524,14 +524,14 @@ static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx,
r = reservation_object_wait_timeout_rcu(bo->tbo.resv, true, false, r = reservation_object_wait_timeout_rcu(bo->tbo.resv, true, false,
MAX_SCHEDULE_TIMEOUT); MAX_SCHEDULE_TIMEOUT);
if (r) { if (r < 0) {
DRM_ERROR("Failed waiting for UVD message (%d)!\n", r); DRM_ERROR("Failed waiting for UVD message (%ld)!\n", r);
return r; return r;
} }
r = amdgpu_bo_kmap(bo, &ptr); r = amdgpu_bo_kmap(bo, &ptr);
if (r) { if (r) {
DRM_ERROR("Failed mapping the UVD message (%d)!\n", r); DRM_ERROR("Failed mapping the UVD message (%ld)!\n", r);
return r; return r;
} }
......
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