Bug 112212 - Commit 0c06fa15600 (Add support of BT.2020 Colorimetry to DP MSA) causing 4K monitor corruption
Summary: Commit 0c06fa15600 (Add support of BT.2020 Colorimetry to DP MSA) causing 4K ...
Status: NEW
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: DRI git
Hardware: x86-64 (AMD64) Linux (All)
: high major
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: Triaged, ReadyForDev
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-05 09:38 UTC by Kenneth C
Modified: 2019-11-07 07:02 UTC (History)
3 users (show)

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


Attachments
Working display after revert (3.20 MB, image/jpeg)
2019-11-05 09:38 UTC, Kenneth C
no flags Details
Corrupted display with this commit (4.77 MB, image/jpeg)
2019-11-05 09:38 UTC, Kenneth C
no flags Details
Pre-X dmesg (412.46 KB, text/plain)
2019-11-05 17:47 UTC, Kenneth C
no flags Details
Post-X-starting dmesg (4.09 MB, text/plain)
2019-11-05 17:47 UTC, Kenneth C
no flags Details
kernel .config (29.28 KB, application/gzip)
2019-11-05 17:48 UTC, Kenneth C
no flags Details
xrandr --current (1.35 KB, text/plain)
2019-11-05 17:48 UTC, Kenneth C
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth C 2019-11-05 09:38:09 UTC
Created attachment 145885 [details]
Working display after revert

See attached pictures; the corrupted one has this named commit in it (I'm running the drm-tip as of 14a672b77a). It only affects my 4K monitor (LG 27UD59-B). If you need more info, let me know.
Comment 1 Kenneth C 2019-11-05 09:38:56 UTC
Created attachment 145886 [details]
Corrupted display with this commit
Comment 2 Kenneth C 2019-11-05 09:42:20 UTC
Commit authored by "gwan-gyeong.mun@intel.com", but I can't CC: him to the bug
Comment 3 Lakshmi 2019-11-05 10:46:57 UTC
(In reply to Kenneth C from comment #0)
> Created attachment 145885 [details]
> Working display after revert
> 
> See attached pictures; the corrupted one has this named commit in it (I'm
> running the drm-tip as of 14a672b77a). It only affects my 4K monitor (LG
> 27UD59-B). If you need more info, let me know.

Can you please attach the full dmesg with and without the commit with kernel parameters drm.debug=0x1e log_buf_len=4M. This might be useful for debugging.

CC'ing GG anyway.
Comment 4 Mun, Gwan-gyeong 2019-11-05 11:23:00 UTC
Hi Ken,
I am Gwan-gyeong aka. G.G.

Can you check with your drm-tip includes this commit or not?

ommit d4a415dcda35d298b0048eb9c1a9bc04a5007fe0
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Tue Oct 15 22:05:38 2019 +0300

    drm/i915: Fix MST oops due to MSA changes
    
    The MSA MISC computation now depends on the connector state, and
    we do it from the DDI .pre_enable() hook. All that is fine for
    DP SST but with MST we don't actually pass the connector state
    to the dig port's .pre_enable() hook which leads to an oops.
    
    Need to think more how to solve this in a cleaner fashion, but
    for now let's just add a NULL check to stop the oopsing.
    
    Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
    Cc: Uma Shankar <uma.shankar@intel.com>
    Fixes: 0c06fa156006 ("drm/i915/dp: Add support of BT.2020 Colorimetry to DP MSA")
    Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20191015190538.27539-1-ville.syrjala@linux.intel.com
    Reviewed-by: Uma Shankar <uma.shankar@intel.com>
    Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Comment 5 Mun, Gwan-gyeong 2019-11-05 11:57:12 UTC
Hi Ken,
Did your test environment have DP HUB?
Comment 6 Mun, Gwan-gyeong 2019-11-05 13:32:29 UTC
A sympton of weird screen seems that MSA uses wrong configuration.
The commit "drm/i915/dp: Add support of BT.2020 Colorimetry to DP MSA"  
 1) checks use case of BT.2020 and enables MSA for VSC SDP for BT.2020 Colorimetry.
 2) changes a calling of intel_ddi_set_pipe_settings() function into intel_ddi_pre_enable_dp() to handle colorspace of drm_connector_state.

The changed MSA setting timing might lead (I am not sure) weird setting of MSA, I am on digging it in detail.

Ken, could you share the kernel log which Lakshmi said.
Comment 7 Kenneth C 2019-11-05 14:16:39 UTC
Yes, I have commit d4a415dcda35d298b0048eb9c1a9bc04a5007fe0.

My dmesg has nothing unusual in it, and the command line has nothing related to i915. I do have that compiled as a module, however and the module's parameters are "enable_psr=1 enable_guc=2"

My monitors are connected to a Thunderbolt dock in a 3-monitor configuration: 1080p monitor to the left (HDMI), laptop screen running @1080p, then 4K monitor on the right (DP).
Comment 8 Jani Saarinen 2019-11-05 15:28:08 UTC
So you have guc=2 and what platform?
Comment 9 Jani Saarinen 2019-11-05 17:06:59 UTC
As requested please try to reproduce the error using drm-tip (https://cgit.freedesktop.org/drm-tip) provide logs as instructed by Lakshmi.
Comment 10 Kenneth C 2019-11-05 17:21:18 UTC
I'm running a CoffeeLake platform.

I AM running drm-tip.

I'll send the dmesg logs later, but there is absolutely nothing in them except this:

----
$  dmesg -H | fgrep -i i915
[  +0.038177] snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec
[  +0.000003] i915 0000:00:02.0: VT-d active for gfx access
[  +0.000031] i915 0000:00:02.0: vgaarb: deactivate vga console
[  +0.000813] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[  +0.001040] [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)
[  +0.010389] i915 0000:00:02.0: GuC firmware i915/kbl_guc_33.0.0.bin version 33.0 submission:disabled
[  +0.000008] i915 0000:00:02.0: HuC firmware i915/kbl_huc_4.0.0.bin version 4.0 authenticated:yes
[  +0.001179] [drm] Initialized i915 1.6.0 20191101 for 0000:00:02.0 on minor 0
[  +0.025831] fbcon: i915drmfb (fb0) is primary device
[  +0.001026] i915 0000:00:02.0: fb0: i915drmfb frame buffer device
----
Comment 11 Jani Saarinen 2019-11-05 17:23:06 UTC
There is a lot of other information also, BIOS, platform etc. so please provide whole dmesg from boot to issue seen.
Comment 12 Kenneth C 2019-11-05 17:28:33 UTC
Sure, and I'll even do you one better- I'll upload some of the drm error reports I'd collected before (unrelated to this issue, was related to some GPU HANG issues); those should have quite a bit of debug information about the platform and config, no?

Let me reboot into the branch that's still got this commit (I've reverted it so I can get some work done) and I'll post everything in a bit.
Comment 13 Jani Saarinen 2019-11-05 17:35:01 UTC
If not related to this issue, just logs are enough, thanks.
Comment 14 Kenneth C 2019-11-05 17:47:09 UTC
Created attachment 145895 [details]
Pre-X dmesg
Comment 15 Kenneth C 2019-11-05 17:47:49 UTC
Created attachment 145896 [details]
Post-X-starting dmesg
Comment 16 Kenneth C 2019-11-05 17:48:10 UTC
Created attachment 145897 [details]
kernel .config
Comment 17 Kenneth C 2019-11-05 17:48:34 UTC
Created attachment 145898 [details]
xrandr --current
Comment 18 Kenneth C 2019-11-05 17:50:47 UTC
OK- added two sets of dmesg (it spams pretty hard when X is running, so took one before trying to log into my WM). The issue also shows up on text-mode VTs on my 4K monitor.

Also added my xrandr setup and my kernel's .config, just for completeness.

I'm switching back to my branch with this commit reverted, and am about to be away from this hardware for a day or so, so I hope this is enough to help.
Comment 19 Mun, Gwan-gyeong 2019-11-06 12:36:10 UTC
Hi Ken,
Thank you for sharing the dmesgs.
When you are available, could you share the result from "$sudo cat /sys/kernel/debug/dri/0/i915_display_info"
Comment 20 Mun, Gwan-gyeong 2019-11-06 21:28:34 UTC
A patch was sent to the mailing list.
https://patchwork.freedesktop.org/patch/339257/?series=69092&rev=1
Comment 21 Kenneth C 2019-11-06 21:30:40 UTC
I'll try out the patch tonight, thanks
Comment 22 Kenneth C 2019-11-07 02:24:44 UTC
(In reply to Kenneth C from comment #21)

> I'll try out the patch tonight, thanks

That appears to have fixed it- tried a couple of reboot cycles (and I guess I should try some hotplugging monitors) but so far, so good!
Comment 23 Kenneth C 2019-11-07 02:28:15 UTC
(In reply to Mun, Gwan-gyeong from comment #19)
> Hi Ken,
> Thank you for sharing the dmesgs.
> When you are available, could you share the result from "$sudo cat
> /sys/kernel/debug/dri/0/i915_display_info"

Well, for completeness' sake I'll post it anyway (this is post-patch):
----
CRTC info
---------
CRTC 51: pipe: A, active=yes, (size=1920x1080), dither=no, bpp=24
        fb: 117, pos: 1920x0, size: 7680x2160
        encoder 94: type: DDI A, connectors:
                connector 95: type: eDP-1, status: connected, mode:
                "": 0 173000 1920 2048 2248 2576 1080 1083 1088 1120 0x0 0x6
        cursor visible? no, position (0, 0), size 0x0, addr 0x00000000
        num_scalers=2, scaler_users=80000000 scaler_id=0, scalers[0]: use=yes, mode=10000000, scalers[1]: use=no, mode=0
        --Plane id 31: type=PRI, crtc_pos=   0x   0, crtc_size=1920x1080, src_pos=1920.0000x0.0000, src_size=1920.0000x1080.0000, format=XR24 little-endian (0x34325258), rotation=0 (0x00000001)
        --Plane id 39: type=OVL, crtc_pos=   0x   0, crtc_size=   0x   0, src_pos=0.0000x0.0000, src_size=0.0000x0.0000, format=N/A, rotation=0 (0x00000001)
        --Plane id 47: type=CUR, crtc_pos=   0x   0, crtc_size=   0x   0, src_pos=0.0000x0.0000, src_size=0.0000x0.0000, format=N/A, rotation=0 (0x00000001)
        underrun reporting: cpu=yes pch=yes 
CRTC 72: pipe: B, active=yes, (size=1920x1080), dither=no, bpp=24
        fb: 117, pos: 0x0, size: 7680x2160
        encoder 104: type: DP-MST B, connectors:
                connector 121: type: DP-3, status: connected, mode:
                "": 0 174500 1920 1968 2000 2080 1080 1083 1088 1119 0x0 0x5
        cursor visible? no, position (0, 0), size 0x0, addr 0x00000000
        num_scalers=2, scaler_users=0 scaler_id=-1, scalers[0]: use=no, mode=0, scalers[1]: use=no, mode=0
        --Plane id 52: type=PRI, crtc_pos=   0x   0, crtc_size=1920x1080, src_pos=0.0000x0.0000, src_size=1920.0000x1080.0000, format=XR24 little-endian (0x34325258), rotation=0 (0x00000001)
        --Plane id 60: type=OVL, crtc_pos=   0x   0, crtc_size=   0x   0, src_pos=0.0000x0.0000, src_size=0.0000x0.0000, format=N/A, rotation=0 (0x00000001)
        --Plane id 68: type=CUR, crtc_pos=   0x   0, crtc_size=   0x   0, src_pos=0.0000x0.0000, src_size=0.0000x0.0000, format=N/A, rotation=0 (0x00000001)
        underrun reporting: cpu=yes pch=yes 
CRTC 93: pipe: C, active=yes, (size=3840x2160), dither=no, bpp=24
        fb: 117, pos: 3840x0, size: 7680x2160
        encoder 105: type: DP-MST C, connectors:
                connector 123: type: DP-4, status: connected, mode:
                "": 0 266640 3840 3848 3992 4000 2160 2214 2219 2222 0x0 0x9
        cursor visible? no, position (0, 0), size 0x0, addr 0x00000000
        num_scalers=1, scaler_users=0 scaler_id=-1, scalers[0]: use=no, mode=0
        --Plane id 73: type=PRI, crtc_pos=   0x   0, crtc_size=3840x2160, src_pos=3840.0000x0.0000, src_size=3840.0000x2160.0000, format=XR24 little-endian (0x34325258), rotation=0 (0x00000001)
        --Plane id 81: type=OVL, crtc_pos=   0x   0, crtc_size=   0x   0, src_pos=0.0000x0.0000, src_size=0.0000x0.0000, format=N/A, rotation=0 (0x00000001)
        --Plane id 89: type=CUR, crtc_pos=   0x   0, crtc_size=   0x   0, src_pos=0.0000x0.0000, src_size=0.0000x0.0000, format=N/A, rotation=0 (0x00000001)
        underrun reporting: cpu=yes pch=yes 
Connector info
--------------
connector 95: type eDP-1, status: connected
        physical dimensions: 290x170mm
        subpixel order: Unknown
        CEA rev: 0
        DPCD rev: 14
        audio support: no
        fixed mode:
                "3840x2160": 60 533300 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
        DP branch device present: no
        modes:
                "3840x2160": 60 533300 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
                "3840x2160": 40 355530 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
connector 102: type DP-1, status: disconnected
connector 111: type DP-2, status: disconnected
connector 121: type DP-3, status: connected
        physical dimensions: 530x290mm
        subpixel order: Unknown
        CEA rev: 3
        audio support: yes
        modes:
                "1920x1080": 60 148500 1920 2008 2052 2200 1080 1084 1089 1125 0x48 0x5
                "1920x1080": 75 174500 1920 1968 2000 2080 1080 1083 1088 1119 0x40 0x5
                "1920x1080": 60 148500 1920 2008 2052 2200 1080 1084 1089 1125 0x40 0x5
                "1920x1080": 60 148352 1920 2008 2052 2200 1080 1084 1089 1125 0x40 0x5
                "1920x1080": 50 148500 1920 2448 2492 2640 1080 1084 1089 1125 0x40 0x5
                "1680x1050": 60 119000 1680 1728 1760 1840 1050 1053 1059 1080 0x40 0x9
                "1280x1024": 75 135000 1280 1296 1440 1688 1024 1025 1028 1066 0x40 0x5
                "1280x1024": 60 108000 1280 1328 1440 1688 1024 1025 1028 1066 0x40 0x5
                "1440x900": 60 88750 1440 1488 1520 1600 900 903 909 926 0x40 0x9
                "1280x960": 60 108000 1280 1376 1488 1800 960 961 964 1000 0x40 0x5
                "1280x720": 60 74250 1280 1390 1430 1650 720 725 730 750 0x40 0x5
                "1280x720": 60 74250 1280 1390 1430 1650 720 725 730 750 0x40 0x5
                "1280x720": 60 74176 1280 1390 1430 1650 720 725 730 750 0x40 0x5
                "1280x720": 50 74250 1280 1720 1760 1980 720 725 730 750 0x40 0x5
                "1024x768": 75 78750 1024 1040 1136 1312 768 769 772 800 0x40 0x5
                "1024x768": 70 75000 1024 1048 1184 1328 768 771 777 806 0x40 0xa
                "1024x768": 60 65000 1024 1048 1184 1344 768 771 777 806 0x40 0xa
                "832x624": 75 57284 832 864 928 1152 624 625 628 667 0x40 0xa
                "800x600": 75 49500 800 816 896 1056 600 601 604 625 0x40 0x5
                "800x600": 72 50000 800 856 976 1040 600 637 643 666 0x40 0x5
                "800x600": 60 40000 800 840 968 1056 600 601 605 628 0x40 0x5
                "800x600": 56 36000 800 824 896 1024 600 601 603 625 0x40 0x5
                "720x576": 50 27000 720 732 796 864 576 581 586 625 0x40 0xa
                "720x576": 50 27000 720 732 796 864 576 581 586 625 0x40 0xa
                "720x576": 50 27000 720 732 796 864 576 581 586 625 0x40 0xa
                "720x480": 60 27027 720 736 798 858 480 489 495 525 0x40 0xa
                "720x480": 60 27027 720 736 798 858 480 489 495 525 0x40 0xa
                "720x480": 60 27000 720 736 798 858 480 489 495 525 0x40 0xa
                "720x480": 60 27000 720 736 798 858 480 489 495 525 0x40 0xa
                "720x480": 60 27000 720 736 798 858 480 489 495 525 0x40 0xa
                "640x480": 75 31500 640 656 720 840 480 481 484 500 0x40 0xa
                "640x480": 73 31500 640 664 704 832 480 489 492 520 0x40 0xa
                "640x480": 67 30240 640 704 768 864 480 483 486 525 0x40 0xa
                "640x480": 60 25200 640 656 752 800 480 490 492 525 0x40 0xa
                "640x480": 60 25175 640 656 752 800 480 490 492 525 0x40 0xa
                "640x480": 60 25175 640 656 752 800 480 490 492 525 0x40 0xa
                "720x400": 70 28320 720 738 846 900 400 412 414 449 0x40 0x6
connector 123: type DP-4, status: connected
        physical dimensions: 600x340mm
        subpixel order: Unknown
        CEA rev: 3
        audio support: yes
        modes:
                "3840x2160": 60 533250 3840 3888 3920 4000 2160 2214 2219 2222 0x48 0x9
                "3840x2160": 30 266640 3840 3848 3992 4000 2160 2214 2219 2222 0x40 0x9
                "2560x1440": 60 241500 2560 2608 2640 2720 1440 1443 1448 1481 0x40 0x9
                "1920x1080": 60 148500 1920 2008 2052 2200 1080 1084 1089 1125 0x40 0x5
                "1920x1080": 60 148500 1920 2008 2052 2200 1080 1084 1089 1125 0x40 0x5
                "1920x1080": 60 148352 1920 2008 2052 2200 1080 1084 1089 1125 0x40 0x5
                "1600x900": 60 108000 1600 1624 1704 1800 900 901 904 1000 0x40 0x5
                "1280x1024": 60 108000 1280 1328 1440 1688 1024 1025 1028 1066 0x40 0x5
                "1280x800": 60 83500 1280 1352 1480 1680 800 803 809 831 0x40 0x6
                "1280x720": 60 74250 1280 1390 1430 1650 720 725 730 750 0x40 0x5
                "1280x720": 60 74250 1280 1390 1430 1650 720 725 730 750 0x40 0x5
                "1280x720": 60 74176 1280 1390 1430 1650 720 725 730 750 0x40 0x5
                "1024x768": 60 65000 1024 1048 1184 1344 768 771 777 806 0x40 0xa
                "800x600": 60 40000 800 840 968 1056 600 601 605 628 0x40 0x5
                "720x480": 60 27027 720 736 798 858 480 489 495 525 0x40 0xa
                "720x480": 60 27000 720 736 798 858 480 489 495 525 0x40 0xa
                "640x480": 60 25200 640 656 752 800 480 490 492 525 0x40 0xa
                "640x480": 60 25175 640 656 752 800 480 490 492 525 0x40 0xa
                "640x480": 60 25175 640 656 752 800 480 490 492 525 0x40 0xa
connector 125: type DP-5, status: disconnected
----
Comment 24 Mun, Gwan-gyeong 2019-11-07 07:01:51 UTC
Thank you for testing the patch.


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.