From 88d0e2482e6603da91d132e8c257a665ab657f28 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 15 Nov 2021 17:16:40 +0100 Subject: [PATCH] 5.15-stable patches added patches: drm-amd-display-look-at-firmware-version-to-determine-using-dmub-on-dcn21.patch --- ...ion-to-determine-using-dmub-on-dcn21.patch | 50 +++++++++++++++++++ queue-5.15/series | 1 + 2 files changed, 51 insertions(+) create mode 100644 queue-5.15/drm-amd-display-look-at-firmware-version-to-determine-using-dmub-on-dcn21.patch diff --git a/queue-5.15/drm-amd-display-look-at-firmware-version-to-determine-using-dmub-on-dcn21.patch b/queue-5.15/drm-amd-display-look-at-firmware-version-to-determine-using-dmub-on-dcn21.patch new file mode 100644 index 00000000000..df9c4021120 --- /dev/null +++ b/queue-5.15/drm-amd-display-look-at-firmware-version-to-determine-using-dmub-on-dcn21.patch @@ -0,0 +1,50 @@ +From 91adec9e07097e538691daed5d934e7886dd1dc3 Mon Sep 17 00:00:00 2001 +From: Mario Limonciello +Date: Tue, 2 Nov 2021 10:04:37 -0500 +Subject: drm/amd/display: Look at firmware version to determine using dmub on dcn21 + +From: Mario Limonciello + +commit 91adec9e07097e538691daed5d934e7886dd1dc3 upstream. + +commit 652de07addd2 ("drm/amd/display: Fully switch to dmub for all dcn21 +asics") switched over to using dmub on Renoir to fix Gitlab 1735, but this +implied a new dependency on newer firmware which might not be met on older +kernel versions. + +Since sw_init runs before hw_init, there is an opportunity to determine +whether or not the firmware version is new to adjust the behavior. + +Cc: Roman.Li@amd.com +BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1772 +BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1735 +Fixes: 652de07addd2 ("drm/amd/display: Fully switch to dmub for all dcn21 asics") +Signed-off-by: Mario Limonciello +Acked-by: Alex Deucher +Reviewed-by: Roman Li +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c ++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +@@ -1141,8 +1141,15 @@ static int amdgpu_dm_init(struct amdgpu_ + case CHIP_RAVEN: + case CHIP_RENOIR: + init_data.flags.gpu_vm_support = true; +- if (ASICREV_IS_GREEN_SARDINE(adev->external_rev_id)) ++ switch (adev->dm.dmcub_fw_version) { ++ case 0: /* development */ ++ case 0x1: /* linux-firmware.git hash 6d9f399 */ ++ case 0x01000000: /* linux-firmware.git hash 9a0b0f4 */ ++ init_data.flags.disable_dmcu = false; ++ break; ++ default: + init_data.flags.disable_dmcu = true; ++ } + break; + case CHIP_VANGOGH: + case CHIP_YELLOW_CARP: diff --git a/queue-5.15/series b/queue-5.15/series index 6a836682d66..047467fdbcf 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -914,3 +914,4 @@ drm-sun4i-fix-macros-in-sun8i_csc.h.patch pci-add-pci_exp_devctl_payload_-macros.patch pci-aardvark-fix-pcie-max-payload-size-setting.patch sunrpc-partial-revert-of-commit-6f9f17287e78.patch +drm-amd-display-look-at-firmware-version-to-determine-using-dmub-on-dcn21.patch -- 2.47.2