]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu/gfx12: fix IP version check
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 12 Dec 2024 22:04:58 +0000 (17:04 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 18 Dec 2024 17:22:24 +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/gfx_v12_0.c

index 6ca9d0461e4c152641b8bad48517aefb2aa5aadc..40c47a2dd06025671658c087a5cfa5c00dadb448 100644 (file)
@@ -4126,7 +4126,7 @@ static int gfx_v12_0_set_clockgating_state(struct amdgpu_ip_block *ip_block,
        if (amdgpu_sriov_vf(adev))
                return 0;
 
-       switch (adev->ip_versions[GC_HWIP][0]) {
+       switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
        case IP_VERSION(12, 0, 0):
        case IP_VERSION(12, 0, 1):
                gfx_v12_0_update_gfx_clock_gating(adev,