From: Alex Deucher alexander.deucher@amd.com
[ Upstream commit fa819e3a7c1ee994ce014cc5a991c7fd91bc00f1 ]
Some SOCs which are part of the cyan skillfish family rely on an explicit firmware for IP discovery. Add support for the gpu_info 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 it does - Adds a firmware alias for cyan-skillfish GPU info so user space can bundle the blob: `MODULE_FIRMWARE("amdgpu/cyan_skillfish_gpu_info.bin");` (drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:98). - Extends `amdgpu_device_parse_gpu_info_fw()` to recognize the cyan- skillfish ASIC and request its gpu_info firmware by name: `case CHIP_CYAN_SKILLFISH: chip_name = "cyan_skillfish"; break;` (drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:2633). - Uses the existing firmware loading path with `AMDGPU_UCODE_OPTIONAL` via `amdgpu_ucode_request(adev, &adev->firmware.gpu_info_fw, AMDGPU_UCODE_OPTIONAL, "amdgpu/%s_gpu_info.bin", chip_name);` (drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:2638), then parses the header and fills config when present (drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:2648-2713).
- Why it matters (bug it fixes) - Commit message states some cyan-skillfish SoCs rely on an explicit firmware for IP discovery. Prior to this change, `amdgpu_device_parse_gpu_info_fw()` did not handle `CHIP_CYAN_SKILLFISH`, so the driver skipped loading the gpu_info firmware for these ASICs (default case returned 0). That can leave required configuration (e.g., GC/DAL parameters and SoC bounding box when provided) unavailable, causing functional issues or incomplete bring-up on affected SoCs. This change enables the driver to obtain and use the cyan-skillfish gpu_info firmware, aligning it with how other ASICs are already handled.
- Scope and risk assessment - Small and contained: only touches `amdgpu_device.c` with two straightforward additions (firmware alias and a switch case branch). - No architectural changes: it reuses the existing, well-exercised gpu_info firmware parsing path used by Vega/Raven/Arcturus/Navi12 (see the nearby cases for those chips in the same switch in drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:2606-2632). - Limited impact: code runs only for `CHIP_CYAN_SKILLFISH`. Other ASICs are untouched. - Consistent error handling: if the firmware isn’t found, `amdgpu_ucode_request()` returns `-ENODEV` (drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c:1489-1505), which propagates out of `amdgpu_device_parse_gpu_info_fw()` (drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:2713). The alias addition (drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:98) ensures the firmware name is properly declared so distributions can include it, mirroring all the other gpu_info blobs already declared for prior ASICs. This matches the existing pattern and minimizes regression risk. - No user-visible feature addition: it corrects missing support for a known hardware family, enabling required firmware consumption rather than introducing new functionality.
- Stable backport criteria - Fixes an important functional gap for users with cyan-skillfish SoCs by enabling necessary firmware-based discovery/config data. - Minimal, isolated change with low regression risk for non-affected platforms. - No ABI or architectural changes; follows established amdgpu firmware-loading patterns. - Touches the DRM amdgpu subsystem only and mirrors how other ASICs are supported.
Given the small, targeted nature of the change and its purpose of enabling existing hardware to function correctly by loading a required gpu_info firmware, this is a good candidate for stable backporting.
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 097ceee79ece6..274bb4d857d36 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -95,6 +95,7 @@ MODULE_FIRMWARE("amdgpu/picasso_gpu_info.bin"); MODULE_FIRMWARE("amdgpu/raven2_gpu_info.bin"); MODULE_FIRMWARE("amdgpu/arcturus_gpu_info.bin"); MODULE_FIRMWARE("amdgpu/navi12_gpu_info.bin"); +MODULE_FIRMWARE("amdgpu/cyan_skillfish_gpu_info.bin");
#define AMDGPU_RESUME_MS 2000 #define AMDGPU_MAX_RETRY_LIMIT 2 @@ -2595,6 +2596,9 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev) return 0; chip_name = "navi12"; break; + case CHIP_CYAN_SKILLFISH: + chip_name = "cyan_skillfish"; + break; }
err = amdgpu_ucode_request(adev, &adev->firmware.gpu_info_fw,