mbox series

[SRU,J/K/OEM-5.19,0/3] Fix resume on AMD platforms when TBT monitor is plugged

Message ID 20220927065958.269033-1-kai.heng.feng@canonical.com
Headers show
Series [J,1/3] Revert "drm/amd/display: Add helper for blanking all dp displays" | expand

Message

Kai-Heng Feng Sept. 27, 2022, 6:59 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1990920

[Impact]
When TBT monitor is connected to AMD platform, system resume will hit
stack corruption or BUG_ON() macro.

[Fix]
Revert the offending commit and handle MST properly.

[Test]
The system can resume normally and no more kernel splat.

[Where problems could occur]
The new logic is restriced to MST hub, so normal DP/HDMI usage should be
unaffected.

Kai-Heng Feng (1):
  Revert "drm/amd/display: Add helper for blanking all dp displays"

Wayne Lin (2):
  drm/amd/display: Detect dpcd_rev when hotplug mst monitor
  drm/amd/display: Release remote dc_sink under mst scenario

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  5 +-
 .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 18 +----
 .../display/amdgpu_dm/amdgpu_dm_mst_types.c   | 72 +++++++++++++++++--
 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 45 ------------
 drivers/gpu/drm/amd/display/dc/dc_link.h      |  1 -
 .../display/dc/dce110/dce110_hw_sequencer.c   | 13 +++-
 .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 41 ++++++++++-
 .../drm/amd/display/dc/dcn30/dcn30_hwseq.c    | 39 +++++++++-
 .../drm/amd/display/dc/dcn31/dcn31_hwseq.c    | 37 +++++++++-
 9 files changed, 192 insertions(+), 79 deletions(-)

Comments

Timo Aaltonen Sept. 27, 2022, 8:12 a.m. UTC | #1
Kai-Heng Feng kirjoitti 27.9.2022 klo 9.59:
> BugLink: https://bugs.launchpad.net/bugs/1990920
> 
> [Impact]
> When TBT monitor is connected to AMD platform, system resume will hit
> stack corruption or BUG_ON() macro.
> 
> [Fix]
> Revert the offending commit and handle MST properly.
> 
> [Test]
> The system can resume normally and no more kernel splat.
> 
> [Where problems could occur]
> The new logic is restriced to MST hub, so normal DP/HDMI usage should be
> unaffected.
> 
> Kai-Heng Feng (1):
>    Revert "drm/amd/display: Add helper for blanking all dp displays"
> 
> Wayne Lin (2):
>    drm/amd/display: Detect dpcd_rev when hotplug mst monitor
>    drm/amd/display: Release remote dc_sink under mst scenario
> 
>   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  5 +-
>   .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 18 +----
>   .../display/amdgpu_dm/amdgpu_dm_mst_types.c   | 72 +++++++++++++++++--
>   drivers/gpu/drm/amd/display/dc/core/dc_link.c | 45 ------------
>   drivers/gpu/drm/amd/display/dc/dc_link.h      |  1 -
>   .../display/dc/dce110/dce110_hw_sequencer.c   | 13 +++-
>   .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 41 ++++++++++-
>   .../drm/amd/display/dc/dcn30/dcn30_hwseq.c    | 39 +++++++++-
>   .../drm/amd/display/dc/dcn31/dcn31_hwseq.c    | 37 +++++++++-
>   9 files changed, 192 insertions(+), 79 deletions(-)
> 

applied to oem-5.17, thanks

(careful with the topic :)
Thadeu Lima de Souza Cascardo Sept. 27, 2022, 11:29 a.m. UTC | #2
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Tim Gardner Sept. 27, 2022, 12:29 p.m. UTC | #3
On 9/27/22 00:59, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/1990920
> 
> [Impact]
> When TBT monitor is connected to AMD platform, system resume will hit
> stack corruption or BUG_ON() macro.
> 
> [Fix]
> Revert the offending commit and handle MST properly.
> 
> [Test]
> The system can resume normally and no more kernel splat.
> 
> [Where problems could occur]
> The new logic is restriced to MST hub, so normal DP/HDMI usage should be
> unaffected.
> 
> Kai-Heng Feng (1):
>    Revert "drm/amd/display: Add helper for blanking all dp displays"
> 
> Wayne Lin (2):
>    drm/amd/display: Detect dpcd_rev when hotplug mst monitor
>    drm/amd/display: Release remote dc_sink under mst scenario
> 
>   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  5 +-
>   .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 18 +----
>   .../display/amdgpu_dm/amdgpu_dm_mst_types.c   | 72 +++++++++++++++++--
>   drivers/gpu/drm/amd/display/dc/core/dc_link.c | 45 ------------
>   drivers/gpu/drm/amd/display/dc/dc_link.h      |  1 -
>   .../display/dc/dce110/dce110_hw_sequencer.c   | 13 +++-
>   .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 41 ++++++++++-
>   .../drm/amd/display/dc/dcn30/dcn30_hwseq.c    | 39 +++++++++-
>   .../drm/amd/display/dc/dcn31/dcn31_hwseq.c    | 37 +++++++++-
>   9 files changed, 192 insertions(+), 79 deletions(-)
> 
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Stefan Bader Sept. 28, 2022, 8:37 a.m. UTC | #4
On 27.09.22 10:12, Timo Aaltonen wrote:
> Kai-Heng Feng kirjoitti 27.9.2022 klo 9.59:
>> BugLink: https://bugs.launchpad.net/bugs/1990920
>>
>> [Impact]
>> When TBT monitor is connected to AMD platform, system resume will hit
>> stack corruption or BUG_ON() macro.
>>
>> [Fix]
>> Revert the offending commit and handle MST properly.
>>
>> [Test]
>> The system can resume normally and no more kernel splat.
>>
>> [Where problems could occur]
>> The new logic is restriced to MST hub, so normal DP/HDMI usage should be
>> unaffected.
>>
>> Kai-Heng Feng (1):
>>    Revert "drm/amd/display: Add helper for blanking all dp displays"

This was part of enabling DP tunneling. I do not see it reverted for upstream. 
If the backport was causing regressions, should it not have been handled in 
Jammy at least as a separate bug? Will this not have impact on DP tunneling?

-S

>>
>> Wayne Lin (2):
>>    drm/amd/display: Detect dpcd_rev when hotplug mst monitor
>>    drm/amd/display: Release remote dc_sink under mst scenario
>>
>>   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  5 +-
>>   .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 18 +----
>>   .../display/amdgpu_dm/amdgpu_dm_mst_types.c   | 72 +++++++++++++++++--
>>   drivers/gpu/drm/amd/display/dc/core/dc_link.c | 45 ------------
>>   drivers/gpu/drm/amd/display/dc/dc_link.h      |  1 -
>>   .../display/dc/dce110/dce110_hw_sequencer.c   | 13 +++-
>>   .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 41 ++++++++++-
>>   .../drm/amd/display/dc/dcn30/dcn30_hwseq.c    | 39 +++++++++-
>>   .../drm/amd/display/dc/dcn31/dcn31_hwseq.c    | 37 +++++++++-
>>   9 files changed, 192 insertions(+), 79 deletions(-)
>>
> 
> applied to oem-5.17, thanks
> 
> (careful with the topic :)
>
Kai-Heng Feng Sept. 28, 2022, 10:55 a.m. UTC | #5
On Wed, Sep 28, 2022 at 4:37 PM Stefan Bader <stefan.bader@canonical.com> wrote:
>
> On 27.09.22 10:12, Timo Aaltonen wrote:
> > Kai-Heng Feng kirjoitti 27.9.2022 klo 9.59:
> >> BugLink: https://bugs.launchpad.net/bugs/1990920
> >>
> >> [Impact]
> >> When TBT monitor is connected to AMD platform, system resume will hit
> >> stack corruption or BUG_ON() macro.
> >>
> >> [Fix]
> >> Revert the offending commit and handle MST properly.
> >>
> >> [Test]
> >> The system can resume normally and no more kernel splat.
> >>
> >> [Where problems could occur]
> >> The new logic is restriced to MST hub, so normal DP/HDMI usage should be
> >> unaffected.
> >>
> >> Kai-Heng Feng (1):
> >>    Revert "drm/amd/display: Add helper for blanking all dp displays"
>
> This was part of enabling DP tunneling. I do not see it reverted for upstream.
> If the backport was causing regressions, should it not have been handled in
> Jammy at least as a separate bug? Will this not have impact on DP tunneling?

Adding the helper is to reduce open-coding, any functional change is
not intended. So the upstream commit
c494e57992f9b85e72fac3003358387249b359b6 ("Revert "drm/amd/display:
Add helper for blanking all dp displays"") reverted it.

