Commit 77e82094 authored by Alex Deucher's avatar Alex Deucher Committed by Greg Kroah-Hartman

drm/radeon/si: load special ucode for certain MC configs


[ Upstream commit ef736d39 ]

Special MC ucode is required for these memory configurations.
Acked-by: default avatarEdward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4ae8dc6a
...@@ -115,6 +115,8 @@ MODULE_FIRMWARE("radeon/hainan_rlc.bin"); ...@@ -115,6 +115,8 @@ MODULE_FIRMWARE("radeon/hainan_rlc.bin");
MODULE_FIRMWARE("radeon/hainan_smc.bin"); MODULE_FIRMWARE("radeon/hainan_smc.bin");
MODULE_FIRMWARE("radeon/hainan_k_smc.bin"); MODULE_FIRMWARE("radeon/hainan_k_smc.bin");
MODULE_FIRMWARE("radeon/si58_mc.bin");
static u32 si_get_cu_active_bitmap(struct radeon_device *rdev, u32 se, u32 sh); static u32 si_get_cu_active_bitmap(struct radeon_device *rdev, u32 se, u32 sh);
static void si_pcie_gen3_enable(struct radeon_device *rdev); static void si_pcie_gen3_enable(struct radeon_device *rdev);
static void si_program_aspm(struct radeon_device *rdev); static void si_program_aspm(struct radeon_device *rdev);
...@@ -1650,6 +1652,7 @@ static int si_init_microcode(struct radeon_device *rdev) ...@@ -1650,6 +1652,7 @@ static int si_init_microcode(struct radeon_device *rdev)
int err; int err;
int new_fw = 0; int new_fw = 0;
bool new_smc = false; bool new_smc = false;
bool si58_fw = false;
DRM_DEBUG("\n"); DRM_DEBUG("\n");
...@@ -1742,6 +1745,10 @@ static int si_init_microcode(struct radeon_device *rdev) ...@@ -1742,6 +1745,10 @@ static int si_init_microcode(struct radeon_device *rdev)
default: BUG(); default: BUG();
} }
/* this memory configuration requires special firmware */
if (((RREG32(MC_SEQ_MISC0) & 0xff000000) >> 24) == 0x58)
si58_fw = true;
DRM_INFO("Loading %s Microcode\n", new_chip_name); DRM_INFO("Loading %s Microcode\n", new_chip_name);
snprintf(fw_name, sizeof(fw_name), "radeon/%s_pfp.bin", new_chip_name); snprintf(fw_name, sizeof(fw_name), "radeon/%s_pfp.bin", new_chip_name);
...@@ -1845,7 +1852,10 @@ static int si_init_microcode(struct radeon_device *rdev) ...@@ -1845,7 +1852,10 @@ static int si_init_microcode(struct radeon_device *rdev)
} }
} }
snprintf(fw_name, sizeof(fw_name), "radeon/%s_mc.bin", new_chip_name); if (si58_fw)
snprintf(fw_name, sizeof(fw_name), "radeon/si58_mc.bin");
else
snprintf(fw_name, sizeof(fw_name), "radeon/%s_mc.bin", new_chip_name);
err = request_firmware(&rdev->mc_fw, fw_name, rdev->dev); err = request_firmware(&rdev->mc_fw, fw_name, rdev->dev);
if (err) { if (err) {
snprintf(fw_name, sizeof(fw_name), "radeon/%s_mc2.bin", chip_name); snprintf(fw_name, sizeof(fw_name), "radeon/%s_mc2.bin", chip_name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment