All of lore.kernel.org
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] drm/amdgpu/display: use blanked rather than plane state for" failed to apply to 5.4-stable tree
@ 2020-06-22 18:06 gregkh
  2020-06-22 21:36 ` Sasha Levin
  0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2020-06-22 18:06 UTC (permalink / raw)
  To: alexander.deucher, nicholas.kazlauskas; +Cc: stable


The patch below does not apply to the 5.4-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 b7f839d292948142eaab77cedd031aad0bfec872 Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexander.deucher@amd.com>
Date: Tue, 2 Jun 2020 17:22:48 -0400
Subject: [PATCH] drm/amdgpu/display: use blanked rather than plane state for
 sync groups

We may end up with no planes set yet, depending on the ordering, but we
should have the proper blanking state which is either handled by either
DPG or TG depending on the hardware generation.  Check both to determine
the proper blanked state.

Bug: https://gitlab.freedesktop.org/drm/amd/issues/781
Fixes: 5fc0cbfad45648 ("drm/amd/display: determine if a pipe is synced by plane state")
Cc: nicholas.kazlauskas@amd.com
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@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.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 45cfb7c45566..b4e2053bca9f 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -1016,9 +1016,17 @@ static void program_timing_sync(
 			}
 		}
 
-		/* set first pipe with plane as master */
+		/* set first unblanked pipe as master */
 		for (j = 0; j < group_size; j++) {
-			if (pipe_set[j]->plane_state) {
+			bool is_blanked;
+
+			if (pipe_set[j]->stream_res.opp->funcs->dpg_is_blanked)
+				is_blanked =
+					pipe_set[j]->stream_res.opp->funcs->dpg_is_blanked(pipe_set[j]->stream_res.opp);
+			else
+				is_blanked =
+					pipe_set[j]->stream_res.tg->funcs->is_blanked(pipe_set[j]->stream_res.tg);
+			if (!is_blanked) {
 				if (j == 0)
 					break;
 
@@ -1039,9 +1047,17 @@ static void program_timing_sync(
 				status->timing_sync_info.master = false;
 
 		}
-		/* remove any other pipes with plane as they have already been synced */
+		/* remove any other unblanked pipes as they have already been synced */
 		for (j = j + 1; j < group_size; j++) {
-			if (pipe_set[j]->plane_state) {
+			bool is_blanked;
+
+			if (pipe_set[j]->stream_res.opp->funcs->dpg_is_blanked)
+				is_blanked =
+					pipe_set[j]->stream_res.opp->funcs->dpg_is_blanked(pipe_set[j]->stream_res.opp);
+			else
+				is_blanked =
+					pipe_set[j]->stream_res.tg->funcs->is_blanked(pipe_set[j]->stream_res.tg);
+			if (!is_blanked) {
 				group_size--;
 				pipe_set[j] = pipe_set[group_size];
 				j--;


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

* Re: FAILED: patch "[PATCH] drm/amdgpu/display: use blanked rather than plane state for" failed to apply to 5.4-stable tree
  2020-06-22 18:06 FAILED: patch "[PATCH] drm/amdgpu/display: use blanked rather than plane state for" failed to apply to 5.4-stable tree gregkh
@ 2020-06-22 21:36 ` Sasha Levin
  2020-06-22 21:58   ` Sasha Levin
  0 siblings, 1 reply; 3+ messages in thread
From: Sasha Levin @ 2020-06-22 21:36 UTC (permalink / raw)
  To: gregkh; +Cc: alexander.deucher, nicholas.kazlauskas, stable

On Mon, Jun 22, 2020 at 08:06:38PM +0200, gregkh@linuxfoundation.org wrote:
>
>The patch below does not apply to the 5.4-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 b7f839d292948142eaab77cedd031aad0bfec872 Mon Sep 17 00:00:00 2001
>From: Alex Deucher <alexander.deucher@amd.com>
>Date: Tue, 2 Jun 2020 17:22:48 -0400
>Subject: [PATCH] drm/amdgpu/display: use blanked rather than plane state for
> sync groups
>
>We may end up with no planes set yet, depending on the ordering, but we
>should have the proper blanking state which is either handled by either
>DPG or TG depending on the hardware generation.  Check both to determine
>the proper blanked state.
>
>Bug: https://gitlab.freedesktop.org/drm/amd/issues/781
>Fixes: 5fc0cbfad45648 ("drm/amd/display: determine if a pipe is synced by plane state")
>Cc: nicholas.kazlauskas@amd.com
>Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>Cc: stable@vger.kernel.org

I've grabbed 34b86b75dfc9 ("drm/amd/display: Use swap() where appropriate") as
a dependency and queued both for 5.4.

-- 
Thanks,
Sasha

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

* Re: FAILED: patch "[PATCH] drm/amdgpu/display: use blanked rather than plane state for" failed to apply to 5.4-stable tree
  2020-06-22 21:36 ` Sasha Levin
@ 2020-06-22 21:58   ` Sasha Levin
  0 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2020-06-22 21:58 UTC (permalink / raw)
  To: gregkh; +Cc: alexander.deucher, nicholas.kazlauskas, stable

On Mon, Jun 22, 2020 at 05:36:02PM -0400, Sasha Levin wrote:
>On Mon, Jun 22, 2020 at 08:06:38PM +0200, gregkh@linuxfoundation.org wrote:
>>
>>The patch below does not apply to the 5.4-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 b7f839d292948142eaab77cedd031aad0bfec872 Mon Sep 17 00:00:00 2001
>>From: Alex Deucher <alexander.deucher@amd.com>
>>Date: Tue, 2 Jun 2020 17:22:48 -0400
>>Subject: [PATCH] drm/amdgpu/display: use blanked rather than plane state for
>>sync groups
>>
>>We may end up with no planes set yet, depending on the ordering, but we
>>should have the proper blanking state which is either handled by either
>>DPG or TG depending on the hardware generation.  Check both to determine
>>the proper blanked state.
>>
>>Bug: https://gitlab.freedesktop.org/drm/amd/issues/781
>>Fixes: 5fc0cbfad45648 ("drm/amd/display: determine if a pipe is synced by plane state")
>>Cc: nicholas.kazlauskas@amd.com
>>Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
>>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>>Cc: stable@vger.kernel.org
>
>I've grabbed 34b86b75dfc9 ("drm/amd/display: Use swap() where appropriate") as
>a dependency and queued both for 5.4.

Nevermind, looks like it also depends on functionality from eb7a74a36c24
("drm/amd/display: Add DCN2 OPP").

-- 
Thanks,
Sasha

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

end of thread, other threads:[~2020-06-22 21:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-22 18:06 FAILED: patch "[PATCH] drm/amdgpu/display: use blanked rather than plane state for" failed to apply to 5.4-stable tree gregkh
2020-06-22 21:36 ` Sasha Levin
2020-06-22 21:58   ` Sasha Levin

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.