]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu/umsch: tidy up the ucode name string handling
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 12 Feb 2025 21:43:13 +0000 (16:43 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 17 Feb 2025 19:09:02 +0000 (14:09 -0500)
Make the constant parts of the name part of the string
we pass to amdgpu_ucode_request().  Only the version
number varies from IP to IP.

Reviewed-by: Saleemkhan Jamadar <saleemkhan.jamadar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Lang Yu <Lang.Yu@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c

index a7f2648245ec0bf0a68fa720eb44c316117cfb5c..cd707d70a0bf859bf10aecdb0b84cd99f8da3a3d 100644 (file)
@@ -126,14 +126,14 @@ int amdgpu_umsch_mm_init_microcode(struct amdgpu_umsch_mm *umsch)
        switch (amdgpu_ip_version(adev, VCN_HWIP, 0)) {
        case IP_VERSION(4, 0, 5):
        case IP_VERSION(4, 0, 6):
-               fw_name = "amdgpu/umsch_mm_4_0_0.bin";
+               fw_name = "4_0_0";
                break;
        default:
                return -EINVAL;
        }
 
        r = amdgpu_ucode_request(adev, &adev->umsch_mm.fw, AMDGPU_UCODE_REQUIRED,
-                                "%s", fw_name);
+                                "amdgpu/umsch_mm_%s.bin", fw_name);
        if (r) {
                release_firmware(adev->umsch_mm.fw);
                adev->umsch_mm.fw = NULL;