summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.h
diff options
context:
space:
mode:
authorPeng Ju Zhou <PengJu.Zhou@amd.com>2021-06-03 18:32:14 +0800
committerAlex Deucher <alexander.deucher@amd.com>2021-06-11 16:02:50 -0400
commitc89d2a2fe08656b1db7107a19ac9db8d45fa1f8e (patch)
treecbb30d0810bf367ae7ced2ce4c03e90c2088e1c1 /drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.h
parent2f0cf910379863c1e26a5cf52fd6d017b13ce6e8 (diff)
downloadlinux-stable-c89d2a2fe08656b1db7107a19ac9db8d45fa1f8e.tar.gz
linux-stable-c89d2a2fe08656b1db7107a19ac9db8d45fa1f8e.tar.bz2
linux-stable-c89d2a2fe08656b1db7107a19ac9db8d45fa1f8e.zip
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.h
index 1b1ae21b1037..02e340cd3a38 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.h
@@ -30,7 +30,7 @@
void amdgpu_discovery_fini(struct amdgpu_device *adev);
int amdgpu_discovery_reg_base_init(struct amdgpu_device *adev);
void amdgpu_discovery_harvest_ip(struct amdgpu_device *adev);
-int amdgpu_discovery_get_ip_version(struct amdgpu_device *adev, int hw_id,
+int amdgpu_discovery_get_ip_version(struct amdgpu_device *adev, int hw_id, int number_instance,
int *major, int *minor, int *revision);
int amdgpu_discovery_get_gfx_info(struct amdgpu_device *adev);