Skip to contentSkip to conversation

drm/i915: Split intel_attach_colorspace_property() into HDMI vs. DP variants

PATCH In review Ville Syrjala 3 participants 3 messages Nov 26, 2020

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

PATCH 1/1 drm/i915: Split intel_attach_colorspace_property() into HDMI vs. DP variants

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

With LSPCON we use the AVI infoframe to convey the colorimetry information (as opposed to DP MSA/SDP), so the property we expose should match the values we can stuff into the infoframe. Ie. we must use the HDMI variant of the property, even though we drive LSPCON in PCON mode. To that end just split intel_attach_colorspace_property() into HDMI and DP variants and let the caller worry about which one it wants to use.

---
 .../gpu/drm/i915/display/intel_connector.c    | 29 +++++++------------
 .../gpu/drm/i915/display/intel_connector.h    |  3 +-
 drivers/gpu/drm/i915/display/intel_dp.c       |  2 +-
 drivers/gpu/drm/i915/display/intel_hdmi.c     |  2 +-
 4 files changed, 15 insertions(+), 21 deletions(-)
drivers/gpu/drm/i915/display/intel_connector.c +11 -18
index 406e96785c76..d5ceb7bdc14b 100644
@@ -279,24 +279,17 @@ intel_attach_aspect_ratio_property(struct drm_connector *connector)
 }
 
 void
-intel_attach_colorspace_property(struct drm_connector *connector)
+intel_attach_hdmi_colorspace_property(struct drm_connector *connector)
 {
-	switch (connector->connector_type) {
-	case DRM_MODE_CONNECTOR_HDMIA:
-	case DRM_MODE_CONNECTOR_HDMIB:
-		if (drm_mode_create_hdmi_colorspace_property(connector))
-			return;
-		break;
-	case DRM_MODE_CONNECTOR_DisplayPort:
-	case DRM_MODE_CONNECTOR_eDP:
-		if (drm_mode_create_dp_colorspace_property(connector))
-			return;
-		break;
-	default:
-		MISSING_CASE(connector->connector_type);
-		return;
-	}
+	if (!drm_mode_create_hdmi_colorspace_property(connector))
+		drm_object_attach_property(&connector->base,
+					   connector->colorspace_property, 0);
+}
 
-	drm_object_attach_property(&connector->base,
-				   connector->colorspace_property, 0);
+void
+intel_attach_dp_colorspace_property(struct drm_connector *connector)
+{
+	if (!drm_mode_create_dp_colorspace_property(connector))
+		drm_object_attach_property(&connector->base,
+					   connector->colorspace_property, 0);
 }
drivers/gpu/drm/i915/display/intel_connector.h +2 -1
index 93a7375c8196..661a37a3c6d8 100644
@@ -30,6 +30,7 @@ int intel_ddc_get_modes(struct drm_connector *c, struct i2c_adapter *adapter);
 void intel_attach_force_audio_property(struct drm_connector *connector);
 void intel_attach_broadcast_rgb_property(struct drm_connector *connector);
 void intel_attach_aspect_ratio_property(struct drm_connector *connector);
-void intel_attach_colorspace_property(struct drm_connector *connector);
+void intel_attach_hdmi_colorspace_property(struct drm_connector *connector);
+void intel_attach_dp_colorspace_property(struct drm_connector *connector);
 
 #endif /* __INTEL_CONNECTOR_H__ */
drivers/gpu/drm/i915/display/intel_dp.c +1 -1
index 3896d08c4177..0723246f1b19 100644
@@ -7175,7 +7175,7 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connect
 	else if (INTEL_GEN(dev_priv) >= 5)
 		drm_connector_attach_max_bpc_property(connector, 6, 12);
 