The correct helper was later added as
ebd1e719695824ca2b9225094a669fef35620676 ("drm/amd/display: Add helper
for blanking all dp displays").

Kai-Heng

>
> -S
>
> >>
> >> Wayne Lin (2):
> >>    drm/amd/display: Detect dpcd_rev when hotplug mst monitor
> >>    drm/amd/display: Release remote dc_sink under mst scenario
> >>
> >>   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  5 +-
> >>   .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 18 +----
> >>   .../display/amdgpu_dm/amdgpu_dm_mst_types.c   | 72 +++++++++++++++++--
> >>   drivers/gpu/drm/amd/display/dc/core/dc_link.c | 45 ------------
> >>   drivers/gpu/drm/amd/display/dc/dc_link.h      |  1 -
> >>   .../display/dc/dce110/dce110_hw_sequencer.c   | 13 +++-
> >>   .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 41 ++++++++++-
> >>   .../drm/amd/display/dc/dcn30/dcn30_hwseq.c    | 39 +++++++++-
> >>   .../drm/amd/display/dc/dcn31/dcn31_hwseq.c    | 37 +++++++++-
> >>   9 files changed, 192 insertions(+), 79 deletions(-)
> >>
> >
> > applied to oem-5.17, thanks
> >
> > (careful with the topic :)
> >
>
Stefan Bader Oct. 5, 2022, 2:16 p.m. UTC | #6
On 27.09.22 08:59, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/1990920
> 
> [Impact]
> When TBT monitor is connected to AMD platform, system resume will hit
> stack corruption or BUG_ON() macro.
> 
> [Fix]
> Revert the offending commit and handle MST properly.
> 
> [Test]
> The system can resume normally and no more kernel splat.
> 
> [Where problems could occur]
> The new logic is restriced to MST hub, so normal DP/HDMI usage should be
> unaffected.
> 
> Kai-Heng Feng (1):
>    Revert "drm/amd/display: Add helper for blanking all dp displays"
> 
> Wayne Lin (2):
>    drm/amd/display: Detect dpcd_rev when hotplug mst monitor
>    drm/amd/display: Release remote dc_sink under mst scenario
> 
>   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  5 +-
>   .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 18 +----
>   .../display/amdgpu_dm/amdgpu_dm_mst_types.c   | 72 +++++++++++++++++--
>   drivers/gpu/drm/amd/display/dc/core/dc_link.c | 45 ------------
>   drivers/gpu/drm/amd/display/dc/dc_link.h      |  1 -
>   .../display/dc/dce110/dce110_hw_sequencer.c   | 13 +++-
>   .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 41 ++++++++++-
>   .../drm/amd/display/dc/dcn30/dcn30_hwseq.c    | 39 +++++++++-
>   .../drm/amd/display/dc/dcn31/dcn31_hwseq.c    | 37 +++++++++-
>   9 files changed, 192 insertions(+), 79 deletions(-)
> 

Applied to jammy:linux/master-next. Thanks.

-Stefan
Timo Aaltonen Oct. 7, 2022, 1:29 p.m. UTC | #7
Kai-Heng Feng kirjoitti 27.9.2022 klo 9.59:
> BugLink: https://bugs.launchpad.net/bugs/1990920
> 
> [Impact]
> When TBT monitor is connected to AMD platform, system resume will hit
> stack corruption or BUG_ON() macro.
> 
> [Fix]
> Revert the offending commit and handle MST properly.
> 
> [Test]
> The system can resume normally and no more kernel splat.
> 
> [Where problems could occur]
> The new logic is restriced to MST hub, so normal DP/HDMI usage should be
> unaffected.
> 
> Kai-Heng Feng (1):
>    Revert "drm/amd/display: Add helper for blanking all dp displays"
> 
> Wayne Lin (2):
>    drm/amd/display: Detect dpcd_rev when hotplug mst monitor
>    drm/amd/display: Release remote dc_sink under mst scenario
> 
>   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  5 +-
>   .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 18 +----
>   .../display/amdgpu_dm/amdgpu_dm_mst_types.c   | 72 +++++++++++++++++--
>   drivers/gpu/drm/amd/display/dc/core/dc_link.c | 45 ------------
>   drivers/gpu/drm/amd/display/dc/dc_link.h      |  1 -
>   .../display/dc/dce110/dce110_hw_sequencer.c   | 13 +++-
>   .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 41 ++++++++++-
>   .../drm/amd/display/dc/dcn30/dcn30_hwseq.c    | 39 +++++++++-
>   .../drm/amd/display/dc/dcn31/dcn31_hwseq.c    | 37 +++++++++-
>   9 files changed, 192 insertions(+), 79 deletions(-)
> 

applied to oem-5.14, thanks
Andrea Righi Oct. 12, 2022, 6:46 a.m. UTC | #8
On Tue, Sep 27, 2022 at 02:59:53PM +0800, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/1990920
> 
> [Impact]
> When TBT monitor is connected to AMD platform, system resume will hit
> stack corruption or BUG_ON() macro.
> 
> [Fix]
> Revert the offending commit and handle MST properly.
> 
> [Test]
> The system can resume normally and no more kernel splat.
> 
> [Where problems could occur]
> The new logic is restriced to MST hub, so normal DP/HDMI usage should be
> unaffected.

Applied to kinetic/linux.

Thanks,
-Andrea