]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amdgpu: switch firmware path for CIK parts (v2)
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 2 Jul 2018 19:32:28 +0000 (14:32 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 5 Jul 2018 21:39:58 +0000 (16:39 -0500)
Use separate firmware path for amdgpu to avoid conflicts
with radeon on CIK parts.

v2: squash in logic simplification (Alex)

Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
drivers/gpu/drm/amd/amdgpu/ci_dpm.c
drivers/gpu/drm/amd/amdgpu/cik_sdma.c
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c

index e950730f1933b66f1bffc62eb4fc24fd10b8b903..693ec5ea4950a8a76653df1085472078314def56 100644 (file)
@@ -314,17 +314,17 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device,
                                        (adev->pdev->revision == 0x81) ||
                                        (adev->pdev->device == 0x665f)) {
                                        info->is_kicker = true;
-                                       strcpy(fw_name, "radeon/bonaire_k_smc.bin");
+                                       strcpy(fw_name, "amdgpu/bonaire_k_smc.bin");
                                } else {
-                                       strcpy(fw_name, "radeon/bonaire_smc.bin");
+                                       strcpy(fw_name, "amdgpu/bonaire_smc.bin");
                                }
                                break;
                        case CHIP_HAWAII:
                                if (adev->pdev->revision == 0x80) {
                                        info->is_kicker = true;
-                                       strcpy(fw_name, "radeon/hawaii_k_smc.bin");
+                                       strcpy(fw_name, "amdgpu/hawaii_k_smc.bin");
                                } else {
-                                       strcpy(fw_name, "radeon/hawaii_smc.bin");
+                                       strcpy(fw_name, "amdgpu/hawaii_smc.bin");
                                }
                                break;
                        case CHIP_TOPAZ:
index 0b46ea1c62907178c796cf91dc4225dca16aff84..3e70eb61a9609fdd22a1d45f2e5acf7d21f428ef 100644 (file)
 
 /* Firmware Names */
 #ifdef CONFIG_DRM_AMDGPU_CIK
-#define FIRMWARE_BONAIRE       "radeon/bonaire_uvd.bin"
-#define FIRMWARE_KABINI        "radeon/kabini_uvd.bin"
-#define FIRMWARE_KAVERI        "radeon/kaveri_uvd.bin"
-#define FIRMWARE_HAWAII        "radeon/hawaii_uvd.bin"
-#define FIRMWARE_MULLINS       "radeon/mullins_uvd.bin"
+#define FIRMWARE_BONAIRE       "amdgpu/bonaire_uvd.bin"
+#define FIRMWARE_KABINI        "amdgpu/kabini_uvd.bin"
+#define FIRMWARE_KAVERI        "amdgpu/kaveri_uvd.bin"
+#define FIRMWARE_HAWAII        "amdgpu/hawaii_uvd.bin"
+#define FIRMWARE_MULLINS       "amdgpu/mullins_uvd.bin"
 #endif
 #define FIRMWARE_TONGA         "amdgpu/tonga_uvd.bin"
 #define FIRMWARE_CARRIZO       "amdgpu/carrizo_uvd.bin"
index b0dcdfd85f5b84ba7e0bdd5ffb9636a53ac18cb2..6ae1ad7e83b3cab538c1bb5fb1975723cc453ce3 100644 (file)
 
 /* Firmware Names */
 #ifdef CONFIG_DRM_AMDGPU_CIK
-#define FIRMWARE_BONAIRE       "radeon/bonaire_vce.bin"
-#define FIRMWARE_KABINI        "radeon/kabini_vce.bin"
-#define FIRMWARE_KAVERI        "radeon/kaveri_vce.bin"
-#define FIRMWARE_HAWAII        "radeon/hawaii_vce.bin"
-#define FIRMWARE_MULLINS       "radeon/mullins_vce.bin"
+#define FIRMWARE_BONAIRE       "amdgpu/bonaire_vce.bin"
+#define FIRMWARE_KABINI        "amdgpu/kabini_vce.bin"
+#define FIRMWARE_KAVERI        "amdgpu/kaveri_vce.bin"
+#define FIRMWARE_HAWAII        "amdgpu/hawaii_vce.bin"
+#define FIRMWARE_MULLINS       "amdgpu/mullins_vce.bin"
 #endif
 #define FIRMWARE_TONGA         "amdgpu/tonga_vce.bin"
 #define FIRMWARE_CARRIZO       "amdgpu/carrizo_vce.bin"
index 7c4ff71e7476ede9e760d08992ee30547bda0842..d79ad93b01c32e3b389c73c3c276194c26131105 100644 (file)
 #include "gmc/gmc_7_1_d.h"
 #include "gmc/gmc_7_1_sh_mask.h"
 
-MODULE_FIRMWARE("radeon/bonaire_smc.bin");
-MODULE_FIRMWARE("radeon/bonaire_k_smc.bin");
-MODULE_FIRMWARE("radeon/hawaii_smc.bin");
-MODULE_FIRMWARE("radeon/hawaii_k_smc.bin");
+MODULE_FIRMWARE("amdgpu/bonaire_smc.bin");
+MODULE_FIRMWARE("amdgpu/bonaire_k_smc.bin");
+MODULE_FIRMWARE("amdgpu/hawaii_smc.bin");
+MODULE_FIRMWARE("amdgpu/hawaii_k_smc.bin");
 
 #define MC_CG_ARB_FREQ_F0           0x0a
 #define MC_CG_ARB_FREQ_F1           0x0b
@@ -5815,7 +5815,7 @@ static int ci_dpm_init_microcode(struct amdgpu_device *adev)
        default: BUG();
        }
 
-       snprintf(fw_name, sizeof(fw_name), "radeon/%s_smc.bin", chip_name);
+       snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_smc.bin", chip_name);
        err = request_firmware(&adev->pm.fw, fw_name, adev->dev);
        if (err)
                goto out;
index dbd553a8d584230f7a58f959d6f0b37e8f1c7353..d0fa2aac238884630eba999d325b2e7d9e384504 100644 (file)
@@ -54,16 +54,16 @@ static void cik_sdma_set_buffer_funcs(struct amdgpu_device *adev);
 static void cik_sdma_set_vm_pte_funcs(struct amdgpu_device *adev);
 static int cik_sdma_soft_reset(void *handle);
 
-MODULE_FIRMWARE("radeon/bonaire_sdma.bin");
-MODULE_FIRMWARE("radeon/bonaire_sdma1.bin");
-MODULE_FIRMWARE("radeon/hawaii_sdma.bin");
-MODULE_FIRMWARE("radeon/hawaii_sdma1.bin");
-MODULE_FIRMWARE("radeon/kaveri_sdma.bin");
-MODULE_FIRMWARE("radeon/kaveri_sdma1.bin");
-MODULE_FIRMWARE("radeon/kabini_sdma.bin");
-MODULE_FIRMWARE("radeon/kabini_sdma1.bin");
-MODULE_FIRMWARE("radeon/mullins_sdma.bin");
-MODULE_FIRMWARE("radeon/mullins_sdma1.bin");
+MODULE_FIRMWARE("amdgpu/bonaire_sdma.bin");
+MODULE_FIRMWARE("amdgpu/bonaire_sdma1.bin");
+MODULE_FIRMWARE("amdgpu/hawaii_sdma.bin");
+MODULE_FIRMWARE("amdgpu/hawaii_sdma1.bin");
+MODULE_FIRMWARE("amdgpu/kaveri_sdma.bin");
+MODULE_FIRMWARE("amdgpu/kaveri_sdma1.bin");
+MODULE_FIRMWARE("amdgpu/kabini_sdma.bin");
+MODULE_FIRMWARE("amdgpu/kabini_sdma1.bin");
+MODULE_FIRMWARE("amdgpu/mullins_sdma.bin");
+MODULE_FIRMWARE("amdgpu/mullins_sdma1.bin");
 
 u32 amdgpu_cik_gpu_check_soft_reset(struct amdgpu_device *adev);
 
@@ -132,9 +132,9 @@ static int cik_sdma_init_microcode(struct amdgpu_device *adev)
 
        for (i = 0; i < adev->sdma.num_instances; i++) {
                if (i == 0)
-                       snprintf(fw_name, sizeof(fw_name), "radeon/%s_sdma.bin", chip_name);
+                       snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_sdma.bin", chip_name);
                else
-                       snprintf(fw_name, sizeof(fw_name), "radeon/%s_sdma1.bin", chip_name);
+                       snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_sdma1.bin", chip_name);
                err = request_firmware(&adev->sdma.instance[i].fw, fw_name, adev->dev);
                if (err)
                        goto out;
index 42b6144c1fd59c3e10724c4806c7eff04ce8eca9..95452c5a9df6ea6c0bea0ca817bcd57cf68fa057 100644 (file)
@@ -57,36 +57,36 @@ static void gfx_v7_0_set_ring_funcs(struct amdgpu_device *adev);
 static void gfx_v7_0_set_irq_funcs(struct amdgpu_device *adev);
 static void gfx_v7_0_set_gds_init(struct amdgpu_device *adev);
 
-MODULE_FIRMWARE("radeon/bonaire_pfp.bin");
-MODULE_FIRMWARE("radeon/bonaire_me.bin");
-MODULE_FIRMWARE("radeon/bonaire_ce.bin");
-MODULE_FIRMWARE("radeon/bonaire_rlc.bin");
-MODULE_FIRMWARE("radeon/bonaire_mec.bin");
-
-MODULE_FIRMWARE("radeon/hawaii_pfp.bin");
-MODULE_FIRMWARE("radeon/hawaii_me.bin");
-MODULE_FIRMWARE("radeon/hawaii_ce.bin");
-MODULE_FIRMWARE("radeon/hawaii_rlc.bin");
-MODULE_FIRMWARE("radeon/hawaii_mec.bin");
-
-MODULE_FIRMWARE("radeon/kaveri_pfp.bin");
-MODULE_FIRMWARE("radeon/kaveri_me.bin");
-MODULE_FIRMWARE("radeon/kaveri_ce.bin");
-MODULE_FIRMWARE("radeon/kaveri_rlc.bin");
-MODULE_FIRMWARE("radeon/kaveri_mec.bin");
-MODULE_FIRMWARE("radeon/kaveri_mec2.bin");
-
-MODULE_FIRMWARE("radeon/kabini_pfp.bin");
-MODULE_FIRMWARE("radeon/kabini_me.bin");
-MODULE_FIRMWARE("radeon/kabini_ce.bin");
-MODULE_FIRMWARE("radeon/kabini_rlc.bin");
-MODULE_FIRMWARE("radeon/kabini_mec.bin");
-
-MODULE_FIRMWARE("radeon/mullins_pfp.bin");
-MODULE_FIRMWARE("radeon/mullins_me.bin");
-MODULE_FIRMWARE("radeon/mullins_ce.bin");
-MODULE_FIRMWARE("radeon/mullins_rlc.bin");
-MODULE_FIRMWARE("radeon/mullins_mec.bin");
+MODULE_FIRMWARE("amdgpu/bonaire_pfp.bin");
+MODULE_FIRMWARE("amdgpu/bonaire_me.bin");
+MODULE_FIRMWARE("amdgpu/bonaire_ce.bin");
+MODULE_FIRMWARE("amdgpu/bonaire_rlc.bin");
+MODULE_FIRMWARE("amdgpu/bonaire_mec.bin");
+
+MODULE_FIRMWARE("amdgpu/hawaii_pfp.bin");
+MODULE_FIRMWARE("amdgpu/hawaii_me.bin");
+MODULE_FIRMWARE("amdgpu/hawaii_ce.bin");
+MODULE_FIRMWARE("amdgpu/hawaii_rlc.bin");
+MODULE_FIRMWARE("amdgpu/hawaii_mec.bin");
+
+MODULE_FIRMWARE("amdgpu/kaveri_pfp.bin");
+MODULE_FIRMWARE("amdgpu/kaveri_me.bin");
+MODULE_FIRMWARE("amdgpu/kaveri_ce.bin");
+MODULE_FIRMWARE("amdgpu/kaveri_rlc.bin");
+MODULE_FIRMWARE("amdgpu/kaveri_mec.bin");
+MODULE_FIRMWARE("amdgpu/kaveri_mec2.bin");
+
+MODULE_FIRMWARE("amdgpu/kabini_pfp.bin");
+MODULE_FIRMWARE("amdgpu/kabini_me.bin");
+MODULE_FIRMWARE("amdgpu/kabini_ce.bin");
+MODULE_FIRMWARE("amdgpu/kabini_rlc.bin");
+MODULE_FIRMWARE("amdgpu/kabini_mec.bin");
+
+MODULE_FIRMWARE("amdgpu/mullins_pfp.bin");
+MODULE_FIRMWARE("amdgpu/mullins_me.bin");
+MODULE_FIRMWARE("amdgpu/mullins_ce.bin");
+MODULE_FIRMWARE("amdgpu/mullins_rlc.bin");
+MODULE_FIRMWARE("amdgpu/mullins_mec.bin");
 
 static const struct amdgpu_gds_reg_offset amdgpu_gds_reg_offset[] =
 {
@@ -925,7 +925,7 @@ static int gfx_v7_0_init_microcode(struct amdgpu_device *adev)
        default: BUG();
        }
 
-       snprintf(fw_name, sizeof(fw_name), "radeon/%s_pfp.bin", chip_name);
+       snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_pfp.bin", chip_name);
        err = request_firmware(&adev->gfx.pfp_fw, fw_name, adev->dev);
        if (err)
                goto out;
@@ -933,7 +933,7 @@ static int gfx_v7_0_init_microcode(struct amdgpu_device *adev)
        if (err)
                goto out;
 
-       snprintf(fw_name, sizeof(fw_name), "radeon/%s_me.bin", chip_name);
+       snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_me.bin", chip_name);
        err = request_firmware(&adev->gfx.me_fw, fw_name, adev->dev);
        if (err)
                goto out;
@@ -941,7 +941,7 @@ static int gfx_v7_0_init_microcode(struct amdgpu_device *adev)
        if (err)
                goto out;
 
-       snprintf(fw_name, sizeof(fw_name), "radeon/%s_ce.bin", chip_name);
+       snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_ce.bin", chip_name);
        err = request_firmware(&adev->gfx.ce_fw, fw_name, adev->dev);
        if (err)
                goto out;
@@ -949,7 +949,7 @@ static int gfx_v7_0_init_microcode(struct amdgpu_device *adev)
        if (err)
                goto out;
 
-       snprintf(fw_name, sizeof(fw_name), "radeon/%s_mec.bin", chip_name);
+       snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mec.bin", chip_name);
        err = request_firmware(&adev->gfx.mec_fw, fw_name, adev->dev);
        if (err)
                goto out;
@@ -958,7 +958,7 @@ static int gfx_v7_0_init_microcode(struct amdgpu_device *adev)
                goto out;
 
        if (adev->asic_type == CHIP_KAVERI) {
-               snprintf(fw_name, sizeof(fw_name), "radeon/%s_mec2.bin", chip_name);
+               snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mec2.bin", chip_name);
                err = request_firmware(&adev->gfx.mec2_fw, fw_name, adev->dev);
                if (err)
                        goto out;
@@ -967,7 +967,7 @@ static int gfx_v7_0_init_microcode(struct amdgpu_device *adev)
                        goto out;
        }
 
-       snprintf(fw_name, sizeof(fw_name), "radeon/%s_rlc.bin", chip_name);
+       snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_rlc.bin", chip_name);
        err = request_firmware(&adev->gfx.rlc_fw, fw_name, adev->dev);
        if (err)
                goto out;
index 7147bfe25a2343beebec49cdfe1813a808328395..78339309a00c684d47426fb66c2b2f6c73894bc9 100644 (file)
@@ -47,8 +47,8 @@ static void gmc_v7_0_set_gmc_funcs(struct amdgpu_device *adev);
 static void gmc_v7_0_set_irq_funcs(struct amdgpu_device *adev);
 static int gmc_v7_0_wait_for_idle(void *handle);
 
-MODULE_FIRMWARE("radeon/bonaire_mc.bin");
-MODULE_FIRMWARE("radeon/hawaii_mc.bin");
+MODULE_FIRMWARE("amdgpu/bonaire_mc.bin");
+MODULE_FIRMWARE("amdgpu/hawaii_mc.bin");
 MODULE_FIRMWARE("amdgpu/topaz_mc.bin");
 
 static const u32 golden_settings_iceland_a11[] =
@@ -147,10 +147,7 @@ static int gmc_v7_0_init_microcode(struct amdgpu_device *adev)
        default: BUG();
        }
 
-       if (adev->asic_type == CHIP_TOPAZ)
-               snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mc.bin", chip_name);
-       else
-               snprintf(fw_name, sizeof(fw_name), "radeon/%s_mc.bin", chip_name);
+       snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mc.bin", chip_name);
 
        err = request_firmware(&adev->gmc.fw, fw_name, adev->dev);
        if (err)