[PATCH] Increase AMDGPU_MAX_UVD_INSTANCES to 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2018-06-23 08:02 PM, Timothy Pearson wrote:
> 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.
Hi Timothy,

 From design of view, it is not right to just change 
AMDGPU_MAX_UVD_INSTANCES to 3.

Could you tell me some detail of UBSAN test and attach the dmesg also?

thanks!

James Zhu
>
> Signed-off-by: Timothy Pearson <tpearson at raptorengineering.com>
> ---
>   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 8b23a1b00c76..4a47cb570af7 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) + \



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux