Skip to content

Commit dd2687f

Browse files
Lijo Lazaralexdeucher
authored andcommitted
drm/amdgpu: Use discovery table's subrevision
Use subrevision of IP version in discovery table to identify SOC revision id for NBIO v7.9 SOCs. Only newer bootloaders update subrevision field. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Le Ma <le.ma@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent ae8cffe commit dd2687f

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,15 @@ static u32 nbio_v7_9_get_rev_id(struct amdgpu_device *adev)
5656
{
5757
u32 tmp;
5858

59+
tmp = IP_VERSION_SUBREV(amdgpu_ip_version_full(adev, NBIO_HWIP, 0));
60+
/* If it is VF or subrevision holds a non-zero value, that should be used */
61+
if (tmp || amdgpu_sriov_vf(adev))
62+
return tmp;
63+
64+
/* If discovery subrev is not updated, use register version */
5965
tmp = RREG32_SOC15(NBIO, 0, regRCC_STRAP0_RCC_DEV0_EPF0_STRAP0);
60-
tmp = REG_GET_FIELD(tmp, RCC_STRAP0_RCC_DEV0_EPF0_STRAP0, STRAP_ATI_REV_ID_DEV0_F0);
66+
tmp = REG_GET_FIELD(tmp, RCC_STRAP0_RCC_DEV0_EPF0_STRAP0,
67+
STRAP_ATI_REV_ID_DEV0_F0);
6168

6269
return tmp;
6370
}

0 commit comments

Comments
 (0)