Skip to contentSkip to conversation

drm/i915/hdmi: Initialize SCDC registers according to spec

PATCH In review [email protected] 3 participants 5 messages Oct 12, 2018 – Oct 15, 2018

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

PATCH 1/1 drm/i915/hdmi: Initialize SCDC registers according to spec

From: Clint Taylor <[email protected]>

Initialize SCDC Source Version and TDMS_Config_0 registers to nominal values during intel_hdmi_detect(). The i915 driver currently doesn't implement features that require polling of the status update bits. Once FRL, DSC, or Source Test is enabled in the driver the status flags will need to be read by the source according to specification.

Cc Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/intel_hdmi.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/gpu/drm/i915/intel_hdmi.c +12 -0
index 2c53efc..ab3eac5 100644
@@ -1910,6 +1910,8 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
 	struct drm_i915_private *dev_priv = to_i915(connector->dev);
 	struct intel_hdmi *intel_hdmi = intel_attached_hdmi(connector);
 	struct intel_encoder *encoder = &hdmi_to_dig_port(intel_hdmi)->base;
+	struct i2c_adapter *adapter =
+		intel_gmbus_get_adapter(dev_priv, intel_hdmi->ddc_bus);
 
 	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
 		      connector->base.id, connector->name);
@@ -1925,6 +1927,16 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
 	if (intel_hdmi_set_edid(connector))
 		status = connector_status_connected;
 
+	if (connector->display_info.hdmi.scdc.supported) {
+		/* SCDC source version HDMI 2.1 Sec. 10.4.1.2 */
+		if (drm_scdc_writeb(adapter, SCDC_SOURCE_VERSION, 0x01) < 0)
+			DRM_DEBUG_KMS("Unable to set SCDC Source Version register\n");
+
+		/* Clear SCDC CONFIG_0 HDMI 2.1 Sec. 10.4.1.6 - RR_Enable Polling Only */
+		if (drm_scdc_writeb(adapter, SCDC_CONFIG_0, 0x00) < 0)
+			DRM_DEBUG_KMS("Unable to set SCDC CONFIG_0 register\n");
+	}
+
 out:
 	intel_display_power_put(dev_priv, POWER_DOMAIN_GMBUS);
 
Signature · 6 lines
1.9.1

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

✓ Fi.CI.BAT: success for drm/i915/hdmi: Initialize SCDC registers according to spec

== Series Details ==

== Series Details ==

Series: drm/i915/hdmi: Initialize SCDC registers according to spec
URL : https://patchwork.freedesktop.org/series/50955/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4978 -> Patchwork_10449 =

== Summary - SUCCESS ==

No regressions found.

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

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@kms_flip@basic-flip-vs-modeset:
      fi-skl-6700hq:      PASS -> DMESG-WARN (fdo#105998)

    
    ==== Possible fixes ====

    igt@drv_module_reload@basic-reload:
      fi-blb-e6850:       INCOMPLETE (fdo#107718) -> PASS

    igt@kms_frontbuffer_tracking@basic:
      fi-byt-clapper:     FAIL (fdo#103167) -> PASS

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence:
      fi-byt-clapper:     FAIL (fdo#107362, fdo#103191) -> PASS +1

fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718

== Participating hosts (44 -> 42) ==

Additional (1): fi-icl-u
Missing (3): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan

== Build changes ==

* Linux: CI_DRM_4978 -> Patchwork_10449

CI_DRM_4978: ca98b2681a49a1417f8157af2d94a4f2d0bd0e47 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4674: 93871c6fb3c25e5d350c9faf36ded917174214de @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10449: 65cf2454ee0689f7395f5def957e1bb2a3c8788f @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

65cf2454ee06 drm/i915/hdmi: Initialize SCDC registers according to spec

== Logs ==

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

#2 lore raw

✓ Fi.CI.IGT: success for drm/i915/hdmi: Initialize SCDC registers according to spec

In reply to [email protected]
== Series Details ==

== Series Details ==

Series: drm/i915/hdmi: Initialize SCDC registers according to spec
URL : https://patchwork.freedesktop.org/series/50955/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4978_full -> Patchwork_10449_full =

== Summary - SUCCESS ==

No regressions found.

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_ppgtt@blt-vs-render-ctx0:
      shard-skl:          NOTRUN -> TIMEOUT (fdo#108039) +1

    igt@gem_ppgtt@blt-vs-render-ctxn:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665, fdo#106023)

    igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a:
      shard-skl:          NOTRUN -> DMESG-WARN (fdo#107956)

    igt@kms_cursor_crc@cursor-256x256-suspend:
      shard-apl:          PASS -> FAIL (fdo#103232, fdo#103191)

    igt@kms_cursor_crc@cursor-64x21-random:
      shard-apl:          PASS -> FAIL (fdo#103232)

    igt@kms_cursor_legacy@cursorb-vs-flipb-toggle:
      shard-glk:          PASS -> DMESG-WARN (fdo#106538, fdo#105763)

    igt@kms_draw_crc@draw-method-rgb565-mmap-cpu-ytiled:
      shard-skl:          NOTRUN -> FAIL (fdo#103184)

    igt@kms_fbcon_fbt@fbc:
      shard-skl:          NOTRUN -> FAIL (fdo#103833, fdo#105682)

    igt@kms_fbcon_fbt@psr:
      shard-skl:          NOTRUN -> FAIL (fdo#107882)

    igt@kms_flip@flip-vs-rmfb-interruptible:
      shard-kbl:          PASS -> DMESG-FAIL (fdo#103558, fdo#105602)

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt:
      shard-apl:          PASS -> FAIL (fdo#103167)

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-pwrite:
      shard-glk:          PASS -> FAIL (fdo#103167) +2

    igt@kms_frontbuffer_tracking@fbc-rgb565-draw-render:
      shard-skl:          NOTRUN -> FAIL (fdo#105682)

    igt@kms_frontbuffer_tracking@fbcpsr-1p-indfb-fliptrack:
      shard-skl:          NOTRUN -> FAIL (fdo#103167) +1

    igt@kms_plane@pixel-format-pipe-b-planes:
      shard-skl:          NOTRUN -> DMESG-FAIL (fdo#103166, fdo#106885)

    igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
      shard-skl:          NOTRUN -> FAIL (fdo#108145) +2

    igt@kms_plane_multiple@atomic-pipe-c-tiling-x:
      shard-glk:          PASS -> FAIL (fdo#103166) +1

    igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
      shard-apl:          PASS -> FAIL (fdo#103166) +1

    igt@kms_setmode@basic:
      shard-apl:          PASS -> FAIL (fdo#99912)

    igt@kms_vblank@pipe-c-ts-continuation-suspend:
      shard-kbl:          PASS -> DMESG-WARN (fdo#103558, fdo#105602)

    igt@pm_rpm@drm-resources-equal:
      shard-skl:          PASS -> INCOMPLETE (fdo#107807)

    igt@pm_rpm@modeset-pc8-residency-stress:
      shard-skl:          SKIP -> INCOMPLETE (fdo#107807)

    
    ==== Possible fixes ====

    igt@debugfs_test@read_all_entries_display_off:
      shard-skl:          INCOMPLETE (fdo#104108) -> PASS

    igt@gem_softpin@noreloc-s3:
      shard-skl:          INCOMPLETE (fdo#107773, fdo#104108) -> PASS

    igt@kms_busy@extended-pageflip-hang-newfb-render-a:
      shard-apl:          DMESG-WARN (fdo#107956) -> PASS

    igt@kms_cursor_crc@cursor-128x42-onscreen:
      shard-apl:          FAIL (fdo#103232) -> PASS +1

    igt@kms_cursor_crc@cursor-64x64-suspend:
      shard-apl:          FAIL (fdo#103232, fdo#103191) -> PASS

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-cpu:
      shard-glk:          FAIL (fdo#103167) -> PASS

    igt@kms_setmode@basic:
      shard-kbl:          FAIL (fdo#99912) -> PASS

    igt@pm_rpm@modeset-non-lpsp:
      shard-skl:          INCOMPLETE (fdo#107807) -> SKIP

fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103184 https://bugs.freedesktop.org/show_bug.cgi?id=103184
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103833 https://bugs.freedesktop.org/show_bug.cgi?id=103833
fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#105682 https://bugs.freedesktop.org/show_bug.cgi?id=105682
fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
fdo#106885 https://bugs.freedesktop.org/show_bug.cgi?id=106885
fdo#107773 https://bugs.freedesktop.org/show_bug.cgi?id=107773
fdo#107807 https://bugs.freedesktop.org/show_bug.cgi?id=107807
fdo#107882 https://bugs.freedesktop.org/show_bug.cgi?id=107882
fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
fdo#108039 https://bugs.freedesktop.org/show_bug.cgi?id=108039
fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912

== Participating hosts (6 -> 6) ==

No changes in participating hosts

== Build changes ==

* Linux: CI_DRM_4978 -> Patchwork_10449

CI_DRM_4978: ca98b2681a49a1417f8157af2d94a4f2d0bd0e47 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4674: 93871c6fb3c25e5d350c9faf36ded917174214de @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10449: 65cf2454ee0689f7395f5def957e1bb2a3c8788f @ 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_10449/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw
In reply to [email protected]
Quoted 30 lines · On Fri, Oct 12, 2018 at 01:14:45PM -0700, [email protected] wrote:

From: Clint Taylor <[email protected]>

Initialize SCDC Source Version and TDMS_Config_0 registers to nominal values during intel_hdmi_detect(). The i915 driver currently doesn't implement features that require polling of the status update bits. Once FRL, DSC, or Source Test is enabled in the driver the status flags will need to be read by the source according to specification.

Cc Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/intel_hdmi.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/gpu/drm/i915/intel_hdmi.c +2 -0
index 2c53efc..ab3eac5 100644
@@ -1910,6 +1910,8 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
 	struct drm_i915_private *dev_priv = to_i915(connector->dev);
 	struct intel_hdmi *intel_hdmi = intel_attached_hdmi(connector);
 	struct intel_encoder *encoder = &hdmi_to_dig_port(intel_hdmi)->base;
+	struct i2c_adapter *adapter =
+		intel_gmbus_get_adapter(dev_priv, intel_hdmi->ddc_bus);
 
 	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
 		      connector->base.id, connector->name);
@@ -1925,6 +1927,16 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
 	if (intel_hdmi_set_edid(connector))
 		status = connector_status_connected;

drivers/gpu/drm/i915/intel_hdmi.c bool intel_hdmi_compute_config(struct intel_encoder *encoder, · line 1938

Quoted 10 lines
drivers/gpu/drm/i915/intel_hdmi.c +9 -0
 
+	if (connector->display_info.hdmi.scdc.supported) {
+		/* SCDC source version HDMI 2.1 Sec. 10.4.1.2 */
+		if (drm_scdc_writeb(adapter, SCDC_SOURCE_VERSION, 0x01) < 0)
+			DRM_DEBUG_KMS("Unable to set SCDC Source Version register\n");
+
+		/* Clear SCDC CONFIG_0 HDMI 2.1 Sec. 10.4.1.6 - RR_Enable Polling Only */
+		if (drm_scdc_writeb(adapter, SCDC_CONFIG_0, 0x00) < 0)
+			DRM_DEBUG_KMS("Unable to set SCDC CONFIG_0 register\n");
+	}

I'd probably put this into intel_hdmi_set_edid() so that we'll do it for the ->force() path as well. Or maybe a separate function called from both places.

Quoted 6 lines
drivers/gpu/drm/i915/intel_hdmi.c +1 -0
+
 out:
 	intel_display_power_put(dev_priv, POWER_DOMAIN_GMBUS);
 
Signature · 1 line
1.9.1
Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw
Quoted 32 lines · Ville Syrjälä
Quoted 31 lines · On Fri, Oct 12, 2018 at 01:14:45PM -0700, [email protected] wrote:

From: Clint Taylor <[email protected]>

Initialize SCDC Source Version and TDMS_Config_0 registers to nominal values during intel_hdmi_detect(). The i915 driver currently doesn't implement features that require polling of the status update bits. Once FRL, DSC, or Source Test is enabled in the driver the status flags will need to be read by the source according to specification.

Cc Ville Syrjälä <[email protected]>
---
  drivers/gpu/drm/i915/intel_hdmi.c | 12 ++++++++++++
  1 file changed, 12 insertions(+)
drivers/gpu/drm/i915/intel_hdmi.c +2 -0
index 2c53efc..ab3eac5 100644
@@ -1910,6 +1910,8 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
  	struct drm_i915_private *dev_priv = to_i915(connector->dev);
  	struct intel_hdmi *intel_hdmi = intel_attached_hdmi(connector);
  	struct intel_encoder *encoder = &hdmi_to_dig_port(intel_hdmi)->base;
+	struct i2c_adapter *adapter =
+		intel_gmbus_get_adapter(dev_priv, intel_hdmi->ddc_bus);
 
  	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
  		      connector->base.id, connector->name);
@@ -1925,6 +1927,16 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
  	if (intel_hdmi_set_edid(connector))
  		status = connector_status_connected;
 
Quoted 12 lines

drivers/gpu/drm/i915/intel_hdmi.c bool intel_hdmi_compute_config(struct intel_encoder *encoder, · line 1938

Quoted 9 lines
drivers/gpu/drm/i915/intel_hdmi.c +9 -0
+	if (connector->display_info.hdmi.scdc.supported) {
+		/* SCDC source version HDMI 2.1 Sec. 10.4.1.2 */
+		if (drm_scdc_writeb(adapter, SCDC_SOURCE_VERSION, 0x01) < 0)
+			DRM_DEBUG_KMS("Unable to set SCDC Source Version register\n");
+
+		/* Clear SCDC CONFIG_0 HDMI 2.1 Sec. 10.4.1.6 - RR_Enable Polling Only */
+		if (drm_scdc_writeb(adapter, SCDC_CONFIG_0, 0x00) < 0)
+			DRM_DEBUG_KMS("Unable to set SCDC CONFIG_0 register\n");
+	}

I'd probably put this into intel_hdmi_set_edid() so that we'll do it for the ->force() path as well. Or maybe a separate function called from both places.

intel_hdmi_set_edid() doesn't actually decode the edid block that it reads. This means display_info.hdmi.scdc.supported isn't from the new EDID block. I have a patch in my sandbox to send the new EDID block to DRM to be decoded.

-Clint

Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/i915/intel_hdmi.c +1 -0
+
  out:
  	intel_display_power_put(dev_priv, POWER_DOMAIN_GMBUS);
 
Signature · 1 line
1.9.1

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