Skip to contentSkip to conversation

drm/i915/icl: Fix for setting HDMI 10/12 bit Deep color correctly

PATCH In review Aditya Swarup 3 participants 7 messages Mar 31, 2019 – Apr 1, 2019

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

PATCH 1/2 drm/i915/icl: Fix for setting HDMI 10/12 bit Deep color correctly

From: Clinton Taylor <[email protected]>

Changing settings from 8 bit to 10/12 bit deep color(& vice versa) doesn't work correctly using xrandr max bpc property. Fix the driver for applying correct settings.

Test:
xrandr --output HDMI-2 --mode 3840x2160 --rate 30 --set "max bpc" 10 and then
xrandr --output HDMI-2 --mode 3840x2160 --rate 30 --set "max bpc" 8

Cc Ville Syrjälä <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Manasi Navare <[email protected]>

---
Fixes changing modes from 8 bit to 10/12 bit deep color.

 drivers/gpu/drm/i915/intel_hdmi.c | 31 +++++++++++++++----------------
 1 file changed, 15 insertions(+), 16 deletions(-)
drivers/gpu/drm/i915/intel_hdmi.c +15 -16
index 5ccb305a6e1c..4760462f84ca 100644
@@ -963,7 +963,9 @@ static void intel_hdmi_compute_gcp_infoframe(struct intel_encoder *encoder,
 		intel_hdmi_infoframe_enable(HDMI_PACKET_TYPE_GENERAL_CONTROL);
 
 	/* Indicate color depth whenever the sink supports deep color */
-	if (hdmi_sink_is_deep_color(conn_state))
+
+	if (hdmi_sink_is_deep_color(conn_state) &&
+	    (crtc_state->pipe_bpp > 24))
 		crtc_state->infoframes.gcp |= GCP_COLOR_INDICATION;
 
 	/* Enable default_phase whenever the display mode is suitably aligned */
@@ -2260,6 +2262,7 @@ int intel_hdmi_compute_config(struct intel_encoder *encoder,
 	int clock_8bpc = pipe_config->base.adjusted_mode.crtc_clock;
 	int clock_10bpc = clock_8bpc * 5 / 4;
 	int clock_12bpc = clock_8bpc * 3 / 2;
+	int dc_clock = clock_12bpc;
 	int desired_bpp;
 	bool force_dvi = intel_conn_state->force_audio == HDMI_AUDIO_OFF_DVI;
 
@@ -2314,22 +2317,18 @@ int intel_hdmi_compute_config(struct intel_encoder *encoder,
 	 * Note that g4x/vlv don't support 12bpc hdmi outputs. We also need
 	 * to check that the higher clock still fits within limits.
 	 */
-	if (hdmi_deep_color_possible(pipe_config, 12) &&
-	    hdmi_port_clock_valid(intel_hdmi, clock_12bpc,
+	if (pipe_config->pipe_bpp == 30)
+		dc_clock = clock_10bpc;
+
+	if (hdmi_deep_color_possible(pipe_config, pipe_config->pipe_bpp / 3) &&
+	    hdmi_port_clock_valid(intel_hdmi, dc_clock,
 				  true, force_dvi) == MODE_OK) {
-		DRM_DEBUG_KMS("picking bpc to 12 for HDMI output\n");
-		desired_bpp = 12*3;
-
-		/* Need to adjust the port link by 1.5x for 12bpc. */
-		pipe_config->port_clock = clock_12bpc;
-	} else if (hdmi_deep_color_possible(pipe_config, 10) &&
-		   hdmi_port_clock_valid(intel_hdmi, clock_10bpc,
-					 true, force_dvi) == MODE_OK) {
-		DRM_DEBUG_KMS("picking bpc to 10 for HDMI output\n");
-		desired_bpp = 10 * 3;
-
-		/* Need to adjust the port link by 1.25x for 10bpc. */
-		pipe_config->port_clock = clock_10bpc;
+		DRM_DEBUG_KMS("picking bpc to %d for HDMI output\n",
+				 pipe_config->pipe_bpp / 3);
+		desired_bpp = pipe_config->pipe_bpp;
+
+		/* Need to adjust the port link dc modes. */
+		pipe_config->port_clock = dc_clock;
 	} else {
 		DRM_DEBUG_KMS("picking bpc to 8 for HDMI output\n");
 		desired_bpp = 8*3;
Signature · 6 lines
2.17.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 2/2 drm/i915: Add N & CTS values for 10/12 bit deep color

Adding N & CTS values for 10/12 bit deep color from Appendix C table in HDMI 2.0 spec. The correct values for N is not chosen automatically by hardware for deep color modes.

Cc Clint Taylor <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Manasi Navare <[email protected]>
---
 drivers/gpu/drm/i915/intel_audio.c | 80 +++++++++++++++++++++++++++---
 1 file changed, 74 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_audio.c +74 -6
index 502b57ce72ab..285c65da2e4e 100644
@@ -182,6 +182,59 @@ static const struct {
 	{ 192000, TMDS_594M, 24576, 594000 },
 };
 
+/* Appendix C - N & CTS values for deep color from HDMI 2.0 spec*/
+/* HDMI N/CTS table for 10 bit deep color(30 bpp)*/
+#define TMDS_371M 371250
+#define TMDS_370M 370878
+
+static const struct {
+	int sample_rate;
+	int clock;
+	int n;
+	int cts;
+} hdmi_aud_ncts_30bpp[] = {
+	{ 32000, TMDS_370M, 5824, 527344 },
+	{ 32000, TMDS_371M, 6144, 556875 },
+	{ 44100, TMDS_370M, 8918, 585938 },
+	{ 44100, TMDS_371M, 4704, 309375 },
+	{ 88200, TMDS_370M, 17836, 585938 },
+	{ 88200, TMDS_371M, 9408, 309375 },
+	{ 176400, TMDS_370M, 35672, 585938 },
+	{ 176400, TMDS_371M, 18816, 309375 },
+	{ 48000, TMDS_370M, 11648, 703125 },
+	{ 48000, TMDS_371M, 5120, 309375 },
+	{ 96000, TMDS_370M, 23296, 703125 },
+	{ 96000, TMDS_371M, 10240, 309375 },
+	{ 192000, TMDS_370M, 46592, 703125 },
+	{ 192000, TMDS_371M, 20480, 309375 },
+};
+
+/* HDMI N/CTS table for 12 bit deep color(36 bpp)*/
+#define TMDS_445_5M 445500
+#define TMDS_445M 445054
+
+static const struct {
+	int sample_rate;
+	int clock;
+	int n;
+	int cts;
+} hdmi_aud_ncts_36bpp[] = {
+	{ 32000, TMDS_445M, 5824, 632813 },
+	{ 32000, TMDS_445_5M, 4096, 445500 },
+	{ 44100, TMDS_445M, 8918, 703125 },
+	{ 44100, TMDS_445_5M, 4704, 371250 },
+	{ 88200, TMDS_445M, 17836, 703125 },
+	{ 88200, TMDS_445_5M, 9408, 371250 },
+	{ 176400, TMDS_445M, 35672, 703125 },
+	{ 176400, TMDS_445_5M, 18816, 371250 },
+	{ 48000, TMDS_445M, 5824, 421875 },
+	{ 48000, TMDS_445_5M, 5120, 371250 },
+	{ 96000, TMDS_445M, 11648, 421875 },
+	{ 96000, TMDS_445_5M, 10240, 371250 },
+	{ 192000, TMDS_445M, 23296, 421875 },
+	{ 192000, TMDS_445_5M, 20480, 371250 },
+};
+
 /* get AUD_CONFIG_PIXEL_CLOCK_HDMI_* value for mode */
 static u32 audio_config_hdmi_pixel_clock(const struct intel_crtc_state *crtc_state)
 {
@@ -210,16 +263,31 @@ static u32 audio_config_hdmi_pixel_clock(const struct intel_crtc_state *crtc_sta
 static int audio_config_hdmi_get_n(const struct intel_crtc_state *crtc_state,
 				   int rate)
 {
-	const struct drm_display_mode *adjusted_mode =
-		&crtc_state->base.adjusted_mode;
 	int i;
 
-	for (i = 0; i < ARRAY_SIZE(hdmi_aud_ncts); i++) {
-		if (rate == hdmi_aud_ncts[i].sample_rate &&
-		    adjusted_mode->crtc_clock == hdmi_aud_ncts[i].clock) {
-			return hdmi_aud_ncts[i].n;
+	if (crtc_state->pipe_bpp == 36) {
+		for (i = 0; i < ARRAY_SIZE(hdmi_aud_ncts_36bpp); i++) {
+			if (rate == hdmi_aud_ncts_36bpp[i].sample_rate &&
+			    crtc_state->port_clock == hdmi_aud_ncts_36bpp[i].clock) {
+				return hdmi_aud_ncts_36bpp[i].n;
+			}
+		}
+	} else if (crtc_state->pipe_bpp == 30) {
+		for (i = 0; i < ARRAY_SIZE(hdmi_aud_ncts_30bpp); i++) {
+			if (rate == hdmi_aud_ncts_30bpp[i].sample_rate &&
+			    crtc_state->port_clock == hdmi_aud_ncts_30bpp[i].clock) {
+				return hdmi_aud_ncts_30bpp[i].n;
+			}
+		}
+	} else {
+		for (i = 0; i < ARRAY_SIZE(hdmi_aud_ncts); i++) {
+			if (rate == hdmi_aud_ncts[i].sample_rate &&
+			    crtc_state->port_clock == hdmi_aud_ncts[i].clock) {
+				return hdmi_aud_ncts[i].n;
+			}
 		}
 	}
+
 	return 0;
 }
 
Signature · 6 lines
2.17.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

Re: [PATCH 2/2] drm/i915: Add N & CTS values for 10/12 bit deep color

Quoted 99 lines · Aditya Swarup

Adding N & CTS values for 10/12 bit deep color from Appendix C table in HDMI 2.0 spec. The correct values for N is not chosen automatically by hardware for deep color modes.

Cc Clint Taylor <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Manasi Navare <[email protected]>
---
 drivers/gpu/drm/i915/intel_audio.c | 80 +++++++++++++++++++++++++++---
 1 file changed, 74 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_audio.c +63 -6
index 502b57ce72ab..285c65da2e4e 100644
@@ -182,6 +182,59 @@ static const struct {
 	{ 192000, TMDS_594M, 24576, 594000 },
 };
 
+/* Appendix C - N & CTS values for deep color from HDMI 2.0 spec*/
+/* HDMI N/CTS table for 10 bit deep color(30 bpp)*/
+#define TMDS_371M 371250
+#define TMDS_370M 370878
+
+static const struct {
+	int sample_rate;
+	int clock;
+	int n;
+	int cts;
+} hdmi_aud_ncts_30bpp[] = {
+	{ 32000, TMDS_370M, 5824, 527344 },
+	{ 32000, TMDS_371M, 6144, 556875 },
+	{ 44100, TMDS_370M, 8918, 585938 },
+	{ 44100, TMDS_371M, 4704, 309375 },
+	{ 88200, TMDS_370M, 17836, 585938 },
+	{ 88200, TMDS_371M, 9408, 309375 },
+	{ 176400, TMDS_370M, 35672, 585938 },
+	{ 176400, TMDS_371M, 18816, 309375 },
+	{ 48000, TMDS_370M, 11648, 703125 },
+	{ 48000, TMDS_371M, 5120, 309375 },
+	{ 96000, TMDS_370M, 23296, 703125 },
+	{ 96000, TMDS_371M, 10240, 309375 },
+	{ 192000, TMDS_370M, 46592, 703125 },
+	{ 192000, TMDS_371M, 20480, 309375 },
+};
+
+/* HDMI N/CTS table for 12 bit deep color(36 bpp)*/
+#define TMDS_445_5M 445500
+#define TMDS_445M 445054
+
+static const struct {
+	int sample_rate;
+	int clock;
+	int n;
+	int cts;
+} hdmi_aud_ncts_36bpp[] = {
+	{ 32000, TMDS_445M, 5824, 632813 },
+	{ 32000, TMDS_445_5M, 4096, 445500 },
+	{ 44100, TMDS_445M, 8918, 703125 },
+	{ 44100, TMDS_445_5M, 4704, 371250 },
+	{ 88200, TMDS_445M, 17836, 703125 },
+	{ 88200, TMDS_445_5M, 9408, 371250 },
+	{ 176400, TMDS_445M, 35672, 703125 },
+	{ 176400, TMDS_445_5M, 18816, 371250 },
+	{ 48000, TMDS_445M, 5824, 421875 },
+	{ 48000, TMDS_445_5M, 5120, 371250 },
+	{ 96000, TMDS_445M, 11648, 421875 },
+	{ 96000, TMDS_445_5M, 10240, 371250 },
+	{ 192000, TMDS_445M, 23296, 421875 },
+	{ 192000, TMDS_445_5M, 20480, 371250 },
+};
+
 /* get AUD_CONFIG_PIXEL_CLOCK_HDMI_* value for mode */
 static u32 audio_config_hdmi_pixel_clock(const struct intel_crtc_state *crtc_state)
 {
@@ -210,16 +263,31 @@ static u32 audio_config_hdmi_pixel_clock(const struct intel_crtc_state *crtc_sta
 static int audio_config_hdmi_get_n(const struct intel_crtc_state *crtc_state,
 				   int rate)
 {
-	const struct drm_display_mode *adjusted_mode =
-		&crtc_state->base.adjusted_mode;
 	int i;
 
-	for (i = 0; i < ARRAY_SIZE(hdmi_aud_ncts); i++) {
-		if (rate == hdmi_aud_ncts[i].sample_rate &&
-		    adjusted_mode->crtc_clock == hdmi_aud_ncts[i].clock) {
-			return hdmi_aud_ncts[i].n;
+	if (crtc_state->pipe_bpp == 36) {
+		for (i = 0; i < ARRAY_SIZE(hdmi_aud_ncts_36bpp); i++) {
+			if (rate == hdmi_aud_ncts_36bpp[i].sample_rate &&
+			    crtc_state->port_clock == hdmi_aud_ncts_36bpp[i].clock) {
+				return hdmi_aud_ncts_36bpp[i].n;
+			}
+		}
+	} else if (crtc_state->pipe_bpp == 30) {
+		for (i = 0; i < ARRAY_SIZE(hdmi_aud_ncts_30bpp); i++) {
+			if (rate == hdmi_aud_ncts_30bpp[i].sample_rate &&

drivers/gpu/drm/i915/intel_audio.c static u32 audio_config_hdmi_pixel_clock(const struct intel_crtc_state *crtc_sta · line 287

Quoted 10 lines
drivers/gpu/drm/i915/intel_audio.c +10 -0
+			    crtc_state->port_clock == hdmi_aud_ncts_30bpp[i].clock) {
+				return hdmi_aud_ncts_30bpp[i].n;
+			}
+		}
+	} else {
+		for (i = 0; i < ARRAY_SIZE(hdmi_aud_ncts); i++) {
+			if (rate == hdmi_aud_ncts[i].sample_rate &&
+			    crtc_state->port_clock == hdmi_aud_ncts[i].clock) {
+				return hdmi_aud_ncts[i].n;
+			}

Please only use one for loop for this. There are at least three ways to do this without duplication.

BR,
Jani.

Quoted 5 lines
drivers/gpu/drm/i915/intel_audio.c +1 -0
 		}
 	}
+
 	return 0;
 }
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915/icl: Fix for setting HDMI 10/12 bit Deep color correctly

In reply to Aditya Swarup
== Series Details ==

== Series Details ==

Series: series starting with [1/2] drm/i915/icl: Fix for setting HDMI 10/12 bit Deep color correctly
URL : https://patchwork.freedesktop.org/series/58784/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
8f7ec76513b3 drm/i915/icl: Fix for setting HDMI 10/12 bit Deep color correctly
-:35: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'crtc_state->pipe_bpp > 24'
#35: FILE: drivers/gpu/drm/i915/intel_hdmi.c:967:
+	if (hdmi_sink_is_deep_color(conn_state) &&
+	    (crtc_state->pipe_bpp > 24))

-:74: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #74: FILE: drivers/gpu/drm/i915/intel_hdmi.c:2327:
+ DRM_DEBUG_KMS("picking bpc to %d for HDMI output\n",
+ pipe_config->pipe_bpp / 3);

total: 0 errors, 0 warnings, 2 checks, 50 lines checked ee3932b8f93f drm/i915: Add N & CTS values for 10/12 bit deep color

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/icl: Fix for setting HDMI 10/12 bit Deep color correctly

In reply to Aditya Swarup
== Series Details ==

== Series Details ==

Series: series starting with [1/2] drm/i915/icl: Fix for setting HDMI 10/12 bit Deep color correctly
URL : https://patchwork.freedesktop.org/series/58784/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5845 -> Patchwork_12644
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/58784/revisions/1/mbox/

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: PASS -> INCOMPLETE [fdo#107718]

* igt@i915_selftest@live_contexts:
- fi-skl-gvtdvm: PASS -> DMESG-FAIL [fdo#110235 ]

* igt@i915_selftest@live_execlists:
- fi-apl-guc: NOTRUN -> INCOMPLETE [fdo#103927] / [fdo#109720]

* igt@kms_psr@primary_page_flip:
- fi-apl-guc: NOTRUN -> SKIP [fdo#109271] +50

* igt@runner@aborted:
- fi-apl-guc: NOTRUN -> FAIL [fdo#108622] / [fdo#109720]

#### Warnings ####

* igt@kms_chamelium@common-hpd-after-suspend:
- fi-kbl-7567u: DMESG-FAIL [fdo#105079] -> DMESG-WARN [fdo#103558] / [fdo#105079] / [fdo#105602]

[fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#105079]: https://bugs.freedesktop.org/show_bug.cgi?id=105079
[fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720
[fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235

Participating hosts (47 -> 32)
------------------------------

Additional (1): fi-apl-guc
Missing (16): fi-kbl-soraka fi-ilk-m540 fi-bxt-dsi fi-hsw-4200u fi-byt-n2820 fi-byt-squawks fi-bsw-cyan fi-snb-2520m fi-kbl-x1275 fi-icl-u3 fi-skl-lmem fi-bdw-samus fi-icl-guc fi-byt-clapper fi-skl-6700k2 fi-kbl-r

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

* Linux: CI_DRM_5845 -> Patchwork_12644

CI_DRM_5845: 19b80f537228354a34ff532c9a765e19ebc7cafe @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4914: b93309b7823dcbbd2c52adb4ebb98e3cb060f910 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12644: ee3932b8f93f6f51fa9e7b50d509af6e8cc74140 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

ee3932b8f93f drm/i915: Add N & CTS values for 10/12 bit deep color 8f7ec76513b3 drm/i915/icl: Fix for setting HDMI 10/12 bit Deep color correctly

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12644/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915/icl: Fix for setting HDMI 10/12 bit Deep color correctly

In reply to Aditya Swarup
== Series Details ==

== Series Details ==

Series: series starting with [1/2] drm/i915/icl: Fix for setting HDMI 10/12 bit Deep color correctly
URL : https://patchwork.freedesktop.org/series/58784/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5845_full -> Patchwork_12644_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_12644_full:

### IGT changes ###

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* {igt@kms_plane@pixel-format-pipe-b-planes-source-clamping}:
- shard-skl: NOTRUN -> FAIL

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_tiled_blits@normal:
- shard-iclb: PASS -> TIMEOUT [fdo#109673]

* igt@gem_userptr_blits@process-exit-gtt:
- shard-glk: NOTRUN -> SKIP [fdo#109271] +60

* igt@i915_pm_rpm@system-suspend:
- shard-skl: PASS -> INCOMPLETE [fdo#104108] / [fdo#107807]

* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a:
- shard-skl: NOTRUN -> DMESG-WARN [fdo#110222]

* igt@kms_busy@extended-modeset-hang-oldfb-render-d:
- shard-glk: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +7

* igt@kms_busy@extended-pageflip-hang-newfb-render-a:
- shard-glk: NOTRUN -> DMESG-WARN [fdo#110222] +1

* igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-f:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1

* igt@kms_cursor_crc@cursor-128x128-onscreen:
- shard-glk: NOTRUN -> FAIL [fdo#103232]

* igt@kms_cursor_crc@cursor-256x85-sliding:
- shard-iclb: PASS -> FAIL [fdo#103232]

* igt@kms_cursor_crc@cursor-512x170-offscreen:
- shard-iclb: NOTRUN -> SKIP [fdo#109279]

* igt@kms_flip@2x-flip-vs-wf_vblank-interruptible:
- shard-skl: NOTRUN -> SKIP [fdo#109271] +32

* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-mmap-wc:
- shard-iclb: NOTRUN -> SKIP [fdo#109280] +4

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite:
- shard-iclb: PASS -> FAIL [fdo#103167] +9

* igt@kms_frontbuffer_tracking@psr-2p-primscrn-spr-indfb-draw-pwrite:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] +22

* igt@kms_plane@plane-position-hole-pipe-b-planes:
- shard-iclb: PASS -> DMESG-WARN [fdo#106107]

* igt@kms_plane_alpha_blend@pipe-a-alpha-7efc:
- shard-skl: NOTRUN -> FAIL [fdo#107815] / [fdo#108145]

* igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
- shard-glk: NOTRUN -> FAIL [fdo#108145]

* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: PASS -> FAIL [fdo#107815]

* igt@kms_psr@psr2_cursor_blt:
- shard-iclb: NOTRUN -> SKIP [fdo#109441]

* igt@kms_vblank@pipe-c-query-idle-hang:
- shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +4

* igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend:
- shard-apl: PASS -> FAIL [fdo#104894]

* igt@perf@sysctl-defaults:
- shard-apl: PASS -> INCOMPLETE [fdo#103927]

* igt@perf_pmu@render-node-busy-vcs1:
- shard-iclb: NOTRUN -> SKIP [fdo#109276]

* igt@prime_busy@wait-after-bsd:
- shard-snb: NOTRUN -> SKIP [fdo#109271] +38

#### Possible fixes ####

* igt@gem_tiled_fence_blits@normal:
- shard-iclb: TIMEOUT [fdo#109673] -> PASS +1

* igt@i915_pm_rpm@i2c:
- shard-iclb: DMESG-WARN [fdo#109982] -> PASS

* igt@kms_busy@extended-modeset-hang-newfb-render-a:
- shard-skl: DMESG-WARN [fdo#110222] -> PASS

* igt@kms_cursor_crc@cursor-128x128-onscreen:
- shard-iclb: FAIL [fdo#103232] -> PASS

* igt@kms_cursor_legacy@cursor-vs-flip-toggle:
- shard-iclb: FAIL [fdo#103355] -> PASS

* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-skl: FAIL [fdo#105363] -> PASS

* igt@kms_flip@flip-vs-suspend:
- shard-skl: INCOMPLETE [fdo#109507] -> PASS

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt:
- shard-iclb: FAIL [fdo#103167] -> PASS +14

* {igt@kms_plane@pixel-format-pipe-c-planes}:
- shard-glk: SKIP [fdo#109271] -> PASS

* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
- shard-skl: FAIL [fdo#108145] -> PASS

* igt@kms_plane_scaling@pipe-c-scaler-with-clipping-clamping:
- shard-iclb: INCOMPLETE [fdo#110041] -> PASS

* igt@kms_psr@no_drrs:
- shard-iclb: FAIL [fdo#108341] -> PASS

* igt@kms_psr@psr2_primary_mmap_gtt:
- shard-iclb: SKIP [fdo#109441] -> PASS +2

* igt@kms_rotation_crc@multiplane-rotation:
- shard-kbl: FAIL [fdo#109016] -> PASS

* igt@kms_rotation_crc@multiplane-rotation-cropping-bottom:
- shard-kbl: DMESG-FAIL [fdo#105763] -> PASS

* igt@kms_vblank@pipe-b-ts-continuation-dpms-rpm:
- shard-apl: FAIL [fdo#104894] -> PASS

* igt@kms_vblank@pipe-b-ts-continuation-suspend:
- shard-skl: INCOMPLETE [fdo#104108] / [fdo#107773] -> PASS

* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-iclb: FAIL [fdo#104894] -> PASS

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103355]: https://bugs.freedesktop.org/show_bug.cgi?id=103355
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
[fdo#107773]: https://bugs.freedesktop.org/show_bug.cgi?id=107773
[fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
[fdo#107815]: https://bugs.freedesktop.org/show_bug.cgi?id=107815
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108341]: https://bugs.freedesktop.org/show_bug.cgi?id=108341
[fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109507]: https://bugs.freedesktop.org/show_bug.cgi?id=109507
[fdo#109673]: https://bugs.freedesktop.org/show_bug.cgi?id=109673
[fdo#109982]: https://bugs.freedesktop.org/show_bug.cgi?id=109982
[fdo#110041]: https://bugs.freedesktop.org/show_bug.cgi?id=110041
[fdo#110222]: https://bugs.freedesktop.org/show_bug.cgi?id=110222
[fdo#110281]: https://bugs.freedesktop.org/show_bug.cgi?id=110281

Participating hosts (10 -> 9)
------------------------------

Missing (1): shard-hsw

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

* Linux: CI_DRM_5845 -> Patchwork_12644

CI_DRM_5845: 19b80f537228354a34ff532c9a765e19ebc7cafe @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4914: b93309b7823dcbbd2c52adb4ebb98e3cb060f910 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12644: ee3932b8f93f6f51fa9e7b50d509af6e8cc74140 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12644/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#6 lore raw
In reply to Aditya Swarup
Quoted 5 lines · Aditya Swarup

From: Clinton Taylor <[email protected]>

Changing settings from 8 bit to 10/12 bit deep color(& vice versa) doesn't work correctly using xrandr max bpc property. Fix the driver for applying correct settings.

Please describe *why* there is a problem, and *why* the patch fixes the problem. Telling us "there's a problem, fix it" isn't helpful.

BR,
Jani.

Quoted 74 lines

Test:
xrandr --output HDMI-2 --mode 3840x2160 --rate 30 --set "max bpc" 10 and then
xrandr --output HDMI-2 --mode 3840x2160 --rate 30 --set "max bpc" 8

Cc Ville Syrjälä <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Manasi Navare <[email protected]>

---
Fixes changing modes from 8 bit to 10/12 bit deep color.

 drivers/gpu/drm/i915/intel_hdmi.c | 31 +++++++++++++++----------------
 1 file changed, 15 insertions(+), 16 deletions(-)
drivers/gpu/drm/i915/intel_hdmi.c +15 -16
index 5ccb305a6e1c..4760462f84ca 100644
@@ -963,7 +963,9 @@ static void intel_hdmi_compute_gcp_infoframe(struct intel_encoder *encoder,
 		intel_hdmi_infoframe_enable(HDMI_PACKET_TYPE_GENERAL_CONTROL);
 
 	/* Indicate color depth whenever the sink supports deep color */
-	if (hdmi_sink_is_deep_color(conn_state))
+
+	if (hdmi_sink_is_deep_color(conn_state) &&
+	    (crtc_state->pipe_bpp > 24))
 		crtc_state->infoframes.gcp |= GCP_COLOR_INDICATION;
 
 	/* Enable default_phase whenever the display mode is suitably aligned */
@@ -2260,6 +2262,7 @@ int intel_hdmi_compute_config(struct intel_encoder *encoder,
 	int clock_8bpc = pipe_config->base.adjusted_mode.crtc_clock;
 	int clock_10bpc = clock_8bpc * 5 / 4;
 	int clock_12bpc = clock_8bpc * 3 / 2;
+	int dc_clock = clock_12bpc;
 	int desired_bpp;
 	bool force_dvi = intel_conn_state->force_audio == HDMI_AUDIO_OFF_DVI;
 
@@ -2314,22 +2317,18 @@ int intel_hdmi_compute_config(struct intel_encoder *encoder,
 	 * Note that g4x/vlv don't support 12bpc hdmi outputs. We also need
 	 * to check that the higher clock still fits within limits.
 	 */
-	if (hdmi_deep_color_possible(pipe_config, 12) &&
-	    hdmi_port_clock_valid(intel_hdmi, clock_12bpc,
+	if (pipe_config->pipe_bpp == 30)
+		dc_clock = clock_10bpc;
+
+	if (hdmi_deep_color_possible(pipe_config, pipe_config->pipe_bpp / 3) &&
+	    hdmi_port_clock_valid(intel_hdmi, dc_clock,
 				  true, force_dvi) == MODE_OK) {
-		DRM_DEBUG_KMS("picking bpc to 12 for HDMI output\n");
-		desired_bpp = 12*3;
-
-		/* Need to adjust the port link by 1.5x for 12bpc. */
-		pipe_config->port_clock = clock_12bpc;
-	} else if (hdmi_deep_color_possible(pipe_config, 10) &&
-		   hdmi_port_clock_valid(intel_hdmi, clock_10bpc,
-					 true, force_dvi) == MODE_OK) {
-		DRM_DEBUG_KMS("picking bpc to 10 for HDMI output\n");
-		desired_bpp = 10 * 3;
-
-		/* Need to adjust the port link by 1.25x for 10bpc. */
-		pipe_config->port_clock = clock_10bpc;
+		DRM_DEBUG_KMS("picking bpc to %d for HDMI output\n",
+				 pipe_config->pipe_bpp / 3);
+		desired_bpp = pipe_config->pipe_bpp;
+
+		/* Need to adjust the port link dc modes. */
+		pipe_config->port_clock = dc_clock;
 	} else {
 		DRM_DEBUG_KMS("picking bpc to 8 for HDMI output\n");
 		desired_bpp = 8*3;
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx