Bug 111505 - third monitor doesn't work since commit "drm/i915: Remove the 8bpc shackles from DP MST"
Summary: third monitor doesn't work since commit "drm/i915: Remove the 8bpc shackles f...
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: high major
Assignee: Lakshmi
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: Triaged, ReadyForDev
Keywords: bisected, regression
Depends on:
Blocks:
 
Reported: 2019-08-28 04:36 UTC by Geoffrey Bennett
Modified: 2019-09-02 15:48 UTC (History)
3 users (show)

See Also:
i915 platform: KBL
i915 features: display/DP MST


Attachments
dmesg from booting good commit (730.82 KB, text/plain)
2019-08-28 04:37 UTC, Geoffrey Bennett
no flags Details
dmesg from booting bad commit (729.69 KB, text/plain)
2019-08-28 04:39 UTC, Geoffrey Bennett
no flags Details
xrandr --verbose (from good boot) (31.95 KB, text/plain)
2019-08-28 04:40 UTC, Geoffrey Bennett
no flags Details

Description Geoffrey Bennett 2019-08-28 04:36:40 UTC
Steps to reproduce the issue:
- Fedora 30, Lenovo ThinkPad T480s laptop, internal + 2x external DisplayPort
- External monitors: LG 24EB23 1920x1200 (DP-2-2) and LG 32UK550 3840x2160 (DP-2-3)
- Boot kernel commit f1477219869cc943ef9e0248b308da7b900c65ec or Fedora stock 5.2.9
- At the LUKS password prompt, only two monitors display it (mirrored); the 3840x2160 monitor only displays a text cursor in the top-left
- After logging in, the third monitor cannot be enabled
- Boot kernel before the mentioned commit (or Fedora stock 5.1.19); all three monitors are working (mirrored password prompt)

How often do these steps trigger the issue? Always.

If I did the bisect right, this commit is the issue:

commit f1477219869cc943ef9e0248b308da7b900c65ec
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Tue Mar 26 16:25:53 2019 +0200

    drm/i915: Remove the 8bpc shackles from DP MST
    
    Allow DP MST to output any color depth. This means deep color as
    well as falling back to 6bpc if we would otherwise require too
    much bandwidth.
    
    TODO: We should probably extend bw_contstrained scheme to force
    all streams on the link to 6bpc if we can't fit the new stream(s)
    otherwise.

Bad commit: f1477219869cc943ef9e0248b308da7b900c65ec
Good commit: 765bdb0b3948747dda8c9bab300013e34f76fe88

Comparing dmesg output between good & bad commits with drm.debug=0x1e ...

Good commit, I see messages like:

[    7.215513] [drm:intel_atomic_check [i915]] hw max bpp: 30, pipe bpp: 24, dithering: 0
[    7.215977] [drm:intel_dump_pipe_config [i915]] cpu_transcoder: C, pipe bpp: 24, dithering: 0 
[    7.216361] [drm:drm_dp_mst_atomic_check [drm_kms_helper]] [MST PORT:000000006766b031] requires 48 vcpi slots
[    7.216365] [drm:drm_dp_mst_atomic_check [drm_kms_helper]] [MST PORT:0000000048ae3b07] requires 14 vcpi slots

Bad commit, I see messages like:

[    7.151412] [drm:intel_atomic_check [i915]] hw max bpp: 30, pipe bpp: 30, dithering: 0
[    7.151878] [drm:intel_dump_pipe_config [i915]] cpu_transcoder: C, pipe bpp: 30, dithering: 0
[    7.152272] [drm:drm_dp_mst_atomic_check [drm_kms_helper]] [MST PORT:00000000f27944b7] requires 60 vcpi slots
[    7.152276] [drm:drm_dp_mst_atomic_check [drm_kms_helper]] [MST PORT:00000000f43eff2e] requires 14 vcpi slots
[    7.152281] [drm:drm_dp_mst_atomic_check [drm_kms_helper]] [MST PORT:00000000f43eff2e] not enough VCPI slots in mst state 00000000c1ef406a (avail=3)
[    7.152293] [drm:drm_atomic_check_only [drm]] atomic driver check for 00000000a9c59397 failed: -28

I also tested drm-tip, and neither external monitor worked then.
Comment 1 Geoffrey Bennett 2019-08-28 04:37:49 UTC
Created attachment 145181 [details]
dmesg from booting good commit
Comment 2 Geoffrey Bennett 2019-08-28 04:39:46 UTC
Created attachment 145182 [details]
dmesg from booting bad commit
Comment 3 Geoffrey Bennett 2019-08-28 04:40:38 UTC
Created attachment 145183 [details]
xrandr --verbose (from good boot)
Comment 4 Lakshmi 2019-08-28 08:21:00 UTC
Considering this as a regression setting the priority to Highest. 

(In reply to Geoffrey Bennett from comment #0)
> Steps to reproduce the issue:
> - Fedora 30, Lenovo ThinkPad T480s laptop, internal + 2x external DisplayPort
> - External monitors: LG 24EB23 1920x1200 (DP-2-2) and LG 32UK550 3840x2160
> (DP-2-3)
> - Boot kernel commit f1477219869cc943ef9e0248b308da7b900c65ec or Fedora
> stock 5.2.9
> - At the LUKS password prompt, only two monitors display it (mirrored); the
> 3840x2160 monitor only displays a text cursor in the top-left
> - After logging in, the third monitor cannot be enabled
> - Boot kernel before the mentioned commit (or Fedora stock 5.1.19); all
> three monitors are working (mirrored password prompt)
> 
> How often do these steps trigger the issue? Always.
> 
> If I did the bisect right, this commit is the issue:
> 
> commit f1477219869cc943ef9e0248b308da7b900c65ec
> Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Date:   Tue Mar 26 16:25:53 2019 +0200
> 
>     drm/i915: Remove the 8bpc shackles from DP MST
>     
>     Allow DP MST to output any color depth. This means deep color as
>     well as falling back to 6bpc if we would otherwise require too
>     much bandwidth.
>     
>     TODO: We should probably extend bw_contstrained scheme to force
>     all streams on the link to 6bpc if we can't fit the new stream(s)
>     otherwise.
> 
> Bad commit: f1477219869cc943ef9e0248b308da7b900c65ec
> Good commit: 765bdb0b3948747dda8c9bab300013e34f76fe88
> 
> Comparing dmesg output between good & bad commits with drm.debug=0x1e ...
> 
> Good commit, I see messages like:
> 
> [    7.215513] [drm:intel_atomic_check [i915]] hw max bpp: 30, pipe bpp: 24,
> dithering: 0
> [    7.215977] [drm:intel_dump_pipe_config [i915]] cpu_transcoder: C, pipe
> bpp: 24, dithering: 0 
> [    7.216361] [drm:drm_dp_mst_atomic_check [drm_kms_helper]] [MST
> PORT:000000006766b031] requires 48 vcpi slots
> [    7.216365] [drm:drm_dp_mst_atomic_check [drm_kms_helper]] [MST
> PORT:0000000048ae3b07] requires 14 vcpi slots
> 
> Bad commit, I see messages like:
> 
> [    7.151412] [drm:intel_atomic_check [i915]] hw max bpp: 30, pipe bpp: 30,
> dithering: 0
> [    7.151878] [drm:intel_dump_pipe_config [i915]] cpu_transcoder: C, pipe
> bpp: 30, dithering: 0
> [    7.152272] [drm:drm_dp_mst_atomic_check [drm_kms_helper]] [MST
> PORT:00000000f27944b7] requires 60 vcpi slots
> [    7.152276] [drm:drm_dp_mst_atomic_check [drm_kms_helper]] [MST
> PORT:00000000f43eff2e] requires 14 vcpi slots
> [    7.152281] [drm:drm_dp_mst_atomic_check [drm_kms_helper]] [MST
> PORT:00000000f43eff2e] not enough VCPI slots in mst state 00000000c1ef406a
> (avail=3)
> [    7.152293] [drm:drm_atomic_check_only [drm]] atomic driver check for
> 00000000a9c59397 failed: -28
> 
> I also tested drm-tip, and neither external monitor worked then.

@Ville, can you help here?
Comment 5 Ville Syrjala 2019-08-28 09:54:59 UTC
Dang. I was hoping no one would hit this in practice, at least any more than they already have. We need to beef up the code to reduce the bpp of the MST streams going over the same link until they fit.

As a stopgap we probable want a revert. I'll send one out.
Comment 6 Ville Syrjala 2019-08-28 10:22:06 UTC
This should get us back to the old behaviour:
https://patchwork.freedesktop.org/series/65919/
Comment 7 Geoffrey Bennett 2019-08-29 01:28:00 UTC
I tested kernel v5.3-rc6 with the patch at https://patchwork.freedesktop.org/series/65919/ and am happy to report that it fixes the problem.

Thanks for the quick turnaround!
Comment 8 Lakshmi 2019-08-29 08:33:51 UTC
(In reply to Ville Syrjala from comment #6)
> This should get us back to the old behaviour:
> https://patchwork.freedesktop.org/series/65919/

Thanks for providing the fix immediately Ville.

(In reply to Geoffrey Bennett from comment #7)
> I tested kernel v5.3-rc6 with the patch at
> https://patchwork.freedesktop.org/series/65919/ and am happy to report that
> it fixes the problem.
> 
> Thanks for the quick turnaround!

Thanks for the feedback.

I will wait for the fix to land in drmtip and then I can close this issue. Meanwhile I will drop the priority and assign it to myself.
Comment 9 Ville Syrjala 2019-09-02 15:48:06 UTC
Now fixed.

commit 75427b2a2bffc083d51dec389c235722a9c69b05
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Wed Aug 28 13:20:59 2019 +0300

    drm/i915: Limit MST to <= 8bpc once again


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.