aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2015-08-11 10:35:54 -0400
committerAlex Deucher <alexander.deucher@amd.com>2015-08-17 16:51:16 -0400
commit4127a59e0b3f914ae8d9843d521a07e117db045a (patch)
treec560af98524e4a7436513ba3c1752405337d95ff /drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
parent5b232c2a717684d0dffc27e50bf05e1fb72f9d6e (diff)
drm/amdgpu: fix UVD return code checking
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Tested-and-Reviewed-by: Leo Liu <leo.liu@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
index b56cace92fc6..e7336a95fe59 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
@@ -514,8 +514,8 @@ static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx,
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 void *ptr; 516 void *ptr;
517 517 long r;
518 int i, r; 518 int i;
519 519
520 if (offset & 0x3F) { 520 if (offset & 0x3F) {
521 DRM_ERROR("UVD messages must be 64 byte aligned!\n"); 521 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 524
525 r = reservation_object_wait_timeout_rcu(bo->tbo.resv, true, false, 525 r = reservation_object_wait_timeout_rcu(bo->tbo.resv, true, false,
526 MAX_SCHEDULE_TIMEOUT); 526 MAX_SCHEDULE_TIMEOUT);
527 if (r) { 527 if (r < 0) {
528 DRM_ERROR("Failed waiting for UVD message (%d)!\n", r); 528 DRM_ERROR("Failed waiting for UVD message (%ld)!\n", r);
529 return r; 529 return r;
530 } 530 }
531 531
532 r = amdgpu_bo_kmap(bo, &ptr); 532 r = amdgpu_bo_kmap(bo, &ptr);
533 if (r) { 533 if (r) {
534 DRM_ERROR("Failed mapping the UVD message (%d)!\n", r); 534 DRM_ERROR("Failed mapping the UVD message (%ld)!\n", r);
535 return r; 535 return r;
536 } 536 }
537 537