From 461333cedd470140eb1e1667608da2a6d65a58e5 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 23 Jun 2018 19:00:58 -0500 Subject: 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 --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h index 8b23a1b..4a47cb5 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) + \ -- cgit v1.1