drm/amdgpu/discovery: validate VCN and SDMA instances
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 16 May 2022 18:12:33 +0000 (14:12 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 26 May 2022 18:56:33 +0000 (14:56 -0400)
commita0ccc717c4ab3ef572f023fdceffb4b6df496a0d
treeeaec551db400ad6c6295d9939bd11515abbdd21f
parent76818cdd11a25ac6cb1d98875719935d8d0e2e51
drm/amdgpu/discovery: validate VCN and SDMA instances

Validate the VCN and SDMA instances against the driver
structure sizes to make sure we don't get into a
situation where the firmware reports more instances than
the driver supports.

Reviewed-by: Guchun Chen <guchun.chen@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c