]> www.infradead.org Git - users/dwmw2/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 18:01:43 +0000 (13:01 -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>
(cherry picked from commit f1fd1d0f40272948aa6ab82a3a82ecbbc76dff53)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c

index fe7c48f2fb2a700810ffbcca0a211623e3486ef0..da327ab48a572c377d7af77c03e8b73c49a59197 100644 (file)
@@ -4123,7 +4123,7 @@ static int gfx_v12_0_set_clockgating_state(void *handle,
        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,