All of lore.kernel.org
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] drm/amd/display: Fix ASSR regression on embedded panels" failed to apply to 5.13-stable tree
@ 2021-07-26  9:01 gregkh
  2021-08-02 16:27 ` Deucher, Alexander
  0 siblings, 1 reply; 2+ messages in thread
From: gregkh @ 2021-07-26  9:01 UTC (permalink / raw)
  To: stylon.wang, alexander.deucher; +Cc: stable


The patch below does not apply to the 5.13-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 6be50f5d83adc9541de3d5be26e968182b5ac150 Mon Sep 17 00:00:00 2001
From: Stylon Wang <stylon.wang@amd.com>
Date: Wed, 21 Jul 2021 12:25:24 +0800
Subject: [PATCH] drm/amd/display: Fix ASSR regression on embedded panels

[Why]
Regression found in some embedded panels traces back to the earliest
upstreamed ASSR patch. The changed code flow are causing problems
with some panels.

[How]
- Change ASSR enabling code while preserving original code flow
  as much as possible
- Simplify the code on guarding with internal display flag

Bug: https://bugzilla.kernel.org/show_bug.cgi?id=213779
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1620
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Stylon Wang <stylon.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
index 12066f5a53fc..9fb8c46dc606 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
@@ -1820,8 +1820,7 @@ bool perform_link_training_with_retries(
 					 */
 					panel_mode = DP_PANEL_MODE_DEFAULT;
 				}
-			} else
-				panel_mode = DP_PANEL_MODE_DEFAULT;
+			}
 		}
 #endif
 
@@ -4650,7 +4649,10 @@ enum dp_panel_mode dp_get_panel_mode(struct dc_link *link)
 		}
 	}
 
-	if (link->dpcd_caps.panel_mode_edp) {
+	if (link->dpcd_caps.panel_mode_edp &&
+		(link->connector_signal == SIGNAL_TYPE_EDP ||
+		 (link->connector_signal == SIGNAL_TYPE_DISPLAY_PORT &&
+		  link->is_internal_display))) {
 		return DP_PANEL_MODE_EDP;
 	}
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: FAILED: patch "[PATCH] drm/amd/display: Fix ASSR regression on embedded panels" failed to apply to 5.13-stable tree
  2021-07-26  9:01 FAILED: patch "[PATCH] drm/amd/display: Fix ASSR regression on embedded panels" failed to apply to 5.13-stable tree gregkh
@ 2021-08-02 16:27 ` Deucher, Alexander
  0 siblings, 0 replies; 2+ messages in thread
From: Deucher, Alexander @ 2021-08-02 16:27 UTC (permalink / raw)
  To: gregkh, Wang, Chao-kai (Stylon); +Cc: stable

[-- Attachment #1: Type: text/plain, Size: 3476 bytes --]

[Public]

> -----Original Message-----
> From: gregkh@linuxfoundation.org <gregkh@linuxfoundation.org>
> Sent: Monday, July 26, 2021 5:02 AM
> To: Wang, Chao-kai (Stylon) <Stylon.Wang@amd.com>; Deucher, Alexander
> <Alexander.Deucher@amd.com>
> Cc: stable@vger.kernel.org
> Subject: FAILED: patch "[PATCH] drm/amd/display: Fix ASSR regression on
> embedded panels" failed to apply to 5.13-stable tree
> 
> 
> The patch below does not apply to the 5.13-stable tree.
> If someone wants it applied there, or to any other stable or longterm tree,
> then please email the backport, including the original git commit id to
> <stable@vger.kernel.org>.

Hi Greg, please use the attached backported patch.

Thanks,

Alex

> 
> thanks,
> 
> greg k-h
> 
> ------------------ original commit in Linus's tree ------------------
> 
> From 6be50f5d83adc9541de3d5be26e968182b5ac150 Mon Sep 17 00:00:00
> 2001
> From: Stylon Wang <stylon.wang@amd.com>
> Date: Wed, 21 Jul 2021 12:25:24 +0800
> Subject: [PATCH] drm/amd/display: Fix ASSR regression on embedded
> panels
> 
> [Why]
> Regression found in some embedded panels traces back to the earliest
> upstreamed ASSR patch. The changed code flow are causing problems with
> some panels.
> 
> [How]
> - Change ASSR enabling code while preserving original code flow
>   as much as possible
> - Simplify the code on guarding with internal display flag
> 
> Bug:
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugz
> illa.kernel.org%2Fshow_bug.cgi%3Fid%3D213779&amp;data=04%7C01%7Cal
> exander.deucher%40amd.com%7Ce32d71d4386e4ae8ec0808d950148f5e%7C
> 3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637628871500920897%7
> CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJ
> BTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=wsm8GZ9dxUHah8az
> u3uC%2B%2BeLu5wQiQuVhzwQOqZCnMQ%3D&amp;reserved=0
> Bug:
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitla
> b.freedesktop.org%2Fdrm%2Famd%2F-
> %2Fissues%2F1620&amp;data=04%7C01%7Calexander.deucher%40amd.com
> %7Ce32d71d4386e4ae8ec0808d950148f5e%7C3dd8961fe4884e608e11a82d99
> 4e183d%7C0%7C0%7C637628871500920897%7CUnknown%7CTWFpbGZsb3d8
> eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3
> D%7C1000&amp;sdata=D6bXgLCoPAVutKRagSPfPWw1FTUjY5fa5qSqm38nN
> QM%3D&amp;reserved=0
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Stylon Wang <stylon.wang@amd.com>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Cc: stable@vger.kernel.org
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> index 12066f5a53fc..9fb8c46dc606 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> @@ -1820,8 +1820,7 @@ bool perform_link_training_with_retries(
>  					 */
>  					panel_mode =
> DP_PANEL_MODE_DEFAULT;
>  				}
> -			} else
> -				panel_mode = DP_PANEL_MODE_DEFAULT;
> +			}
>  		}
>  #endif
> 
> @@ -4650,7 +4649,10 @@ enum dp_panel_mode
> dp_get_panel_mode(struct dc_link *link)
>  		}
>  	}
> 
> -	if (link->dpcd_caps.panel_mode_edp) {
> +	if (link->dpcd_caps.panel_mode_edp &&
> +		(link->connector_signal == SIGNAL_TYPE_EDP ||
> +		 (link->connector_signal == SIGNAL_TYPE_DISPLAY_PORT &&
> +		  link->is_internal_display))) {
>  		return DP_PANEL_MODE_EDP;
>  	}
> 

[-- Attachment #2: 0001-drm-amd-display-Fix-ASSR-regression-on-embedded-pane.patch --]
[-- Type: application/octet-stream, Size: 1560 bytes --]

From fbd33a150a3d469f34ff7cef82cbdd9c4484ff1e Mon Sep 17 00:00:00 2001
From: Stylon Wang <stylon.wang@amd.com>
Date: Wed, 21 Jul 2021 12:25:24 +0800
Subject: [PATCH] drm/amd/display: Fix ASSR regression on embedded panels

[Why]
Regression found in some embedded panels traces back to the earliest
upstreamed ASSR patch. The changed code flow are causing problems
with some panels.

[How]
- Change ASSR enabling code while preserving original code flow
  as much as possible
- Simplify the code on guarding with internal display flag

Bug: https://bugzilla.kernel.org/show_bug.cgi?id=213779
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1620
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Stylon Wang <stylon.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
(cherry picked from commit 6be50f5d83adc9541de3d5be26e968182b5ac150)
---
 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
index ae6830ff1cf7..774e825e5aab 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
@@ -1675,9 +1675,6 @@ static enum dp_panel_mode try_enable_assr(struct dc_stream_state *stream)
 	} else
 		panel_mode = DP_PANEL_MODE_DEFAULT;
 
-#else
-	/* turn off ASSR if the implementation is not compiled in */
-	panel_mode = DP_PANEL_MODE_DEFAULT;
 #endif
 	return panel_mode;
 }
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-02 16:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-26  9:01 FAILED: patch "[PATCH] drm/amd/display: Fix ASSR regression on embedded panels" failed to apply to 5.13-stable tree gregkh
2021-08-02 16:27 ` Deucher, Alexander

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.