drm/amdgpu: init microcode chip name from ip versions
authorjsg <jsg@openbsd.org>
Sat, 15 Jun 2024 04:18:24 +0000 (04:18 +0000)
committerjsg <jsg@openbsd.org>
Sat, 15 Jun 2024 04:18:24 +0000 (04:18 +0000)
From Le Ma
bdd5bbe967827cd699f6293b70650f9a40a2dd4e in linux-6.6.y/6.6.33
92ed1e9cd5f6cc4f8c9a9ba6c4d2d2bbc6221296 in mainline linux

sys/dev/pci/drm/amd/amdgpu/gfx_v9_4_3.c

index 7691d17..ef12ee5 100644 (file)
@@ -425,16 +425,16 @@ out:
 
 static int gfx_v9_4_3_init_microcode(struct amdgpu_device *adev)
 {
-       const char *chip_name;
+       char ucode_prefix[30];
        int r;
 
-       chip_name = "gc_9_4_3";
+       amdgpu_ucode_ip_version_decode(adev, GC_HWIP, ucode_prefix, sizeof(ucode_prefix));
 
-       r = gfx_v9_4_3_init_rlc_microcode(adev, chip_name);
+       r = gfx_v9_4_3_init_rlc_microcode(adev, ucode_prefix);
        if (r)
                return r;
 
-       r = gfx_v9_4_3_init_cp_compute_microcode(adev, chip_name);
+       r = gfx_v9_4_3_init_cp_compute_microcode(adev, ucode_prefix);
        if (r)
                return r;