]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/amdgpu: add instance_number check in amdgpu_discovery_get_ip_version
authorPeng Ju Zhou <PengJu.Zhou@amd.com>
Thu, 3 Jun 2021 10:32:14 +0000 (18:32 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 11 Jun 2021 20:02:50 +0000 (16:02 -0400)
commitf9fd1d0efcb9c89419db7194601b7bf9d0c4459c
treecbb30d0810bf367ae7ced2ce4c03e90c2088e1c1
parent067b19e24ed98b8c269bd2d8e37b7bde10e23b4c
drm/amd/amdgpu: add instance_number check in amdgpu_discovery_get_ip_version

The original code returns IP version of instantce_0 for every IP. This implementation may be correct for most of IPs.

However, for certain IP block (VCN for example), it may have 2 instances and
both of them have the same hw_id, BUT they have different revision number (0 and 1).

In this case, the original amdgpu_discovery_get_ip_version cannot correct reflects
the result and returns false information

Signed-off-by: Bokun Zhang <Bokun.Zhang@amd.com>
Signed-off-by: Peng Ju Zhou <PengJu.Zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.h