* [PATCH 6.1] drm/amd/display: Have Payload Properly Created After Resume
@ 2023-06-02 3:59 Mario Limonciello
2023-06-07 18:08 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Mario Limonciello @ 2023-06-02 3:59 UTC (permalink / raw)
To: stable; +Cc: anson.tsao, Mario Limonciello
From: Fangzhi Zuo <jerry.zuo@amd.com>
At drm suspend sequence, MST dc_sink is removed. When commit cached
MST stream back in drm resume sequence, the MST stream payload is not
properly created and added into the payload table. After resume, topology
change is reprobed by removing existing streams first. That leads to
no payload is found in the existing payload table as below error
"[drm] ERROR No payload for [MST PORT:] found in mst state"
1. In encoder .atomic_check routine, remove check existance of dc_sink
2. Bypass MST by checking existence of MST root port. dc_link_type cannot
differentiate MST port before topology is rediscovered.
Reviewed-by: Wayne Lin <wayne.lin@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
(cherry picked from commit 52b112049e1da404828102ccb5b39e92d40f06d4)
Adjusted for variables that were renamed between 6.1 and 6.3.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
This commit was tagged for stable but didn't apply due to variable
name changes. It's important for MST during suspend/resume so
I did the necessary manual fixups.
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index b46732cefe37..8ab0dd799b3c 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -2763,7 +2763,7 @@ static int dm_resume(void *handle)
* this is the case when traversing through already created
* MST connectors, should be skipped
*/
- if (aconnector->dc_link->type == dc_connection_mst_branch)
+ if (aconnector && aconnector->mst_port)
continue;
mutex_lock(&aconnector->hpd_lock);
@@ -6492,7 +6492,7 @@ static int dm_encoder_helper_atomic_check(struct drm_encoder *encoder,
int clock, bpp = 0;
bool is_y420 = false;
- if (!aconnector->port || !aconnector->dc_sink)
+ if (!aconnector->port)
return 0;
mst_port = aconnector->port;
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 6.1] drm/amd/display: Have Payload Properly Created After Resume
2023-06-02 3:59 [PATCH 6.1] drm/amd/display: Have Payload Properly Created After Resume Mario Limonciello
@ 2023-06-07 18:08 ` Greg KH
2023-06-07 18:25 ` Limonciello, Mario
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2023-06-07 18:08 UTC (permalink / raw)
To: Mario Limonciello; +Cc: stable, anson.tsao
On Thu, Jun 01, 2023 at 10:59:52PM -0500, Mario Limonciello wrote:
> From: Fangzhi Zuo <jerry.zuo@amd.com>
>
> At drm suspend sequence, MST dc_sink is removed. When commit cached
> MST stream back in drm resume sequence, the MST stream payload is not
> properly created and added into the payload table. After resume, topology
> change is reprobed by removing existing streams first. That leads to
> no payload is found in the existing payload table as below error
> "[drm] ERROR No payload for [MST PORT:] found in mst state"
>
> 1. In encoder .atomic_check routine, remove check existance of dc_sink
> 2. Bypass MST by checking existence of MST root port. dc_link_type cannot
> differentiate MST port before topology is rediscovered.
>
> Reviewed-by: Wayne Lin <wayne.lin@amd.com>
> Acked-by: Tom Chung <chiahsuan.chung@amd.com>
> Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com>
> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Cc: stable@vger.kernel.org
> (cherry picked from commit 52b112049e1da404828102ccb5b39e92d40f06d4)
This isn't a commit in Linus's tree, where did it come from?
Do you mean 482e6ad9adde69d9da08864b4ccf4dfd53edb2f0?
I'm guessing so, so I'll use that when I commit this, thanks.
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH 6.1] drm/amd/display: Have Payload Properly Created After Resume
2023-06-07 18:08 ` Greg KH
@ 2023-06-07 18:25 ` Limonciello, Mario
0 siblings, 0 replies; 3+ messages in thread
From: Limonciello, Mario @ 2023-06-07 18:25 UTC (permalink / raw)
To: Greg KH; +Cc: stable@vger.kernel.org, Tsao, Anson
[Public]
> On Thu, Jun 01, 2023 at 10:59:52PM -0500, Mario Limonciello wrote:
> > From: Fangzhi Zuo <jerry.zuo@amd.com>
> >
> > At drm suspend sequence, MST dc_sink is removed. When commit cached
> > MST stream back in drm resume sequence, the MST stream payload is not
> > properly created and added into the payload table. After resume, topology
> > change is reprobed by removing existing streams first. That leads to
> > no payload is found in the existing payload table as below error
> > "[drm] ERROR No payload for [MST PORT:] found in mst state"
> >
> > 1. In encoder .atomic_check routine, remove check existance of dc_sink
> > 2. Bypass MST by checking existence of MST root port. dc_link_type cannot
> > differentiate MST port before topology is rediscovered.
> >
> > Reviewed-by: Wayne Lin <wayne.lin@amd.com>
> > Acked-by: Tom Chung <chiahsuan.chung@amd.com>
> > Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com>
> > Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
> > Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> > Cc: stable@vger.kernel.org
> > (cherry picked from commit
> 52b112049e1da404828102ccb5b39e92d40f06d4)
>
> This isn't a commit in Linus's tree, where did it come from?
>
> Do you mean 482e6ad9adde69d9da08864b4ccf4dfd53edb2f0?
>
> I'm guessing so, so I'll use that when I commit this, thanks.
>
> greg k-h
Weird! I'm not sure how I got that ref right, but my local branch
recognizes both but the wrong one --contains doesn't resolve
to anything. Thanks for correcting it.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-07 18:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-02 3:59 [PATCH 6.1] drm/amd/display: Have Payload Properly Created After Resume Mario Limonciello
2023-06-07 18:08 ` Greg KH
2023-06-07 18:25 ` Limonciello, Mario
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox