From 88b4f90967a559c27f4133bad955a0b25a6ea089 Mon Sep 17 00:00:00 2001 From: jsg Date: Sat, 15 Jun 2024 04:18:24 +0000 Subject: [PATCH] drm/amdgpu: init microcode chip name from ip versions 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/gfx_v9_4_3.c b/sys/dev/pci/drm/amd/amdgpu/gfx_v9_4_3.c index 7691d173c47..ef12ee577a3 100644 --- a/sys/dev/pci/drm/amd/amdgpu/gfx_v9_4_3.c +++ b/sys/dev/pci/drm/amd/amdgpu/gfx_v9_4_3.c @@ -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; -- 2.20.1