From: Alex Deucher alexander.deucher@amd.com
[ Upstream commit 94bd7bf2c920998b4c756bc8a54fd3dbdf7e4360 ]
Cyan skillfish uses different SMU firmware.
Signed-off-by: Alex Deucher alexander.deucher@amd.com Signed-off-by: Sasha Levin sashal@kernel.org ---
LLM Generated explanations, may be completely bogus:
YES
- What changed - `drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:2113` adds a dedicated switch case for `IP_VERSION(11, 0, 8)` and only enables the SMU when `adev->apu_flags & AMD_APU_IS_CYAN_SKILLFISH2` is set, otherwise it does nothing (no SMU block added) at `drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:2134-2137`. - In the same function, `IP_VERSION(11, 0, 8)` has been removed from the generic v11.0.x list that unconditionally enabled `smu_v11_0_ip_block` (now absent from the list at `drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:2123-2133`). Net effect: “cyan skillfish” (original) no longer gets SMU enabled; only “cyan skillfish2” does.
- Why this fixes a real bug - The commit message states “Cyan skillfish uses different SMU firmware.” Enabling the v11.0 SMU driver on original cyan skillfish (MP1 11.0.8) mismatches firmware/driver and can lead to init failures or instability. The new gating prevents that by not adding the SMU IP block unless the device is the “cyan skillfish2” variant. - The rest of the driver already treats cyan skillfish variants differently, which corroborates this fix: - APU flag detection: `drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:2076-2080` sets `AMD_APU_IS_CYAN_SKILLFISH2` based on PCI IDs. - Firmware load path: for `CHIP_CYAN_SKILLFISH`, non-2 defaults to direct firmware loading rather than PSP (`drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c:563-568`), indicating a different bring-up path than typical SMU/PSP-managed devices. - PSP specialization: PSP functions for `IP_VERSION(11, 0, 8)` are only set for cyan skillfish2, with other behavior toggled for the non-2 variant (`drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:235-241`). - IP version assignments for cyan skillfish explicitly set MP1 to 11.0.8 on non-2 (`drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:2774-2776`), so the new SMU gating precisely targets that case.
- Impact and risk - Scope is narrowly limited to SMU enablement for MP1 `11.0.8`; it gates SMU only for `AMD_APU_IS_CYAN_SKILLFISH2`. Original cyan skillfish devices will no longer load the v11.0 SMU driver, avoiding firmware/driver mismatch. - No architectural changes; the patch only adjusts the discovery-time IP block selection in one function (`amdgpu_discovery_set_smu_ip_blocks` at `drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:2111-2172`). - Minimal regression risk: devices incorrectly receiving SMU before this patch were at risk; after the patch, those devices simply won’t enable SMU, which aligns with the existing PSP/ucode paths for cyan skillfish and prevents crashes or misbehavior. Other SKUs and IP versions are unaffected.
- Stable backport criteria - Fixes a hardware-specific bug that affects users with cyan skillfish (original) hardware. - Change is small and contained to a single switch-case; no new features. - No broad side effects or architectural shifts; consistent with existing variant handling in PSP/ucode. - Although the commit message lacks “Fixes:”/stable tags, it clearly qualifies as a correctness/stability fix with low risk.
Note: Ensure the target stable trees already have the `AMD_APU_IS_CYAN_SKILLFISH2` flag and detection logic (`drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:2076-2080`). If not, those prerequisites should be included for a clean backport.
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c index e814da2b14225..dd7b2b796427c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c @@ -2126,7 +2126,6 @@ static int amdgpu_discovery_set_smu_ip_blocks(struct amdgpu_device *adev) case IP_VERSION(11, 0, 5): case IP_VERSION(11, 0, 9): case IP_VERSION(11, 0, 7): - case IP_VERSION(11, 0, 8): case IP_VERSION(11, 0, 11): case IP_VERSION(11, 0, 12): case IP_VERSION(11, 0, 13): @@ -2134,6 +2133,10 @@ static int amdgpu_discovery_set_smu_ip_blocks(struct amdgpu_device *adev) case IP_VERSION(11, 5, 2): amdgpu_device_ip_block_add(adev, &smu_v11_0_ip_block); break; + case IP_VERSION(11, 0, 8): + if (adev->apu_flags & AMD_APU_IS_CYAN_SKILLFISH2) + amdgpu_device_ip_block_add(adev, &smu_v11_0_ip_block); + break; case IP_VERSION(12, 0, 0): case IP_VERSION(12, 0, 1): amdgpu_device_ip_block_add(adev, &smu_v12_0_ip_block);