aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0455-drm-amdgpu-fix-UVD-return-code-checking.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0455-drm-amdgpu-fix-UVD-return-code-checking.patch')
-rw-r--r--common/recipes-kernel/linux/files/0455-drm-amdgpu-fix-UVD-return-code-checking.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0455-drm-amdgpu-fix-UVD-return-code-checking.patch b/common/recipes-kernel/linux/files/0455-drm-amdgpu-fix-UVD-return-code-checking.patch
new file mode 100644
index 00000000..a96c9fb2
--- /dev/null
+++ b/common/recipes-kernel/linux/files/0455-drm-amdgpu-fix-UVD-return-code-checking.patch
@@ -0,0 +1,51 @@
+From 4127a59e0b3f914ae8d9843d521a07e117db045a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Tue, 11 Aug 2015 16:35:54 +0200
+Subject: [PATCH 0455/1050] drm/amdgpu: fix UVD return code checking
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+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>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 10 +++++-----
+ 1 file 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 b56cace..e7336a9 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,
+ struct amdgpu_device *adev = ctx->parser->adev;
+ int32_t *msg, msg_type, handle;
+ void *ptr;
+-
+- int i, r;
++ long r;
++ int i;
+
+ if (offset & 0x3F) {
+ 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,
+
+ 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);
++ if (r < 0) {
++ DRM_ERROR("Failed waiting for UVD message (%ld)!\n", r);
+ return r;
+ }
+
+ r = amdgpu_bo_kmap(bo, &ptr);
+ if (r) {
+- DRM_ERROR("Failed mapping the UVD message (%d)!\n", r);
++ DRM_ERROR("Failed mapping the UVD message (%ld)!\n", r);
+ return r;
+ }
+
+--
+1.9.1
+