Skip to contentSkip to conversation

drm/amdgpu: Fix APU handling in amdgpu_pm_load_smu_firmware()

PATCH In review Alex Deucher 2 participants 2 messages Jul 25, 2024 – Jul 26, 2024

Subsystems (3)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu: Fix APU handling in amdgpu_pm_load_smu_firmware()

We only need to skip this on modern APUs. It's required on older APUs as it's where start_smu gets called from.

Fixes 064d92436b69 ("drm/amd/pm: avoid to load smu firmware for APUs")
Cc Tim Huang <[email protected]>
---
 drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/amdgpu_dpm.c +2 -1
index f78b4f013ed4..62df787d7b28 100644
@@ -631,7 +631,8 @@ int amdgpu_pm_load_smu_firmware(struct amdgpu_device *adev, uint32_t *smu_versio
 	const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs;
 	int r = 0;
 
-	if (!pp_funcs || !pp_funcs->load_firmware || adev->flags & AMD_IS_APU)
+	if (!pp_funcs || !pp_funcs->load_firmware ||
+	    (is_support_sw_smu(adev) && (adev->flags & AMD_IS_APU)))
 		return 0;
 
 	mutex_lock(&adev->pm.mutex);
Signature · 1 line
2.45.2
Reviewed-by on v1 1/1
#1 lore raw

[Public]

This patch is,

Quoted 38 lines

-----Original Message-----
From: Deucher, Alexander <[email protected]>
Sent: Friday, July 26, 2024 5:36 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Huang, Tim <[email protected]>
Subject: [PATCH] drm/amdgpu: Fix APU handling in amdgpu_pm_load_smu_firmware()

We only need to skip this on modern APUs. It's required on older APUs as it's where start_smu gets called from.

Fixes 064d92436b69 ("drm/amd/pm: avoid to load smu firmware for APUs")
Cc Tim Huang <[email protected]>
---
 drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/amdgpu_dpm.c +0 -0
index f78b4f013ed4..62df787d7b28 100644
@@ -631,7 +631,8 @@ int amdgpu_pm_load_smu_firmware(struct

amdgpu_device *adev, uint32_t *smu_versio

      const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs;
      int r = 0;
drivers/gpu/drm/amd/pm/amdgpu_dpm.c +2 -2
-     if (!pp_funcs || !pp_funcs->load_firmware || adev->flags & AMD_IS_APU)
+     if (!pp_funcs || !pp_funcs->load_firmware ||
+         (is_support_sw_smu(adev) && (adev->flags & AMD_IS_APU)))
              return 0;
 
      mutex_lock(&adev->pm.mutex);
--

2.45.2