From daee1c09c5ca45186344d2658e2227cd4e8158da Mon Sep 17 00:00:00 2001 From: Laura Abbott Date: Tue, 17 Jan 2017 10:17:09 -0800 Subject: [PATCH] Add possible ATI fixes --- drm-amdgpu-drop-verde-dpm-quirks.patch | 41 ++++++ ...amdgpu-update-si-kicker-smc-firmware.patch | 110 ++++++++++++++++ drm-radeon-drop-verde-dpm-quirks.patch | 44 +++++++ ...update-smc-firmware-selection-for-si.patch | 124 ++++++++++++++++++ kernel.spec | 11 +- 5 files changed, 329 insertions(+), 1 deletion(-) create mode 100644 drm-amdgpu-drop-verde-dpm-quirks.patch create mode 100644 drm-amdgpu-update-si-kicker-smc-firmware.patch create mode 100644 drm-radeon-drop-verde-dpm-quirks.patch create mode 100644 drm-radeon-update-smc-firmware-selection-for-si.patch diff --git a/drm-amdgpu-drop-verde-dpm-quirks.patch b/drm-amdgpu-drop-verde-dpm-quirks.patch new file mode 100644 index 000000000..92df978cf --- /dev/null +++ b/drm-amdgpu-drop-verde-dpm-quirks.patch @@ -0,0 +1,41 @@ +From 7192c54a68013f6058b1bb505645fcd07015191c Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Thu, 5 Jan 2017 13:02:37 -0500 +Subject: drm/amdgpu: drop verde dpm quirks + +From: Alex Deucher + +commit 7192c54a68013f6058b1bb505645fcd07015191c upstream. + +Port of radeon change to amdgpu. + +Acked-by: Edward O'Callaghan +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/amd/amdgpu/si_dpm.c | 13 ------------- + 1 file changed, 13 deletions(-) + +--- a/drivers/gpu/drm/amd/amdgpu/si_dpm.c ++++ b/drivers/gpu/drm/amd/amdgpu/si_dpm.c +@@ -3485,19 +3485,6 @@ static void si_apply_state_adjust_rules( + (adev->pdev->device == 0x6817) || + (adev->pdev->device == 0x6806)) + max_mclk = 120000; +- } else if (adev->asic_type == CHIP_VERDE) { +- if ((adev->pdev->revision == 0x81) || +- (adev->pdev->revision == 0x83) || +- (adev->pdev->revision == 0x87) || +- (adev->pdev->device == 0x6820) || +- (adev->pdev->device == 0x6821) || +- (adev->pdev->device == 0x6822) || +- (adev->pdev->device == 0x6823) || +- (adev->pdev->device == 0x682A) || +- (adev->pdev->device == 0x682B)) { +- max_sclk = 75000; +- max_mclk = 80000; +- } + } else if (adev->asic_type == CHIP_OLAND) { + if ((adev->pdev->revision == 0xC7) || + (adev->pdev->revision == 0x80) || diff --git a/drm-amdgpu-update-si-kicker-smc-firmware.patch b/drm-amdgpu-update-si-kicker-smc-firmware.patch new file mode 100644 index 000000000..1c0805f4e --- /dev/null +++ b/drm-amdgpu-update-si-kicker-smc-firmware.patch @@ -0,0 +1,110 @@ +From 5165484b02f2cbedb5bf3a41ff5e8ae16069016c Mon Sep 17 00:00:00 2001 +From: Flora Cui +Date: Thu, 15 Dec 2016 13:43:59 +0800 +Subject: drm/amdgpu: update si kicker smc firmware + +From: Flora Cui + +commit 5165484b02f2cbedb5bf3a41ff5e8ae16069016c upstream. + +Use the appropriate smc firmware for each chip revision. +Using the wrong one can cause stability issues. + +Acked-by: Edward O'Callaghan +Signed-off-by: Flora Cui +Reviewed-by: Junwei Zhang +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/amd/amdgpu/si_dpm.c | 57 +++++++++++++++++------------------- + 1 file changed, 28 insertions(+), 29 deletions(-) + +--- a/drivers/gpu/drm/amd/amdgpu/si_dpm.c ++++ b/drivers/gpu/drm/amd/amdgpu/si_dpm.c +@@ -56,7 +56,6 @@ + #define BIOS_SCRATCH_4 0x5cd + + MODULE_FIRMWARE("radeon/tahiti_smc.bin"); +-MODULE_FIRMWARE("radeon/tahiti_k_smc.bin"); + MODULE_FIRMWARE("radeon/pitcairn_smc.bin"); + MODULE_FIRMWARE("radeon/pitcairn_k_smc.bin"); + MODULE_FIRMWARE("radeon/verde_smc.bin"); +@@ -7685,49 +7684,49 @@ static int si_dpm_init_microcode(struct + chip_name = "tahiti"; + break; + case CHIP_PITCAIRN: +- if ((adev->pdev->revision == 0x81) || +- (adev->pdev->device == 0x6810) || +- (adev->pdev->device == 0x6811) || +- (adev->pdev->device == 0x6816) || +- (adev->pdev->device == 0x6817) || +- (adev->pdev->device == 0x6806)) ++ if ((adev->pdev->revision == 0x81) && ++ ((adev->pdev->device == 0x6810) || ++ (adev->pdev->device == 0x6811))) + chip_name = "pitcairn_k"; + else + chip_name = "pitcairn"; + break; + case CHIP_VERDE: +- if ((adev->pdev->revision == 0x81) || +- (adev->pdev->revision == 0x83) || +- (adev->pdev->revision == 0x87) || +- (adev->pdev->device == 0x6820) || +- (adev->pdev->device == 0x6821) || +- (adev->pdev->device == 0x6822) || +- (adev->pdev->device == 0x6823) || +- (adev->pdev->device == 0x682A) || +- (adev->pdev->device == 0x682B)) ++ if (((adev->pdev->device == 0x6820) && ++ ((adev->pdev->revision == 0x81) || ++ (adev->pdev->revision == 0x83))) || ++ ((adev->pdev->device == 0x6821) && ++ ((adev->pdev->revision == 0x83) || ++ (adev->pdev->revision == 0x87))) || ++ ((adev->pdev->revision == 0x87) && ++ ((adev->pdev->device == 0x6823) || ++ (adev->pdev->device == 0x682b)))) + chip_name = "verde_k"; + else + chip_name = "verde"; + break; + case CHIP_OLAND: +- if ((adev->pdev->revision == 0xC7) || +- (adev->pdev->revision == 0x80) || +- (adev->pdev->revision == 0x81) || +- (adev->pdev->revision == 0x83) || +- (adev->pdev->revision == 0x87) || +- (adev->pdev->device == 0x6604) || +- (adev->pdev->device == 0x6605)) ++ if (((adev->pdev->revision == 0x81) && ++ ((adev->pdev->device == 0x6600) || ++ (adev->pdev->device == 0x6604) || ++ (adev->pdev->device == 0x6605) || ++ (adev->pdev->device == 0x6610))) || ++ ((adev->pdev->revision == 0x83) && ++ (adev->pdev->device == 0x6610))) + chip_name = "oland_k"; + else + chip_name = "oland"; + break; + case CHIP_HAINAN: +- if ((adev->pdev->revision == 0x81) || +- (adev->pdev->revision == 0x83) || +- (adev->pdev->revision == 0xC3) || +- (adev->pdev->device == 0x6664) || +- (adev->pdev->device == 0x6665) || +- (adev->pdev->device == 0x6667)) ++ if (((adev->pdev->revision == 0x81) && ++ (adev->pdev->device == 0x6660)) || ++ ((adev->pdev->revision == 0x83) && ++ ((adev->pdev->device == 0x6660) || ++ (adev->pdev->device == 0x6663) || ++ (adev->pdev->device == 0x6665) || ++ (adev->pdev->device == 0x6667))) || ++ ((adev->pdev->revision == 0xc3) && ++ (adev->pdev->device == 0x6665))) + chip_name = "hainan_k"; + else + chip_name = "hainan"; diff --git a/drm-radeon-drop-verde-dpm-quirks.patch b/drm-radeon-drop-verde-dpm-quirks.patch new file mode 100644 index 000000000..ea736b2a1 --- /dev/null +++ b/drm-radeon-drop-verde-dpm-quirks.patch @@ -0,0 +1,44 @@ +From 8a08403bcb39f5d0e733bcf59a8a74f16b538f6e Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Thu, 5 Jan 2017 12:39:01 -0500 +Subject: drm/radeon: drop verde dpm quirks + +From: Alex Deucher + +commit 8a08403bcb39f5d0e733bcf59a8a74f16b538f6e upstream. + +fixes: +https://bugs.freedesktop.org/show_bug.cgi?id=98897 +https://bugs.launchpad.net/bugs/1651981 + +Acked-by: Edward O'Callaghan +Signed-off-by: Alex Deucher +Cc: Adrian Fiergolski +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/si_dpm.c | 13 ------------- + 1 file changed, 13 deletions(-) + +--- a/drivers/gpu/drm/radeon/si_dpm.c ++++ b/drivers/gpu/drm/radeon/si_dpm.c +@@ -3008,19 +3008,6 @@ static void si_apply_state_adjust_rules( + (rdev->pdev->device == 0x6817) || + (rdev->pdev->device == 0x6806)) + max_mclk = 120000; +- } else if (rdev->family == CHIP_VERDE) { +- if ((rdev->pdev->revision == 0x81) || +- (rdev->pdev->revision == 0x83) || +- (rdev->pdev->revision == 0x87) || +- (rdev->pdev->device == 0x6820) || +- (rdev->pdev->device == 0x6821) || +- (rdev->pdev->device == 0x6822) || +- (rdev->pdev->device == 0x6823) || +- (rdev->pdev->device == 0x682A) || +- (rdev->pdev->device == 0x682B)) { +- max_sclk = 75000; +- max_mclk = 80000; +- } + } else if (rdev->family == CHIP_OLAND) { + if ((rdev->pdev->revision == 0xC7) || + (rdev->pdev->revision == 0x80) || diff --git a/drm-radeon-update-smc-firmware-selection-for-si.patch b/drm-radeon-update-smc-firmware-selection-for-si.patch new file mode 100644 index 000000000..ad115ef05 --- /dev/null +++ b/drm-radeon-update-smc-firmware-selection-for-si.patch @@ -0,0 +1,124 @@ +From 6458bd4dfd9414cba5804eb9907fe2a824278c34 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Thu, 5 Jan 2017 12:15:52 -0500 +Subject: drm/radeon: update smc firmware selection for SI + +From: Alex Deucher + +commit 6458bd4dfd9414cba5804eb9907fe2a824278c34 upstream. + +Use the appropriate smc firmware for each chip revision. +Using the wrong one can cause stability issues. + +Acked-by: Edward O'Callaghan +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/si.c | 60 ++++++++++++++++++++------------------------ + 1 file changed, 28 insertions(+), 32 deletions(-) + +--- a/drivers/gpu/drm/radeon/si.c ++++ b/drivers/gpu/drm/radeon/si.c +@@ -50,7 +50,6 @@ MODULE_FIRMWARE("radeon/tahiti_ce.bin"); + MODULE_FIRMWARE("radeon/tahiti_mc.bin"); + MODULE_FIRMWARE("radeon/tahiti_rlc.bin"); + MODULE_FIRMWARE("radeon/tahiti_smc.bin"); +-MODULE_FIRMWARE("radeon/tahiti_k_smc.bin"); + + MODULE_FIRMWARE("radeon/PITCAIRN_pfp.bin"); + MODULE_FIRMWARE("radeon/PITCAIRN_me.bin"); +@@ -1657,9 +1656,6 @@ static int si_init_microcode(struct rade + switch (rdev->family) { + case CHIP_TAHITI: + chip_name = "TAHITI"; +- /* XXX: figure out which Tahitis need the new ucode */ +- if (0) +- new_smc = true; + new_chip_name = "tahiti"; + pfp_req_size = SI_PFP_UCODE_SIZE * 4; + me_req_size = SI_PM4_UCODE_SIZE * 4; +@@ -1671,12 +1667,9 @@ static int si_init_microcode(struct rade + break; + case CHIP_PITCAIRN: + chip_name = "PITCAIRN"; +- if ((rdev->pdev->revision == 0x81) || +- (rdev->pdev->device == 0x6810) || +- (rdev->pdev->device == 0x6811) || +- (rdev->pdev->device == 0x6816) || +- (rdev->pdev->device == 0x6817) || +- (rdev->pdev->device == 0x6806)) ++ if ((rdev->pdev->revision == 0x81) && ++ ((rdev->pdev->device == 0x6810) || ++ (rdev->pdev->device == 0x6811))) + new_smc = true; + new_chip_name = "pitcairn"; + pfp_req_size = SI_PFP_UCODE_SIZE * 4; +@@ -1689,15 +1682,15 @@ static int si_init_microcode(struct rade + break; + case CHIP_VERDE: + chip_name = "VERDE"; +- if ((rdev->pdev->revision == 0x81) || +- (rdev->pdev->revision == 0x83) || +- (rdev->pdev->revision == 0x87) || +- (rdev->pdev->device == 0x6820) || +- (rdev->pdev->device == 0x6821) || +- (rdev->pdev->device == 0x6822) || +- (rdev->pdev->device == 0x6823) || +- (rdev->pdev->device == 0x682A) || +- (rdev->pdev->device == 0x682B)) ++ if (((rdev->pdev->device == 0x6820) && ++ ((rdev->pdev->revision == 0x81) || ++ (rdev->pdev->revision == 0x83))) || ++ ((rdev->pdev->device == 0x6821) && ++ ((rdev->pdev->revision == 0x83) || ++ (rdev->pdev->revision == 0x87))) || ++ ((rdev->pdev->revision == 0x87) && ++ ((rdev->pdev->device == 0x6823) || ++ (rdev->pdev->device == 0x682b)))) + new_smc = true; + new_chip_name = "verde"; + pfp_req_size = SI_PFP_UCODE_SIZE * 4; +@@ -1710,13 +1703,13 @@ static int si_init_microcode(struct rade + break; + case CHIP_OLAND: + chip_name = "OLAND"; +- if ((rdev->pdev->revision == 0xC7) || +- (rdev->pdev->revision == 0x80) || +- (rdev->pdev->revision == 0x81) || +- (rdev->pdev->revision == 0x83) || +- (rdev->pdev->revision == 0x87) || +- (rdev->pdev->device == 0x6604) || +- (rdev->pdev->device == 0x6605)) ++ if (((rdev->pdev->revision == 0x81) && ++ ((rdev->pdev->device == 0x6600) || ++ (rdev->pdev->device == 0x6604) || ++ (rdev->pdev->device == 0x6605) || ++ (rdev->pdev->device == 0x6610))) || ++ ((rdev->pdev->revision == 0x83) && ++ (rdev->pdev->device == 0x6610))) + new_smc = true; + new_chip_name = "oland"; + pfp_req_size = SI_PFP_UCODE_SIZE * 4; +@@ -1728,12 +1721,15 @@ static int si_init_microcode(struct rade + break; + case CHIP_HAINAN: + chip_name = "HAINAN"; +- if ((rdev->pdev->revision == 0x81) || +- (rdev->pdev->revision == 0x83) || +- (rdev->pdev->revision == 0xC3) || +- (rdev->pdev->device == 0x6664) || +- (rdev->pdev->device == 0x6665) || +- (rdev->pdev->device == 0x6667)) ++ if (((rdev->pdev->revision == 0x81) && ++ (rdev->pdev->device == 0x6660)) || ++ ((rdev->pdev->revision == 0x83) && ++ ((rdev->pdev->device == 0x6660) || ++ (rdev->pdev->device == 0x6663) || ++ (rdev->pdev->device == 0x6665) || ++ (rdev->pdev->device == 0x6667))) || ++ ((rdev->pdev->revision == 0xc3) && ++ (rdev->pdev->device == 0x6665))) + new_smc = true; + new_chip_name = "hainan"; + pfp_req_size = SI_PFP_UCODE_SIZE * 4; diff --git a/kernel.spec b/kernel.spec index 3dc3b47f0..6b4f2bd77 100644 --- a/kernel.spec +++ b/kernel.spec @@ -42,7 +42,7 @@ Summary: The Linux kernel # For non-released -rc kernels, this will be appended after the rcX and # gitX tags, so a 3 here would become part of release "0.rcX.gitX.3" # -%global baserelease 200 +%global baserelease 201 %global fedora_build %{baserelease} # base_sublevel is the kernel version we're starting with and patching @@ -634,6 +634,12 @@ Patch851: selinux-namespace-fix.patch #rhbz 1390308 Patch852: nouveau-add-maxwell-to-backlight-init.patch +# Possible ATI fixes? +Patch853: drm-amdgpu-drop-verde-dpm-quirks.patch +Patch854: drm-amdgpu-update-si-kicker-smc-firmware.patch +Patch855: drm-radeon-drop-verde-dpm-quirks.patch +Patch856: drm-radeon-update-smc-firmware-selection-for-si.patch + # END OF PATCH DEFINITIONS %endif @@ -2181,6 +2187,9 @@ fi # # %changelog +* Tue Jan 17 2017 Laura Abbott - 4.9.4-201 +- Add possible ATI fixes + * Mon Jan 16 2017 Laura Abbott - 4.9.4-200 - Linux v4.9.4