Skip to contentSkip to conversation

drm/i915: Stop force enabling pipe bottom color gammma/csc

PATCH In review Ville Syrjala 3 participants 6 messages Sep 28, 2021 – Oct 1, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Stop force enabling pipe bottom color gammma/csc

From: Ville Syrjälä <[email protected]>

While sanitizing the hardware state we're currently forcing the pipe bottom color legacy csc/gamma bits on. That is not a good idea as BIOSen are likely to leave gabage in the LUTs and so doing this causes ugly visual glitches if and when the planes covering the background get disabled. This was exactly the case on this Dell Precision 5560 tgl laptop.

On icl+ we don't normally even use these legacy bits anymore and instead use their GAMMA_MODE counterparts. On earlier platforms the bits are used, but we still shouldn't force them on without knowing what's in the LUT.

So two options, get rid of the whole thing, or do what intel_color_commit() does to make sure the bottom color state matches whatever out hardware readout produced. I chose the latter since it'll match what happens on older platforms when the primary plane gets turned off. In fact let's just call intel_color_commit(). It'll also do some CSC programming but since we don't have readout for that it'll actually just set to all zeros. So in the unlikely case of CSC actually being enabld by the BIOS we'll end up with all black until the first atomic commit happens.

Still not totally sure what we should do about color management features here in general. Probably the safest thing would be to force everything off exactly at the same time when we disable the primary plane as there is no guarantees that whatever the LUTs/CSCs contain make any sense whatsoever without the specific pixel data in the BIOS fb. And if we preserve the primary plane then we should disable the color management features exactly when the primary plane fb contents first changes since the new content assumes more or less no transformations. But of course synchronizing front buffer rendering with anything else is a bit hard...

---
 drivers/gpu/drm/i915/display/intel_display.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +2 -7
index f27c294beb92..17ce51576ed2 100644
@@ -11991,13 +11991,8 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc,
 				intel_plane_disable_noatomic(crtc, plane);
 		}
 
-		/*
-		 * Disable any background color set by the BIOS, but enable the
-		 * gamma and CSC to match how we program our planes.
-		 */
-		if (DISPLAY_VER(dev_priv) >= 9)
-			intel_de_write(dev_priv, SKL_BOTTOM_COLOR(crtc->pipe),
-				       SKL_BOTTOM_COLOR_GAMMA_ENABLE | SKL_BOTTOM_COLOR_CSC_ENABLE);
+		/* Disable any background color/etc. set by the BIOS */
+		intel_color_commit(crtc_state);
 	}
 
 	/* Adjust the state of the output pipe according to whether we
Signature · 1 line
2.32.0
#1 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Stop force enabling pipe bottom color gammma/csc

== Series Details ==

== Series Details ==

Series: drm/i915: Stop force enabling pipe bottom color gammma/csc
URL : https://patchwork.freedesktop.org/series/95171/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10655 -> Patchwork_21179
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/index.html

Known issues
------------

Here are the changes found in Patchwork_21179 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@amdgpu/amd_basic@cs-sdma:
- fi-kbl-7500u: NOTRUN -> [SKIP][1] ([fdo#109271]) +27 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/fi-kbl-7500u/igt@amdgpu/[email protected]

* igt@amdgpu/amd_basic@semaphore:
- fi-bsw-nick: NOTRUN -> [SKIP][2] ([fdo#109271]) +17 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/fi-bsw-nick/igt@amdgpu/[email protected]

* igt@gem_exec_fence@basic-busy@bcs0:
- fi-kbl-soraka: NOTRUN -> [SKIP][3] ([fdo#109271]) +8 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/fi-kbl-soraka/igt@gem_exec_fence@[email protected]

* igt@gem_huc_copy@huc-copy:
- fi-kbl-soraka: NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#2190])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/fi-kbl-soraka/igt@[email protected]

* igt@i915_selftest@live@gt_pm:
- fi-kbl-soraka: NOTRUN -> [DMESG-FAIL][5] ([i915#1886] / [i915#2291])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html

* igt@kms_chamelium@common-hpd-after-suspend:
- fi-kbl-soraka: NOTRUN -> [SKIP][6] ([fdo#109271] / [fdo#111827]) +8 similar issues
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/fi-kbl-soraka/igt@[email protected]

* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
- fi-kbl-7500u: NOTRUN -> [SKIP][7] ([fdo#109271] / [i915#533])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/fi-kbl-7500u/igt@[email protected]
- fi-kbl-soraka: NOTRUN -> [SKIP][8] ([fdo#109271] / [i915#533])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/fi-kbl-soraka/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@late_gt_pm:
- fi-bsw-nick: [DMESG-FAIL][9] ([i915#2927] / [i915#3428]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/fi-bsw-nick/igt@i915_selftest@live@late_gt_pm.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/fi-bsw-nick/igt@i915_selftest@live@late_gt_pm.html

* igt@kms_chamelium@hdmi-crc-fast:
- fi-kbl-7500u: [FAIL][11] ([i915#1161]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/fi-kbl-7500u/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/fi-kbl-7500u/igt@[email protected]

#### Warnings ####

* igt@kms_chamelium@vga-hpd-fast:
- fi-kbl-7500u: [{ABORT}][13] ([i915#1814]) -> [SKIP][14] ([fdo#109271])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/fi-kbl-7500u/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/fi-kbl-7500u/igt@[email protected]

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1161]: https://gitlab.freedesktop.org/drm/intel/issues/1161
[i915#1814]: https://gitlab.freedesktop.org/drm/intel/issues/1814
[i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2291]: https://gitlab.freedesktop.org/drm/intel/issues/2291
[i915#2927]: https://gitlab.freedesktop.org/drm/intel/issues/2927
[i915#3428]: https://gitlab.freedesktop.org/drm/intel/issues/3428
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533

Participating hosts (45 -> 37)
------------------------------

Additional (1): fi-kbl-soraka
Missing (9): fi-ilk-m540 bat-adls-5 bat-dg1-6 fi-hsw-4200u fi-bsw-cyan bat-adlp-4 fi-ctg-p8600 bat-jsl-2 bat-jsl-1

Build changes
-------------

* Linux: CI_DRM_10655 -> Patchwork_21179

CI-20190529: 20190529
CI_DRM_10655: 88d6ecae86a7bb32e8bf2bd233f7f9f9c8bd7abc @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6226: 18278534c085c35adcf62f158a8d5356e5496f8d @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_21179: 85c809e6b48ca9629fb8e9b61cad6040529e7940 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

85c809e6b48c drm/i915: Stop force enabling pipe bottom color gammma/csc

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/index.html

#2 lore raw

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Stop force enabling pipe bottom color gammma/csc

In reply to Ville Syrjala
== Series Details ==

== Series Details ==

Series: drm/i915: Stop force enabling pipe bottom color gammma/csc
URL : https://patchwork.freedesktop.org/series/95171/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10655_full -> Patchwork_21179_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Known issues
------------

Here are the changes found in Patchwork_21179_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@feature_discovery@chamelium:
- shard-iclb: NOTRUN -> [SKIP][1] ([fdo#111827])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-iclb8/igt@[email protected]

* igt@gem_ctx_isolation@preservation-s3@vcs0:
- shard-kbl: NOTRUN -> [DMESG-WARN][2] ([i915#180]) +2 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-kbl1/igt@gem_ctx_isolation@[email protected]

* igt@gem_ctx_param@set-priority-not-supported:
- shard-iclb: NOTRUN -> [SKIP][3] ([fdo#109314])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-iclb8/igt@[email protected]

* igt@gem_ctx_persistence@smoketest:
- shard-snb: NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#1099])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-snb2/igt@[email protected]

* igt@gem_eio@unwedge-stress:
- shard-tglb: [PASS][5] -> [TIMEOUT][6] ([i915#2369] / [i915#3063] / [i915#3648])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-tglb8/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb1/igt@[email protected]

* igt@gem_exec_fair@basic-deadline:
- shard-apl: NOTRUN -> [FAIL][7] ([i915#2846])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-apl8/igt@[email protected]

* igt@gem_exec_fair@basic-none-solo@rcs0:
- shard-kbl: [PASS][8] -> [FAIL][9] ([i915#2842])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-kbl6/igt@gem_exec_fair@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-kbl7/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-throttle@rcs0:
- shard-iclb: [PASS][10] -> [FAIL][11] ([i915#2849])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-iclb5/igt@gem_exec_fair@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-iclb7/igt@gem_exec_fair@[email protected]

* igt@gem_exec_params@no-bsd:
- shard-tglb: NOTRUN -> [SKIP][12] ([fdo#109283])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb5/igt@[email protected]

* igt@gem_exec_params@secure-non-root:
- shard-tglb: NOTRUN -> [SKIP][13] ([fdo#112283])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb5/igt@[email protected]

* igt@gem_huc_copy@huc-copy:
- shard-apl: NOTRUN -> [SKIP][14] ([fdo#109271] / [i915#2190])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-apl2/igt@[email protected]

* igt@gem_pwrite@basic-exhaustion:
- shard-apl: NOTRUN -> [WARN][15] ([i915#2658])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-apl1/igt@[email protected]

* igt@gem_softpin@allocator-evict-all-engines:
- shard-glk: [PASS][16] -> [FAIL][17] ([i915#4171])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-glk7/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-glk6/igt@[email protected]

* igt@gem_userptr_blits@dmabuf-sync:
- shard-apl: NOTRUN -> [SKIP][18] ([fdo#109271] / [i915#3323])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-apl2/igt@[email protected]

* igt@gem_userptr_blits@input-checking:
- shard-snb: NOTRUN -> [DMESG-WARN][19] ([i915#3002])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-snb5/igt@[email protected]

* igt@gem_userptr_blits@unsync-overlap:
- shard-iclb: NOTRUN -> [SKIP][20] ([i915#3297])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-iclb8/igt@[email protected]

* igt@gem_userptr_blits@vma-merge:
- shard-apl: NOTRUN -> [FAIL][21] ([i915#3318])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-apl2/igt@[email protected]

* igt@gen7_exec_parse@basic-allocation:
- shard-glk: NOTRUN -> [SKIP][22] ([fdo#109271]) +33 similar issues
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-glk4/igt@[email protected]

* igt@gen9_exec_parse@allowed-single:
- shard-skl: [PASS][23] -> [DMESG-WARN][24] ([i915#1436] / [i915#716])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-skl8/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-skl8/igt@[email protected]

* igt@gen9_exec_parse@unaligned-jump:
- shard-tglb: NOTRUN -> [SKIP][25] ([i915#2856])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb5/igt@[email protected]

* igt@i915_pm_rpm@dpms-non-lpsp:
- shard-iclb: NOTRUN -> [SKIP][26] ([fdo#110892])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-iclb8/igt@[email protected]

* igt@i915_suspend@sysfs-reader:
- shard-kbl: [PASS][27] -> [DMESG-WARN][28] ([i915#180]) +1 similar issue
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-kbl7/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-kbl1/igt@[email protected]

* igt@kms_big_fb@linear-32bpp-rotate-90:
- shard-iclb: NOTRUN -> [SKIP][29] ([fdo#110725] / [fdo#111614])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-iclb8/igt@[email protected]

* igt@kms_big_fb@linear-8bpp-rotate-270:
- shard-tglb: NOTRUN -> [SKIP][30] ([fdo#111614])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb3/igt@[email protected]

* igt@kms_big_fb@x-tiled-32bpp-rotate-180:
- shard-glk: [PASS][31] -> [DMESG-WARN][32] ([i915#118] / [i915#95])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-glk8/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-glk1/igt@[email protected]

* igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180-hflip:
- shard-apl: NOTRUN -> [SKIP][33] ([fdo#109271] / [i915#3777]) +2 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-apl1/igt@[email protected]

* igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180-hflip:
- shard-glk: NOTRUN -> [SKIP][34] ([fdo#109271] / [i915#3777]) +1 similar issue
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-glk4/igt@[email protected]
- shard-kbl: NOTRUN -> [SKIP][35] ([fdo#109271] / [i915#3777]) +1 similar issue
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-kbl1/igt@[email protected]

* igt@kms_big_fb@yf-tiled-8bpp-rotate-0:
- shard-iclb: NOTRUN -> [SKIP][36] ([fdo#110723])
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-iclb8/igt@[email protected]

* igt@kms_big_joiner@invalid-modeset:
- shard-tglb: NOTRUN -> [SKIP][37] ([i915#2705])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb3/igt@[email protected]

* igt@kms_ccs@pipe-b-bad-pixel-format-y_tiled_ccs:
- shard-snb: NOTRUN -> [SKIP][38] ([fdo#109271]) +253 similar issues
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-snb2/igt@kms_ccs@pipe-b-bad-pixel-format-y_tiled_ccs.html

* igt@kms_ccs@pipe-b-bad-rotation-90-y_tiled_gen12_mc_ccs:
- shard-kbl: NOTRUN -> [SKIP][39] ([fdo#109271] / [i915#3886]) +6 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-kbl1/igt@kms_ccs@pipe-b-bad-rotation-90-y_tiled_gen12_mc_ccs.html
- shard-glk: NOTRUN -> [SKIP][40] ([fdo#109271] / [i915#3886]) +1 similar issue
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-glk4/igt@kms_ccs@pipe-b-bad-rotation-90-y_tiled_gen12_mc_ccs.html

* igt@kms_ccs@pipe-c-bad-pixel-format-y_tiled_gen12_mc_ccs:
- shard-tglb: NOTRUN -> [SKIP][41] ([i915#3689] / [i915#3886])
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb3/igt@kms_ccs@pipe-c-bad-pixel-format-y_tiled_gen12_mc_ccs.html

* igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_gen12_mc_ccs:
- shard-apl: NOTRUN -> [SKIP][42] ([fdo#109271] / [i915#3886]) +17 similar issues
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-apl8/igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_gen12_mc_ccs.html

* igt@kms_ccs@pipe-c-crc-sprite-planes-basic-yf_tiled_ccs:
- shard-tglb: NOTRUN -> [SKIP][43] ([i915#3689]) +3 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb3/igt@kms_ccs@pipe-c-crc-sprite-planes-basic-yf_tiled_ccs.html

* igt@kms_chamelium@dp-crc-single:
- shard-iclb: NOTRUN -> [SKIP][44] ([fdo#109284] / [fdo#111827]) +1 similar issue
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-iclb8/igt@[email protected]

* igt@kms_chamelium@hdmi-edid-change-during-suspend:
- shard-apl: NOTRUN -> [SKIP][45] ([fdo#109271] / [fdo#111827]) +25 similar issues
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-apl1/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd-for-each-pipe:
- shard-kbl: NOTRUN -> [SKIP][46] ([fdo#109271] / [fdo#111827]) +8 similar issues
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-kbl6/igt@[email protected]

* igt@kms_chamelium@hdmi-mode-timings:
- shard-snb: NOTRUN -> [SKIP][47] ([fdo#109271] / [fdo#111827]) +12 similar issues
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-snb2/igt@[email protected]

* igt@kms_color@pipe-d-ctm-0-25:
- shard-iclb: NOTRUN -> [SKIP][48] ([fdo#109278] / [i915#1149])
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-iclb8/igt@[email protected]

* igt@kms_color_chamelium@pipe-a-ctm-green-to-red:
- shard-glk: NOTRUN -> [SKIP][49] ([fdo#109271] / [fdo#111827]) +3 similar issues
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-glk4/igt@[email protected]

* igt@kms_color_chamelium@pipe-c-ctm-0-25:
- shard-tglb: NOTRUN -> [SKIP][50] ([fdo#109284] / [fdo#111827]) +5 similar issues
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb5/igt@[email protected]

* igt@kms_content_protection@atomic:
- shard-kbl: NOTRUN -> [TIMEOUT][51] ([i915#1319]) +1 similar issue
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-kbl2/igt@[email protected]

* igt@kms_content_protection@dp-mst-type-0:
- shard-tglb: NOTRUN -> [SKIP][52] ([i915#3116]) +1 similar issue
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb3/igt@[email protected]

* igt@kms_content_protection@mei_interface:
- shard-tglb: NOTRUN -> [SKIP][53] ([fdo#111828])
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb3/igt@kms_content_protection@mei_interface.html

* igt@kms_content_protection@uevent:
- shard-apl: NOTRUN -> [FAIL][54] ([i915#2105])
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-apl8/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-32x10-random:
- shard-tglb: NOTRUN -> [SKIP][55] ([i915#3359])
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb5/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-suspend:
- shard-skl: [PASS][56] -> [INCOMPLETE][57] ([i915#2828] / [i915#300])
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-skl7/igt@[email protected]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-skl2/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-apl: [PASS][58] -> [DMESG-WARN][59] ([i915#180]) +2 similar issues
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-apl2/igt@[email protected]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-apl6/igt@[email protected]

* igt@kms_cursor_crc@pipe-d-cursor-512x170-offscreen:
- shard-tglb: NOTRUN -> [SKIP][60] ([fdo#109279] / [i915#3359]) +3 similar issues
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb5/igt@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
- shard-skl: [PASS][61] -> [FAIL][62] ([i915#2346] / [i915#533])
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-skl5/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-skl4/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html

* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
- shard-skl: NOTRUN -> [SKIP][63] ([fdo#109271]) +1 similar issue
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-skl9/igt@[email protected]

* igt@kms_flip@2x-flip-vs-rmfb-interruptible:
- shard-iclb: NOTRUN -> [SKIP][64] ([fdo#109274]) +2 similar issues
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-iclb8/igt@[email protected]

* igt@kms_flip@flip-vs-expired-vblank-interruptible@c-edp1:
- shard-skl: [PASS][65] -> [FAIL][66] ([i915#2122]) +1 similar issue
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-skl5/igt@kms_flip@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-skl5/igt@kms_flip@[email protected]

* igt@kms_flip@flip-vs-expired-vblank@b-edp1:
- shard-skl: [PASS][67] -> [FAIL][68] ([i915#79])
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-skl2/igt@kms_flip@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-skl1/igt@kms_flip@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible@c-dp1:
- shard-apl: NOTRUN -> [DMESG-WARN][69] ([i915#180])
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-apl2/igt@kms_flip@[email protected]

* igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-16bpp-ytile:
- shard-iclb: [PASS][70] -> [SKIP][71] ([i915#3701])
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-iclb3/igt@[email protected]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-iclb2/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-spr-indfb-draw-mmap-cpu:
- shard-iclb: NOTRUN -> [SKIP][72] ([fdo#109280]) +5 similar issues
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-iclb8/igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-spr-indfb-draw-mmap-cpu.html

* igt@kms_frontbuffer_tracking@psr-2p-scndscrn-cur-indfb-draw-mmap-gtt:
- shard-tglb: NOTRUN -> [SKIP][73] ([fdo#111825]) +21 similar issues
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb3/igt@kms_frontbuffer_tracking@psr-2p-scndscrn-cur-indfb-draw-mmap-gtt.html

* igt@kms_hdr@bpc-switch-dpms:
- shard-skl: [PASS][74] -> [FAIL][75] ([i915#1188])
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-skl6/igt@[email protected]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-skl5/igt@[email protected]

* igt@kms_panel_fitting@legacy:
- shard-kbl: NOTRUN -> [SKIP][76] ([fdo#109271]) +108 similar issues
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-kbl7/igt@[email protected]

* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
- shard-apl: NOTRUN -> [SKIP][77] ([fdo#109271] / [i915#533]) +2 similar issues
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-apl8/igt@[email protected]

* igt@kms_pipe_crc_basic@disable-crc-after-crtc-pipe-d:
- shard-kbl: NOTRUN -> [SKIP][78] ([fdo#109271] / [i915#533])
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-kbl7/igt@[email protected]

* igt@kms_pipe_crc_basic@read-crc-pipe-d-frame-sequence:
- shard-glk: NOTRUN -> [SKIP][79] ([fdo#109271] / [i915#533])
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-glk4/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
- shard-skl: [PASS][80] -> [FAIL][81] ([fdo#108145] / [i915#265])
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-skl2/igt@[email protected]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-skl7/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max:
- shard-apl: NOTRUN -> [FAIL][82] ([fdo#108145] / [i915#265]) +1 similar issue
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-apl2/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-c-alpha-basic:
- shard-kbl: NOTRUN -> [FAIL][83] ([fdo#108145] / [i915#265]) +1 similar issue
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-kbl6/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-d-constant-alpha-max:
- shard-iclb: NOTRUN -> [SKIP][84] ([fdo#109278]) +4 similar issues
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-iclb8/igt@[email protected]

* igt@kms_plane_lowres@pipe-b-tiling-none:
- shard-tglb: NOTRUN -> [SKIP][85] ([i915#3536]) +2 similar issues
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb3/igt@[email protected]

* igt@kms_plane_lowres@pipe-d-tiling-yf:
- shard-tglb: NOTRUN -> [SKIP][86] ([fdo#112054]) +1 similar issue
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb5/igt@[email protected]

* igt@kms_plane_scaling@scaler-with-clipping-clamping@pipe-c-scaler-with-clipping-clamping:
- shard-apl: NOTRUN -> [SKIP][87] ([fdo#109271] / [i915#2733])
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-apl3/igt@kms_plane_scaling@scaler-with-clipping-clamping@pipe-c-scaler-with-clipping-clamping.html

* igt@kms_prime@basic-crc@first-to-second:
- shard-tglb: NOTRUN -> [SKIP][88] ([i915#1836])
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb5/igt@kms_prime@[email protected]

* igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-1:
- shard-kbl: NOTRUN -> [SKIP][89] ([fdo#109271] / [i915#658]) +1 similar issue
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-kbl2/igt@[email protected]

* igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-2:
- shard-apl: NOTRUN -> [SKIP][90] ([fdo#109271] / [i915#658]) +3 similar issues
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-apl6/igt@[email protected]

* igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-3:
- shard-iclb: NOTRUN -> [SKIP][91] ([i915#658])
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-iclb8/igt@[email protected]

* igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-4:
- shard-tglb: NOTRUN -> [SKIP][92] ([i915#2920])
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb3/igt@[email protected]

* igt@kms_psr2_sf@plane-move-sf-dmg-area-2:
- shard-glk: NOTRUN -> [SKIP][93] ([fdo#109271] / [i915#658])
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-glk4/igt@[email protected]

* igt@kms_psr@psr2_primary_mmap_gtt:
- shard-tglb: NOTRUN -> [FAIL][94] ([i915#132] / [i915#3467])
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb5/igt@kms_psr@psr2_primary_mmap_gtt.html

* igt@kms_psr@psr2_primary_page_flip:
- shard-iclb: [PASS][95] -> [SKIP][96] ([fdo#109441]) +1 similar issue
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-iclb7/igt@kms_psr@psr2_primary_page_flip.html

* igt@kms_rotation_crc@primary-yf-tiled-reflect-x-0:
- shard-tglb: NOTRUN -> [SKIP][97] ([fdo#111615]) +4 similar issues
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb5/igt@[email protected]

* igt@kms_setmode@basic:
- shard-snb: NOTRUN -> [FAIL][98] ([i915#31])
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-snb2/igt@[email protected]

* igt@kms_sysfs_edid_timing:
- shard-apl: NOTRUN -> [FAIL][99] ([IGT#2])
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-apl8/igt@kms_sysfs_edid_timing.html

* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-tglb: [PASS][100] -> [INCOMPLETE][101] ([i915#2828] / [i915#456])
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-tglb5/igt@[email protected]
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb7/igt@[email protected]

* igt@kms_writeback@writeback-fb-id:
- shard-tglb: NOTRUN -> [SKIP][102] ([i915#2437])
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb5/igt@[email protected]

* igt@kms_writeback@writeback-pixel-formats:
- shard-apl: NOTRUN -> [SKIP][103] ([fdo#109271] / [i915#2437])
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-apl8/igt@[email protected]

* igt@prime_nv_api@i915_nv_reimport_twice_check_flink_name:
- shard-apl: NOTRUN -> [SKIP][104] ([fdo#109271]) +321 similar issues
[104]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-apl8/igt@prime_nv_api@i915_nv_reimport_twice_check_flink_name.html

* igt@prime_nv_pcopy@test3_2:
- shard-tglb: NOTRUN -> [SKIP][105] ([fdo#109291])
[105]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb5/igt@prime_nv_pcopy@test3_2.html

* igt@prime_vgem@basic-userptr:
- shard-tglb: NOTRUN -> [SKIP][106] ([i915#3301])
[106]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb5/igt@[email protected]

* igt@prime_vgem@fence-read-hang:
- shard-tglb: NOTRUN -> [SKIP][107] ([fdo#109295])
[107]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb3/igt@[email protected]

* igt@sysfs_clients@create:
- shard-glk: NOTRUN -> [SKIP][108] ([fdo#109271] / [i915#2994])
[108]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-glk4/igt@[email protected]

* igt@sysfs_clients@fair-0:
- shard-apl: NOTRUN -> [SKIP][109] ([fdo#109271] / [i915#2994]) +3 similar issues
[109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-apl8/igt@[email protected]

* igt@sysfs_clients@fair-3:
- shard-kbl: NOTRUN -> [SKIP][110] ([fdo#109271] / [i915#2994]) +2 similar issues
[110]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-kbl7/igt@[email protected]

* igt@sysfs_clients@sema-25:
- shard-tglb: NOTRUN -> [SKIP][111] ([i915#2994]) +1 similar issue
[111]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb5/igt@[email protected]

#### Possible fixes ####

* igt@gem_ctx_isolation@preservation-s3@bcs0:
- shard-apl: [DMESG-WARN][112] ([i915#180]) -> [PASS][113]
[112]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-apl1/igt@gem_ctx_isolation@[email protected]
[113]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-apl1/igt@gem_ctx_isolation@[email protected]

* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-tglb: [FAIL][114] ([i915#2842]) -> [PASS][115]
[114]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-tglb8/igt@gem_exec_fair@[email protected]
[115]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb1/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-pace-solo@rcs0:
- shard-iclb: [FAIL][116] ([i915#2842]) -> [PASS][117] +1 similar issue
[116]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-iclb5/igt@gem_exec_fair@[email protected]
[117]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-iclb6/igt@gem_exec_fair@[email protected]

* igt@gem_exec_parallel@fds@vecs0:
- shard-iclb: [INCOMPLETE][118] ([i915#1895]) -> [PASS][119]
[118]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-iclb7/igt@gem_exec_parallel@[email protected]
[119]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-iclb8/igt@gem_exec_parallel@[email protected]

* igt@gem_huc_copy@huc-copy:
- shard-tglb: [SKIP][120] ([i915#2190]) -> [PASS][121]
[120]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-tglb7/igt@[email protected]
[121]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb3/igt@[email protected]

* igt@gem_mmap_offset@bad-flags:
- shard-glk: [DMESG-WARN][122] ([i915#118] / [i915#95]) -> [PASS][123]
[122]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-glk5/igt@[email protected]
[123]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-glk1/igt@[email protected]

* igt@i915_pm_dc@dc6-dpms:
- shard-iclb: [FAIL][124] ([i915#454]) -> [PASS][125] +1 similar issue
[124]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-iclb3/igt@[email protected]
[125]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-iclb5/igt@[email protected]

* igt@kms_color@pipe-c-ctm-0-25:
- shard-skl: [DMESG-WARN][126] ([i915#1982]) -> [PASS][127] +2 similar issues
[126]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-skl6/igt@[email protected]
[127]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-skl6/igt@[email protected]

* igt@kms_fbcon_fbt@fbc-suspend:
- shard-tglb: [INCOMPLETE][128] ([i915#2411] / [i915#4173] / [i915#456]) -> [PASS][129]
[128]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-tglb7/igt@[email protected]
[129]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-tglb5/igt@[email protected]
- shard-kbl: [INCOMPLETE][130] ([i915#155] / [i915#180] / [i915#636]) -> [PASS][131]
[130]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-kbl6/igt@[email protected]
[131]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-kbl2/igt@[email protected]

* igt@kms_flip@plain-flip-fb-recreate-interruptible@c-edp1:
- shard-skl: [FAIL][132] ([i915#2122]) -> [PASS][133] +2 similar issues
[132]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-skl9/igt@kms_flip@[email protected]
[133]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/shard-skl3/igt@kms_flip@[email protected]

* igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytile:
- shard-iclb: [SKIP][134] ([i915#3701]) -> [PASS][135] +1 similar issue
[134]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10655/shard-iclb2/igt@[email protected]
[135]: https://intel-gfx-ci.01.org/tr

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21179/index.html

Reviewed-by on v1 1/1
#3 lore raw
In reply to Ville Syrjala
Quoted 31 lines

-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Ville Syrjala
Sent: Wednesday, September 29, 2021 12:21 AM
To: [email protected]
Subject: [Intel-gfx] [PATCH] drm/i915: Stop force enabling pipe bottom color gammma/csc

From: Ville Syrjälä <[email protected]>

While sanitizing the hardware state we're currently forcing the pipe bottom color legacy csc/gamma bits on. That is not a good idea as BIOSen are likely to leave gabage in the LUTs and so doing this causes ugly visual glitches if and when the planes covering the background get disabled. This was exactly the case on this Dell Precision 5560 tgl laptop.

On icl+ we don't normally even use these legacy bits anymore and instead use their GAMMA_MODE counterparts.
On earlier platforms the bits are used, but we still shouldn't force them on without knowing what's in the LUT.

So two options, get rid of the whole thing, or do what intel_color_commit() does to make sure the bottom color state matches whatever out hardware readout produced. I chose the latter since it'll match what happens on older platforms when the primary plane gets turned off. In fact let's just call intel_color_commit(). It'll also do some CSC programming but since we don't have readout for that it'll actually just set to all zeros. So in the unlikely case of CSC actually being enabld by the BIOS we'll end up with all black until the first atomic commit happens.

Quoted 9 lines

Still not totally sure what we should do about color management features here in general. Probably the safest thing would be to force everything off exactly at the same time when we disable the primary plane as there is no guarantees that whatever the LUTs/CSCs contain make any sense whatsoever without the specific pixel data in the BIOS fb. And if we preserve the primary plane then we should disable the color management features exactly when the primary plane fb contents first changes since the new content assumes more or less no transformations. But of course synchronizing front buffer rendering with anything else is a bit hard...

A nice catch.

Looks Good to me.

Quoted 30 lines
---
 drivers/gpu/drm/i915/display/intel_display.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +2 -7
index f27c294beb92..17ce51576ed2 100644
@@ -11991,13 +11991,8 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc,
 				intel_plane_disable_noatomic(crtc, plane);
 		}
 
-		/*
-		 * Disable any background color set by the BIOS, but enable the
-		 * gamma and CSC to match how we program our planes.
-		 */
-		if (DISPLAY_VER(dev_priv) >= 9)
-			intel_de_write(dev_priv, SKL_BOTTOM_COLOR(crtc->pipe),
-				       SKL_BOTTOM_COLOR_GAMMA_ENABLE |
 SKL_BOTTOM_COLOR_CSC_ENABLE);
+		/* Disable any background color/etc. set by the BIOS */
+		intel_color_commit(crtc_state);
 	}
 

/* Adjust the state of the output pipe according to whether we
--
2.32.0

#4 lore raw
Quoted 31 lines · Uma
Quoted 31 lines

-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Ville Syrjala
Sent: Wednesday, September 29, 2021 12:21 AM
To: [email protected]
Subject: [Intel-gfx] [PATCH] drm/i915: Stop force enabling pipe bottom color gammma/csc

From: Ville Syrjälä <[email protected]>

While sanitizing the hardware state we're currently forcing the pipe bottom color legacy csc/gamma bits on. That is not a good idea as BIOSen are likely to leave gabage in the LUTs and so doing this causes ugly visual glitches if and when the planes covering the background get disabled. This was exactly the case on this Dell Precision 5560 tgl laptop.

On icl+ we don't normally even use these legacy bits anymore and instead use their GAMMA_MODE counterparts.
On earlier platforms the bits are used, but we still shouldn't force them on without knowing what's in the LUT.

So two options, get rid of the whole thing, or do what intel_color_commit() does to make sure the bottom color state matches whatever out hardware readout produced. I chose the latter since it'll match what happens on older platforms when the primary plane gets turned off. In fact let's just call intel_color_commit(). It'll also do some CSC programming but since we don't have readout for that it'll actually just set to all zeros. So in the unlikely case of CSC actually being enabld by the BIOS we'll end up with all black until the first atomic commit happens.

Quoted 8 lines
Quoted 8 lines

Still not totally sure what we should do about color management features here in general. Probably the safest thing would be to force everything off exactly at the same time when we disable the primary plane as there is no guarantees that whatever the LUTs/CSCs contain make any sense whatsoever without the specific pixel data in the BIOS fb. And if we preserve the primary plane then we should disable the color management features exactly when the primary plane fb contents first changes since the new content assumes more or less no transformations. But of course synchronizing front buffer rendering with anything else is a bit hard...

After a second thought I think the safes option would be to:
- add full readout for all color management stuff (but IIRC the csc had some double buffering vs. readout problems on some platforms, so this needs a bit of extra care)
- disable all of it, and the primary plane, but only if any color management stuff was enabled by the BIOS
- make it all atomic so that no annoying colored blinky happens

That would guarantee that if any unknown color transformation are applied to the data in the BIOS fb we don't do any of those to whatever is the thing (fbcon or some userspace thing) that takes over afterwards.

And if the BIOS is not using any transformations then we can let the full BIOS fb takeover happen as it does today.

Quoted 6 lines
Quoted 1 line

A nice catch.

Looks Good to me.

Ta.

Quoted 32 lines
Quoted 31 lines
---
 drivers/gpu/drm/i915/display/intel_display.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +2 -7
index f27c294beb92..17ce51576ed2 100644
@@ -11991,13 +11991,8 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc,
 				intel_plane_disable_noatomic(crtc, plane);
 		}
 
-		/*
-		 * Disable any background color set by the BIOS, but enable the
-		 * gamma and CSC to match how we program our planes.
-		 */
-		if (DISPLAY_VER(dev_priv) >= 9)
-			intel_de_write(dev_priv, SKL_BOTTOM_COLOR(crtc->pipe),
-				       SKL_BOTTOM_COLOR_GAMMA_ENABLE |
 SKL_BOTTOM_COLOR_CSC_ENABLE);
+		/* Disable any background color/etc. set by the BIOS */
+		intel_color_commit(crtc_state);
 	}
 

/* Adjust the state of the output pipe according to whether we
--
2.32.0

Signature · 2 lines
Ville Syrjälä
Intel
#5 lore raw
Quoted 41 lines · Ville Syrjälä
Quoted 31 lines · Uma
Quoted 31 lines

-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Ville Syrjala
Sent: Wednesday, September 29, 2021 12:21 AM
To: [email protected]
Subject: [Intel-gfx] [PATCH] drm/i915: Stop force enabling pipe bottom color gammma/csc

From: Ville Syrjälä <[email protected]>

While sanitizing the hardware state we're currently forcing the pipe bottom color legacy csc/gamma bits on. That is not a good idea as BIOSen are likely to leave gabage in the LUTs and so doing this causes ugly visual glitches if and when the planes covering the background get disabled. This was exactly the case on this Dell Precision 5560 tgl laptop.

On icl+ we don't normally even use these legacy bits anymore and instead use their GAMMA_MODE counterparts.
On earlier platforms the bits are used, but we still shouldn't force them on without knowing what's in the LUT.

So two options, get rid of the whole thing, or do what intel_color_commit() does to make sure the bottom color state matches whatever out hardware readout produced. I chose the latter since it'll match what happens on older platforms when the primary plane gets turned off. In fact let's just call intel_color_commit(). It'll also do some CSC programming but since we don't have readout for that it'll actually just set to all zeros. So in the unlikely case of CSC actually being enabld by the BIOS we'll end up with all black until the first atomic commit happens.

Quoted 8 lines
Quoted 8 lines

Still not totally sure what we should do about color management features here in general. Probably the safest thing would be to force everything off exactly at the same time when we disable the primary plane as there is no guarantees that whatever the LUTs/CSCs contain make any sense whatsoever without the specific pixel data in the BIOS fb. And if we preserve the primary plane then we should disable the color management features exactly when the primary plane fb contents first changes since the new content assumes more or less no transformations. But of course synchronizing front buffer rendering with anything else is a bit hard...

Quoted 7 lines

After a second thought I think the safes option would be to:
- add full readout for all color management stuff (but IIRC the csc had some double buffering vs. readout problems on some platforms, so this needs a bit of extra care)
- disable all of it, and the primary plane, but only if any color management stuff was enabled by the BIOS
- make it all atomic so that no annoying colored blinky happens

Hmm. One clean way to make it atomic would be to always do the BIOS fb takeover, but just not hand over the result to the fb_helper when we don't want it to start using it directly. Thus we'd just do a normal atomic commit at some point page flipping from the BIOS fb to the fresh fbcon/user framebuffer, and color management would also change states more or less atomically. This would mean hanging on to that piece of stolen memory a bit longer, meaning something else might not be able to allocate there during driver init. Not sure if that could be a problem or not.

Quoted 54 lines

That would guarantee that if any unknown color transformation are applied to the data in the BIOS fb we don't do any of those to whatever is the thing (fbcon or some userspace thing) that takes over afterwards.

And if the BIOS is not using any transformations then we can let the full BIOS fb takeover happen as it does today.

Quoted 6 lines
Quoted 1 line

A nice catch.

Looks Good to me.

Ta.

Quoted 32 lines
Quoted 31 lines
---
 drivers/gpu/drm/i915/display/intel_display.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +2 -7
index f27c294beb92..17ce51576ed2 100644
@@ -11991,13 +11991,8 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc,
 				intel_plane_disable_noatomic(crtc, plane);
 		}
 
-		/*
-		 * Disable any background color set by the BIOS, but enable the
-		 * gamma and CSC to match how we program our planes.
-		 */
-		if (DISPLAY_VER(dev_priv) >= 9)
-			intel_de_write(dev_priv, SKL_BOTTOM_COLOR(crtc->pipe),
-				       SKL_BOTTOM_COLOR_GAMMA_ENABLE |
 SKL_BOTTOM_COLOR_CSC_ENABLE);
+		/* Disable any background color/etc. set by the BIOS */
+		intel_color_commit(crtc_state);
 	}
 

/* Adjust the state of the output pipe according to whether we
--
2.32.0

Signature · 2 lines
Ville Syrjälä
Intel
Signature · 2 lines
Ville Syrjälä
Intel