-	intel_attach_colorspace_property(connector);
+	intel_attach_dp_colorspace_property(connector);
 
 	if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv) >= 11)
 		drm_object_attach_property(&connector->base,
drivers/gpu/drm/i915/display/intel_hdmi.c +1 -1
index 82674a8853c6..061534e71f14 100644
@@ -2963,7 +2963,7 @@ intel_hdmi_add_properties(struct intel_hdmi *intel_hdmi, struct drm_connector *c
 	 * as well. Will be implemented separately.
 	 */
 	if (!dig_port->lspcon.active)
-		intel_attach_colorspace_property(connector);
+		intel_attach_hdmi_colorspace_property(connector);
 
 	drm_connector_attach_content_type_property(connector);
 
Signature · 6 lines
2.26.2

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

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Split intel_attach_colorspace_property() into HDMI vs. DP variants

== Series Details ==

== Series Details ==

Series: drm/i915: Split intel_attach_colorspace_property() into HDMI vs. DP variants
URL : https://patchwork.freedesktop.org/series/84309/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_9395 -> Patchwork_18992
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_18992 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_18992, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

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

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live@gt_timelines:
- fi-apl-guc: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-apl-guc/igt@i915_selftest@live@gt_timelines.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18992/fi-apl-guc/igt@i915_selftest@live@gt_timelines.html

New tests
---------

New tests have been introduced between CI_DRM_9395 and Patchwork_18992:

### New CI tests (1) ###

* boot:
- Statuses : 40 pass(s)
- Exec time: [0.0] s

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_module_load@reload:
- fi-byt-j1900: [PASS][3] -> [DMESG-WARN][4] ([i915#1982])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-byt-j1900/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18992/fi-byt-j1900/igt@[email protected]
- fi-kbl-soraka: [PASS][5] -> [DMESG-WARN][6] ([i915#1982])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-kbl-soraka/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18992/fi-kbl-soraka/igt@[email protected]

* igt@i915_selftest@live@execlists:
- fi-cfl-8109u: [PASS][7] -> [INCOMPLETE][8] ([i915#1037] / [i915#2089])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-cfl-8109u/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18992/fi-cfl-8109u/igt@i915_selftest@[email protected]
- fi-icl-y: [PASS][9] -> [INCOMPLETE][10] ([i915#1037] / [i915#2276])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-icl-y/igt@i915_selftest@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18992/fi-icl-y/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@gt_heartbeat:
- fi-kbl-soraka: [PASS][11] -> [DMESG-FAIL][12] ([i915#541])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-kbl-soraka/igt@i915_selftest@live@gt_heartbeat.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18992/fi-kbl-soraka/igt@i915_selftest@live@gt_heartbeat.html
- fi-bsw-kefka: [PASS][13] -> [DMESG-FAIL][14] ([i915#2675] / [i915#541])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-bsw-kefka/igt@i915_selftest@live@gt_heartbeat.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18992/fi-bsw-kefka/igt@i915_selftest@live@gt_heartbeat.html

#### Possible fixes ####

* igt@core_hotunplug@unbind-rebind:
- fi-tgl-u2: [DMESG-WARN][15] ([i915#1982]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-tgl-u2/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18992/fi-tgl-u2/igt@[email protected]
- fi-kbl-7500u: [DMESG-WARN][17] -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-kbl-7500u/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18992/fi-kbl-7500u/igt@[email protected]

* igt@i915_module_load@reload:
- fi-apl-guc: [DMESG-WARN][19] ([i915#1982]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-apl-guc/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18992/fi-apl-guc/igt@[email protected]

* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-bsw-kefka: [DMESG-WARN][21] ([i915#1982]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-bsw-kefka/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18992/fi-bsw-kefka/igt@[email protected]

* igt@i915_selftest@live@gt_pm:
- {fi-kbl-7560u}: [DMESG-FAIL][23] ([i915#2524]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-kbl-7560u/igt@i915_selftest@live@gt_pm.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18992/fi-kbl-7560u/igt@i915_selftest@live@gt_pm.html

* igt@kms_chamelium@hdmi-edid-read:
- fi-kbl-7500u: [DMESG-FAIL][25] ([i915#165]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-kbl-7500u/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18992/fi-kbl-7500u/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-byt-j1900: [DMESG-WARN][27] ([i915#1982]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-byt-j1900/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18992/fi-byt-j1900/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- fi-icl-u2: [DMESG-WARN][29] ([i915#1982]) -> [PASS][30] +2 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-icl-u2/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18992/fi-icl-u2/igt@[email protected]

* igt@vgem_basic@create:
- fi-tgl-y: [DMESG-WARN][31] ([i915#402]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-tgl-y/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18992/fi-tgl-y/igt@[email protected]

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

[i915#1037]: https://gitlab.freedesktop.org/drm/intel/issues/1037
[i915#165]: https://gitlab.freedesktop.org/drm/intel/issues/165
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2089]: https://gitlab.freedesktop.org/drm/intel/issues/2089
[i915#2276]: https://gitlab.freedesktop.org/drm/intel/issues/2276
[i915#2524]: https://gitlab.freedesktop.org/drm/intel/issues/2524
[i915#2675]: https://gitlab.freedesktop.org/drm/intel/issues/2675
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
[i915#541]: https://gitlab.freedesktop.org/drm/intel/issues/541

Participating hosts (44 -> 40)
------------------------------

Missing (4): fi-ilk-m540 fi-bsw-cyan fi-bdw-samus fi-hsw-4200u

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

* Linux: CI_DRM_9395 -> Patchwork_18992

CI-20190529: 20190529
CI_DRM_9395: 83729b962cacdce11fe05033ad2493da61536ebf @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5871: ff519fd84618558c550bec07e7cc4b2c682f86ff @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_18992: 3071066646841bcb4a21e5543e08cd7bee1efed0 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

307106664684 drm/i915: Split intel_attach_colorspace_property() into HDMI vs. DP variants

== Logs ==

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

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

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

-----Original Message-----
From: Ville Syrjala <[email protected]>
Sent: Thursday, November 26, 2020 10:41 PM
To: [email protected]
Cc: Shankar, Uma <[email protected]>
Subject: [PATCH] drm/i915: Split intel_attach_colorspace_property() into HDMI vs. DP variants

Quoted 8 lines

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

With LSPCON we use the AVI infoframe to convey the colorimetry information (as opposed to DP MSA/SDP), so the property we expose should match the values we can stuff into the infoframe. Ie. we must use the HDMI variant of the property, even though we drive LSPCON in PCON mode. To that end just split intel_attach_colorspace_property() into HDMI and DP variants and let the caller worry about which one it wants to use.

Thanks Ville for this change.

Quoted 95 lines
---
 .../gpu/drm/i915/display/intel_connector.c    | 29 +++++++------------
 .../gpu/drm/i915/display/intel_connector.h    |  3 +-
 drivers/gpu/drm/i915/display/intel_dp.c       |  2 +-
 drivers/gpu/drm/i915/display/intel_hdmi.c     |  2 +-
 4 files changed, 15 insertions(+), 21 deletions(-)
drivers/gpu/drm/i915/display/intel_connector.c +9 -18
index 406e96785c76..d5ceb7bdc14b 100644
@@ -279,24 +279,17 @@ intel_attach_aspect_ratio_property(struct
 drm_connector *connector)  }
 
 void
-intel_attach_colorspace_property(struct drm_connector *connector)
+intel_attach_hdmi_colorspace_property(struct drm_connector *connector)
 {
-	switch (connector->connector_type) {
-	case DRM_MODE_CONNECTOR_HDMIA:
-	case DRM_MODE_CONNECTOR_HDMIB:
-		if (drm_mode_create_hdmi_colorspace_property(connector))
-			return;
-		break;
-	case DRM_MODE_CONNECTOR_DisplayPort:
-	case DRM_MODE_CONNECTOR_eDP:
-		if (drm_mode_create_dp_colorspace_property(connector))
-			return;
-		break;
-	default:
-		MISSING_CASE(connector->connector_type);
-		return;
-	}
+	if (!drm_mode_create_hdmi_colorspace_property(connector))
+		drm_object_attach_property(&connector->base,
+					   connector->colorspace_property, 0); }
 
-	drm_object_attach_property(&connector->base,
-				   connector->colorspace_property, 0);
+void
+intel_attach_dp_colorspace_property(struct drm_connector *connector) {
+	if (!drm_mode_create_dp_colorspace_property(connector))
+		drm_object_attach_property(&connector->base,
+					   connector->colorspace_property, 0);
 }
drivers/gpu/drm/i915/display/intel_connector.h +0 -0
index 93a7375c8196..661a37a3c6d8 100644
@@ -30,6 +30,7 @@ int intel_ddc_get_modes(struct drm_connector *c, struct

i2c_adapter *adapter); void intel_attach_force_audio_property(struct drm_connector *connector); void intel_attach_broadcast_rgb_property(struct drm_connector *connector); void intel_attach_aspect_ratio_property(struct drm_connector *connector); -void intel_attach_colorspace_property(struct drm_connector *connector);

drivers/gpu/drm/i915/display/intel_connector.h +3 -0
+void intel_attach_hdmi_colorspace_property(struct drm_connector
+*connector); void intel_attach_dp_colorspace_property(struct
+drm_connector *connector);
 
 #endif /* __INTEL_CONNECTOR_H__ */
drivers/gpu/drm/i915/display/intel_dp.c +0 -0
index 3896d08c4177..0723246f1b19 100644
@@ -7175,7 +7175,7 @@ intel_dp_add_properties(struct intel_dp *intel_dp,

struct drm_connector *connect

drivers/gpu/drm/i915/display/intel_dp.c +1 -1
 	else if (INTEL_GEN(dev_priv) >= 5)
 		drm_connector_attach_max_bpc_property(connector, 6, 12);
 
-	intel_attach_colorspace_property(connector);
+	intel_attach_dp_colorspace_property(connector);
 
 	if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv) >= 11)
 		drm_object_attach_property(&connector->base,
drivers/gpu/drm/i915/display/intel_hdmi.c +1 -2
index 82674a8853c6..061534e71f14 100644
@@ -2963,7 +2963,7 @@ intel_hdmi_add_properties(struct intel_hdmi
 *intel_hdmi, struct drm_connector *c
 	 * as well. Will be implemented separately.
 	 */
 	if (!dig_port->lspcon.active)
-		intel_attach_colorspace_property(connector);
+		intel_attach_hdmi_colorspace_property(connector);
 
 	drm_connector_attach_content_type_property(connector);
 
--
Quoted 1 line

2.26.2

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