]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu/nbio7.7: fix IP version check
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 12 Dec 2024 21:47:48 +0000 (16:47 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 18 Dec 2024 17:22:03 +0000 (12:22 -0500)
Use the helper function rather than reading it directly.

Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c

index 1ac730328516ff232497b66f59f361042efcb8d3..3fb6d2aa7e3b3995b9561371105c50c0daeef275 100644 (file)
@@ -247,7 +247,7 @@ static void nbio_v7_7_init_registers(struct amdgpu_device *adev)
        if (def != data)
                WREG32_SOC15(NBIO, 0, regBIF0_PCIE_MST_CTRL_3, data);
 
-       switch (adev->ip_versions[NBIO_HWIP][0]) {
+       switch (amdgpu_ip_version(adev, NBIO_HWIP, 0)) {
        case IP_VERSION(7, 7, 0):
                data = RREG32_SOC15(NBIO, 0, regRCC_DEV0_EPF5_STRAP4) & ~BIT(23);
                WREG32_SOC15(NBIO, 0, regRCC_DEV0_EPF5_STRAP4, data);