drm/i915/icl: Set GCP_COLOR_INDICATION only for 10/12 bit deep color
Subsystems (2)
PATCH v3 1/1 drm/i915/icl: Set GCP_COLOR_INDICATION only for 10/12 bit deep color
From: Clinton Taylor <[email protected]>
v2: Fix commit msg to reflect why issue occurs(Jani) Set GCP_COLOR_INDICATION only when we set 10/12 bit deep color.
Changing settings from 10/12 bit deep color to 8 bit(& vice versa) doesn't work correctly using xrandr max bpc property. When we connect a monitor which supports deep color, the highest deep color setting is selected; which sets GCP_COLOR_INDICATION. When we change the setting to 8 bit color, we still set GCP_COLOR_INDICATION which doesn't allow the switch back to 8 bit color.
v3: Add comments & explain changes in intel_hdmi_compute_config(Ville) Since HSW+, GCP_COLOR_INDICATION is not required for 8bpc.
Also, remove unnecessary calls to hdmi_deep_color_possible() from intel_hdmi_compute_config()
Ideally, hdmi_deep_color_possible() should be called only once to determine whether it is possible to set 10 or 12 bit deep color mode and adjust the desired bpp based on pipe_bpp instead of hard coding the values.
--- drivers/gpu/drm/i915/intel_hdmi.c | 36 ++++++++++++++++--------------- 1 file changed, 19 insertions(+), 17 deletions(-)
drivers/gpu/drm/i915/intel_hdmi.c +19 -17
@@ -962,8 +962,13 @@ static void intel_hdmi_compute_gcp_infoframe(struct intel_encoder *encoder, crtc_state->infoframes.enable |=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)) +/* Indicate color depth whenever the sink supports deep color. +* Also, 8bpc + color depth indication is no longer supported +* for HSW+ platforms. +* */ + +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 +2265,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 +2320,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
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for drm/i915/icl: Set GCP_COLOR_INDICATION only for 10/12 bit deep color
== Series Details ==
== Series Details ==
Series: drm/i915/icl: Set GCP_COLOR_INDICATION only for 10/12 bit deep color
URL : https://patchwork.freedesktop.org/series/58912/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip fb41fd4cd653 drm/i915/icl: Set GCP_COLOR_INDICATION only for 10/12 bit deep color -:50: WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line #50: FILE: drivers/gpu/drm/i915/intel_hdmi.c:968: + * */
-:91: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #91: FILE: drivers/gpu/drm/i915/intel_hdmi.c:2330:
+ DRM_DEBUG_KMS("picking bpc to %d for HDMI output\n",
+ pipe_config->pipe_bpp / 3);
total: 0 errors, 1 warnings, 1 checks, 55 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/icl: Set GCP_COLOR_INDICATION only for 10/12 bit deep color
In reply to Aditya Swarup== Series Details ==
== Series Details ==
Series: drm/i915/icl: Set GCP_COLOR_INDICATION only for 10/12 bit deep color
URL : https://patchwork.freedesktop.org/series/58912/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5860 -> Patchwork_12666
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/58912/revisions/1/mbox/
Known issues
------------
Here are the changes found in Patchwork_12666 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@amdgpu/amd_cs_nop@fork-compute0:
- fi-icl-y: NOTRUN -> SKIP [fdo#109315] +17
* igt@gem_workarounds@basic-read:
- fi-snb-2600: NOTRUN -> SKIP [fdo#109271] +57
* igt@i915_pm_rpm@module-reload:
- fi-skl-6770hq: PASS -> FAIL [fdo#108511]
- fi-skl-6600u: PASS -> DMESG-WARN [fdo#109513]
* igt@i915_selftest@live_contexts:
- fi-icl-y: NOTRUN -> DMESG-FAIL [fdo#108569]
* igt@i915_selftest@live_uncore:
- fi-ivb-3770: PASS -> DMESG-FAIL [fdo#110210]
* igt@kms_busy@basic-flip-c:
- fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
- fi-snb-2600: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
* igt@kms_chamelium@vga-edid-read:
- fi-hsw-4770r: NOTRUN -> SKIP [fdo#109271] +45
* igt@kms_pipe_crc_basic@hang-read-crc-pipe-c:
- fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] +48
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362] +1
* igt@runner@aborted:
- fi-skl-6600u: NOTRUN -> FAIL [fdo#104108] / [fdo#109513]
#### Possible fixes ####
* igt@gem_exec_suspend@basic-s4-devices:
- fi-blb-e6850: INCOMPLETE [fdo#107718] -> PASS
* igt@i915_module_load@reload:
- fi-icl-y: INCOMPLETE [fdo#107713] -> PASS
* igt@i915_selftest@live_execlists:
- fi-apl-guc: INCOMPLETE [fdo#103927] / [fdo#109720] -> PASS
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#108511]: https://bugs.freedesktop.org/show_bug.cgi?id=108511
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109513]: https://bugs.freedesktop.org/show_bug.cgi?id=109513
[fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720
[fdo#110210]: https://bugs.freedesktop.org/show_bug.cgi?id=110210
Participating hosts (46 -> 42)
------------------------------
Additional (2): fi-hsw-4770r fi-snb-2600
Missing (6): fi-kbl-soraka fi-ilk-m540 fi-byt-squawks fi-ctg-p8600 fi-icl-u3 fi-bdw-samus
Build changes
-------------
* Linux: CI_DRM_5860 -> Patchwork_12666
CI_DRM_5860: 837ba3cd997b59e53903ba29f4fe65c81f86f1e9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4923: 6285eec4f3b8f21833d9d2d852883569d6551822 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12666: fb41fd4cd6534bbb0a9ee022f8b7afbc70e575df @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
fb41fd4cd653 drm/i915/icl: Set GCP_COLOR_INDICATION only for 10/12 bit deep color
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12666/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 12 lines · Aditya Swarup
From: Clinton Taylor <[email protected]>
v2: Fix commit msg to reflect why issue occurs(Jani) Set
GCP_COLOR_INDICATIONonly when we set 10/12 bit deep color.Changing settings from 10/12 bit deep color to 8
bit(& vice versa)doesn't work correctly using xrandr max bpc property. When we connect a monitor which supports deep color, the highest deep color setting is selected; which setsGCP_COLOR_INDICATION. When we change the setting to 8 bit color, we still setGCP_COLOR_INDICATIONwhich doesn't allow the switch back to 8 bit color.
Quoted 5 lines
v3: Add comments & explain changes in
intel_hdmi_compute_config(Ville)Since HSW+,GCP_COLOR_INDICATIONis not required for 8bpc.Also, remove unnecessary calls to
hdmi_deep_color_possible()fromintel_hdmi_compute_config()
Nope. Please drop those hunsk.
Quoted 79 lines
Ideally,
hdmi_deep_color_possible()should be called only once to determine whether it is possible to set 10 or 12 bit deep color mode and adjust the desired bpp based onpipe_bppinstead of hard coding the values.Signed-off-by Clinton Taylor <[email protected]>Signed-off-by Aditya Swarup <[email protected]>Cc Ville Syrjälä <[email protected]>Cc Jani Nikula <[email protected]>Cc Manasi Navare <[email protected]>--- drivers/gpu/drm/i915/intel_hdmi.c | 36 ++++++++++++++++--------------- 1 file changed, 19 insertions(+), 17 deletions(-)drivers/gpu/drm/i915/intel_hdmi.c +19
-17@@ -962,8 +962,13 @@ static void intel_hdmi_compute_gcp_infoframe(struct intel_encoder *encoder, crtc_state->infoframes.enable |=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)) +/* Indicate color depth whenever the sink supports deep color. +* Also, 8bpc + color depth indication is no longer supported +* for HSW+ platforms. +* */ + +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 +2265,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 +2320,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 · 1 line
2.17.1
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx