]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amdgpu/smu14.0.2: fix IP version check
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 12 Dec 2024 22:06:26 +0000 (17:06 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Dec 2024 13:02:12 +0000 (14:02 +0100)
commit 9e752ee26c1031312a01d2afc281f5f6fdfca176 upstream.

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 8f2cd1067afe68372a1723e05e19b68ed187676a)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c

index b22fb7eafcd3f2c7282b916d86d4340ba5673516..9ec53431f2c32df25fde851ffd3c91d0950d879b 100644 (file)
@@ -2108,7 +2108,7 @@ static int smu_v14_0_2_enable_gfx_features(struct smu_context *smu)
 {
        struct amdgpu_device *adev = smu->adev;
 
-       if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(14, 0, 2))
+       if (amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(14, 0, 2))
                return smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_EnableAllSmuFeatures,
                                                                                   FEATURE_PWR_GFX, NULL);
        else