From: Alex Deucher Date: Thu, 12 Dec 2024 22:04:58 +0000 (-0500) Subject: drm/amdgpu/gfx12: fix IP version check X-Git-Tag: block-6.14-20240131~40^2~14^2~15 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=f1fd1d0f40272948aa6ab82a3a82ecbbc76dff53;p=linux-block.git drm/amdgpu/gfx12: fix IP version check Use the helper function rather than reading it directly. Reviewed-by: Yang Wang Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c index 6ca9d0461e4c..40c47a2dd060 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c @@ -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,