summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <tpearson@raptorengineering.com>2018-06-23 19:00:58 -0500
committerTimothy Pearson <tpearson@raptorengineering.com>2018-09-11 18:45:00 -0500
commit8a799feb3149ac87918a107f2a01581e3a9859af (patch)
tree303b67848e36a7714bb7cfd0684bf408bf5e6b9e
parent57a21f640a2b6d2e225cac7df35ed0dde7c6293f (diff)
downloadop-kernel-dev-8a799feb3149ac87918a107f2a01581e3a9859af.zip
op-kernel-dev-8a799feb3149ac87918a107f2a01581e3a9859af.tar.gz
Increase AMDGPU_MAX_UVD_INSTANCES to 3
amdgpu_fence_driver_start_ring() attempts to access UVD instance 2 during setup, while the existing UVD instance count only allows instances 0 and 1. Increase AMDGPU_MAX_UVD_INSTANCES by one to avoid the invalid array access. Caught by UBSAN. Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h
index a3ab1a4..c1230e9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h
@@ -31,7 +31,7 @@
#define AMDGPU_UVD_SESSION_SIZE (50*1024)
#define AMDGPU_UVD_FIRMWARE_OFFSET 256
-#define AMDGPU_MAX_UVD_INSTANCES 2
+#define AMDGPU_MAX_UVD_INSTANCES 3
#define AMDGPU_UVD_FIRMWARE_SIZE(adev) \
(AMDGPU_GPU_PAGE_ALIGN(le32_to_cpu(((const struct common_firmware_header *)(adev)->uvd.fw->data)->ucode_size_bytes) + \
OpenPOWER on IntegriCloud