Skip to contentSkip to conversation

drm/edid: EDID override refactoring and fixes

PATCH Superseded Jani Nikula 5 participants 43 messages Oct 11, 2022 – Oct 20, 2022

Subsystems (6)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover drm/edid: EDID override refactoring and fixes

I set out to fix some issues in switching i915 over to use drm_edid more widely, and stumbled onto issues with edid override usage. Here's some resulting fixes, refactoring and cleanup.

BR,
Jani.

Jani Nikula (15):
drm/i915/hdmi: do dual mode detect only if connected drm/i915/hdmi: stop using connector->override_edid drm/amd/display: stop using connector->override_edid drm/edid: debug log EDID override set/reset
drm/edid: abstract debugfs override EDID show better drm/edid: rename drm_add_override_edid_modes() to
drm_edid_override_connector_update()
drm/edid: split drm_edid block count helper
drm/edid: add function for checking drm_edid validity drm/edid: detach debugfs EDID override from EDID property update drm/edid/firmware: drop redundant connector_name variable/parameter drm/edid/firmware: rename drm_load_edid_firmware() to
drm_edid_load_firmware()
drm/edid: use struct drm_edid for override/firmware EDID drm/edid: move edid load declarations to internal header drm/edid/firmware: convert to drm device specific logging drm/edid: convert to device specific logging

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   3 -
 drivers/gpu/drm/drm_crtc_internal.h           |  15 +-
 drivers/gpu/drm/drm_debugfs.c                 |   8 +-
 drivers/gpu/drm/drm_edid.c                    | 259 ++++++++++--------
 drivers/gpu/drm/drm_edid_load.c               | 107 ++------
 drivers/gpu/drm/drm_probe_helper.c            |   2 +-
 drivers/gpu/drm/i915/display/intel_hdmi.c     |  21 +-
 include/drm/drm_connector.h                   |  11 +-
 include/drm/drm_edid.h                        |  10 +-
 9 files changed, 206 insertions(+), 230 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/15 drm/i915/hdmi: do dual mode detect only if connected

For normal connector detect, there's really no point in trying dual mode detect if the connector is disconnected. We can simplify the detect sequence by skipping it. Since intel_hdmi_dp_dual_mode_detect() is only called when EDID is present, we can drop the has_edid parameter.

The functional effect is speeding up disconnected connector detection ever so slightly, and, combined with firmware EDID, also stop logging about assuming dual mode adaptor.

It's a bit subtle, but this will also skip dual mode detect if the connector is force connected and a) there's no EDID of any kind, normal or override/firmare or b) there's EDID but it does not indicate digital. These are corner cases no matter what, and arguably forcing should not be limited by dual mode detect.

Cc Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/display/intel_hdmi.c +7 -10
index 93519fb23d9d..a332eaac86cd 100644
@@ -2355,7 +2355,7 @@ intel_hdmi_unset_edid(struct drm_connector *connector)
 }
 
 static void
-intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector, bool has_edid)
+intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector)
 {
 	struct drm_i915_private *dev_priv = to_i915(connector->dev);
 	struct intel_hdmi *hdmi = intel_attached_hdmi(to_intel_connector(connector));
@@ -2371,16 +2371,13 @@ intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector, bool has_edid)
 	 * CONFIG1 pin, but no such luck on our hardware.
 	 *
 	 * The only method left to us is to check the VBT to see
-	 * if the port is a dual mode capable DP port. But let's
-	 * only do that when we sucesfully read the EDID, to avoid
-	 * confusing log messages about DP dual mode adaptors when
-	 * there's nothing connected to the port.
+	 * if the port is a dual mode capable DP port.
 	 */
 	if (type == DRM_DP_DUAL_MODE_UNKNOWN) {
 		/* An overridden EDID imply that we want this port for testing.
 		 * Make sure not to set limits for that port.
 		 */
-		if (has_edid && !connector->override_edid &&
+		if (!connector->override_edid &&
 		    intel_bios_is_port_dp_dual_mode(dev_priv, port)) {
 			drm_dbg_kms(&dev_priv->drm,
 				    "Assuming DP dual mode adaptor presence based on VBT\n");
@@ -2435,18 +2432,18 @@ intel_hdmi_set_edid(struct drm_connector *connector)
 		intel_gmbus_force_bit(i2c, false);
 	}
 
-	intel_hdmi_dp_dual_mode_detect(connector, edid != NULL);
-
-	intel_display_power_put(dev_priv, POWER_DOMAIN_GMBUS, wakeref);
-
 	to_intel_connector(connector)->detect_edid = edid;
 	if (edid && edid->input & DRM_EDID_INPUT_DIGITAL) {
 		intel_hdmi->has_audio = drm_detect_monitor_audio(edid);
 		intel_hdmi->has_hdmi_sink = drm_detect_hdmi_monitor(edid);
 
+		intel_hdmi_dp_dual_mode_detect(connector);
+
 		connected = true;
 	}
 
+	intel_display_power_put(dev_priv, POWER_DOMAIN_GMBUS, wakeref);
+
 	cec_notifier_set_phys_addr_from_edid(intel_hdmi->cec_notifier, edid);
 
 	return connected;
Signature · 1 line
2.34.1
#15 lore raw

PATCH 4/15 drm/edid: debug log EDID override set/reset

In reply to Jani Nikula

It's useful debugging information to know if and when an override EDID was set or reset.

---
 drivers/gpu/drm/drm_edid.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/drm_edid.c +6 -0
index 47465b9765f1..a863cffa2dc5 100644
@@ -2194,6 +2194,9 @@ int drm_edid_override_set(struct drm_connector *connector, const void *edid,
 
 	connector->override_edid = false;
 
+	drm_dbg_kms(connector->dev, "[CONNECTOR:%d:%s] EDID override set\n",
+		    connector->base.id, connector->name);
+
 	ret = drm_connector_update_edid_property(connector, edid);
 	if (!ret)
 		connector->override_edid = true;
@@ -2206,6 +2209,9 @@ int drm_edid_override_reset(struct drm_connector *connector)
 {
 	connector->override_edid = false;
 
+	drm_dbg_kms(connector->dev, "[CONNECTOR:%d:%s] EDID override reset\n",
+		    connector->base.id, connector->name);
+
 	return drm_connector_update_edid_property(connector, NULL);
 }
 
Signature · 1 line
2.34.1
#17 lore raw

PATCH 5/15 drm/edid: abstract debugfs override EDID show better

In reply to Jani Nikula

Add a function to dump the override EDID in debugfs. This hides the override EDID management better in drm_edid.c.

---
 drivers/gpu/drm/drm_crtc_internal.h |  4 +++-
 drivers/gpu/drm/drm_debugfs.c       |  8 +-------
 drivers/gpu/drm/drm_edid.c          | 11 +++++++++++
 3 files changed, 15 insertions(+), 8 deletions(-)
drivers/gpu/drm/drm_crtc_internal.h +3 -1
index 56041b604881..fb8a68d90940 100644
@@ -56,9 +56,10 @@ struct drm_plane;
 struct drm_plane_state;
 struct drm_property;
 struct edid;
+struct fwnode_handle;
 struct kref;
+struct seq_file;
 struct work_struct;
-struct fwnode_handle;
 
 /* drm_crtc.c */
 int drm_mode_crtc_set_obj_prop(struct drm_mode_object *obj,
@@ -286,5 +287,6 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
 
 /* drm_edid.c */
 void drm_mode_fixup_1366x768(struct drm_display_mode *mode);
+int drm_edid_override_show(struct drm_connector *connector, struct seq_file *m);
 int drm_edid_override_set(struct drm_connector *connector, const void *edid, size_t size);
 int drm_edid_override_reset(struct drm_connector *connector);
drivers/gpu/drm/drm_debugfs.c +1 -7
index 01ee3febb813..ee445f4605ba 100644
@@ -328,13 +328,7 @@ static ssize_t connector_write(struct file *file, const char __user *ubuf,
 
 static int edid_show(struct seq_file *m, void *data)
 {
-	struct drm_connector *connector = m->private;
-	struct drm_property_blob *edid = connector->edid_blob_ptr;
-
-	if (connector->override_edid && edid)
-		seq_write(m, edid->data, edid->length);
-
-	return 0;
+	return drm_edid_override_show(m->private, m);
 }
 
 static int edid_open(struct inode *inode, struct file *file)
drivers/gpu/drm/drm_edid.c +11 -0
index a863cffa2dc5..1ada36e0d826 100644
@@ -2183,6 +2183,17 @@ static struct edid *drm_get_override_edid(struct drm_connector *connector,
 	return IS_ERR(override) ? NULL : override;
 }
 
+/* For debugfs edid_override implementation */
+int drm_edid_override_show(struct drm_connector *connector, struct seq_file *m)
+{
+	struct drm_property_blob *edid = connector->edid_blob_ptr;
+
+	if (connector->override_edid && edid)
+		seq_write(m, edid->data, edid->length);
+
+	return 0;
+}
+
 /* For debugfs edid_override implementation */
 int drm_edid_override_set(struct drm_connector *connector, const void *edid,
 			  size_t size)
Signature · 1 line
2.34.1
#11 lore raw

PATCH 3/15 drm/amd/display: stop using connector->override_edid

In reply to Jani Nikula

The connector->override_edid flag is strictly for EDID override debugfs management, and drivers have no business using it.

Cc Alex Deucher <[email protected]>
Cc Christian König <[email protected]>
Cc Xinhui Pan <[email protected]>

---

I really have no idea what the functional impact here is. I can only guess that the intention is to abuse ->override_edid to block EDID property updates. In any case, this use needs to go.

It also seems really curious we get here via connector .get_modes hook!

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -3
index 4c73727e0b7d..d96877196a7f 100644
@@ -6109,7 +6109,6 @@ static void create_eml_sink(struct amdgpu_dm_connector *aconnector)
 				aconnector->base.name);
 
 		aconnector->base.force = DRM_FORCE_OFF;
-		aconnector->base.override_edid = false;
 		return;
 	}
 
@@ -6144,8 +6143,6 @@ static void handle_edid_mgmt(struct amdgpu_dm_connector *aconnector)
 		link->verified_link_cap.link_rate = LINK_RATE_HIGH2;
 	}
 
-
-	aconnector->base.override_edid = true;
 	create_eml_sink(aconnector);
 }
 
Signature · 1 line
2.34.1
#9 lore raw

PATCH 2/15 drm/i915/hdmi: stop using connector->override_edid

In reply to Jani Nikula

The connector->override_edid flag is strictly for EDID override debugfs management, and drivers have no business using it.

The check for override_edid was added in commit 301906290553 ("drm/i915:
Ignore TMDS clock limit for DP++ when EDID override is set") to facilitate mode list cross-checking against modes in override EDID when the connector in question isn't even connected. The dual mode detect fallback would do VBT based limiting in this case.

Instead of override EDID, check for connector forcing in the fallback.

Cc Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/display/intel_hdmi.c +2 -4
index a332eaac86cd..878a65c887f7 100644
@@ -2374,10 +2374,8 @@ intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector)
 	 * if the port is a dual mode capable DP port.
 	 */
 	if (type == DRM_DP_DUAL_MODE_UNKNOWN) {
-		/* An overridden EDID imply that we want this port for testing.
-		 * Make sure not to set limits for that port.
-		 */
-		if (!connector->override_edid &&
+		if (connector->force != DRM_FORCE_ON &&
+		    connector->force != DRM_FORCE_ON_DIGITAL &&
 		    intel_bios_is_port_dp_dual_mode(dev_priv, port)) {
 			drm_dbg_kms(&dev_priv->drm,
 				    "Assuming DP dual mode adaptor presence based on VBT\n");
Signature · 1 line
2.34.1
#23 lore raw

PATCH 8/15 drm/edid: add function for checking drm_edid validity

In reply to Jani Nikula

We've lacked a function for immutable validity check on drm_edid. Add one.

---
 drivers/gpu/drm/drm_edid.c | 30 ++++++++++++++++++++++++++++++
 include/drm/drm_edid.h     |  1 +
 2 files changed, 31 insertions(+)
drivers/gpu/drm/drm_edid.c +30 -0
index 616c1cdc7507..c3cf942186b7 100644
@@ -2040,6 +2040,36 @@ bool drm_edid_is_valid(struct edid *edid)
 }
 EXPORT_SYMBOL(drm_edid_is_valid);
 
+/**
+ * drm_edid_valid - sanity check EDID data
+ * @drm_edid: EDID data
+ *
+ * Sanity check an EDID. Cross check block count against allocated size and
+ * checksum the blocks.
+ *
+ * Return: True if the EDID data is valid, false otherwise.
+ */
+bool drm_edid_valid(const struct drm_edid *drm_edid)
+{
+	int i;
+
+	if (!drm_edid)
+		return false;
+
+	if (edid_size_by_blocks(__drm_edid_block_count(drm_edid)) != drm_edid->size)
+		return false;
+
+	for (i = 0; i < drm_edid_block_count(drm_edid); i++) {
+		const void *block = drm_edid_block_data(drm_edid, i);
+
+		if (!edid_block_valid(block, i == 0))
+			return false;
+	}
+
+	return true;
+}
+EXPORT_SYMBOL(drm_edid_valid);
+
 static struct edid *edid_filter_invalid_blocks(struct edid *edid,
 					       size_t *alloc_size)
 {
include/drm/drm_edid.h +1 -0
index 05380681a4fb..a2e25e7e6ee5 100644
@@ -606,6 +606,7 @@ drm_display_mode_from_cea_vic(struct drm_device *dev,
 const struct drm_edid *drm_edid_alloc(const void *edid, size_t size);
 const struct drm_edid *drm_edid_dup(const struct drm_edid *drm_edid);
 void drm_edid_free(const struct drm_edid *drm_edid);
+bool drm_edid_valid(const struct drm_edid *drm_edid);
 const struct edid *drm_edid_raw(const struct drm_edid *drm_edid);
 const struct drm_edid *drm_edid_read(struct drm_connector *connector);
 const struct drm_edid *drm_edid_read_ddc(struct drm_connector *connector,
Signature · 1 line
2.34.1
#25 lore raw

PATCH 9/15 drm/edid: detach debugfs EDID override from EDID property update

In reply to Jani Nikula

Having the EDID override debugfs directly update the EDID property is problematic. The update is partial only. The driver has no way of knowing it's been updated. Mode list is not updated. It's an inconsistent state.

Detach debugfs EDID override from the property update completely. Only set and reset a separate override EDID copy from debugfs, and have it take effect only at detect (via EDID read). The copy is at connector->edid_override.

This also brings override EDID closer to firmware EDID in behaviour.

Add validation of the override EDID which we completely lacked.

Note that IGT already forces a detect whenever tests update the override EDID.

---
 drivers/gpu/drm/drm_edid.c  | 56 ++++++++++++-------------------------
 include/drm/drm_connector.h | 11 +++++---
 2 files changed, 25 insertions(+), 42 deletions(-)
drivers/gpu/drm/drm_edid.c +18 -38
index c3cf942186b7..0f2898badd51 100644
@@ -2207,8 +2207,8 @@ static struct edid *drm_get_override_edid(struct drm_connector *connector,
 {
 	struct edid *override = NULL;
 
-	if (connector->override_edid)
-		override = drm_edid_duplicate(connector->edid_blob_ptr->data);
+	if (connector->edid_override)
+		override = drm_edid_duplicate(connector->edid_override->edid);
 
 	if (!override)
 		override = drm_load_edid_firmware(connector);
@@ -2223,10 +2223,10 @@ static struct edid *drm_get_override_edid(struct drm_connector *connector,
 /* For debugfs edid_override implementation */
 int drm_edid_override_show(struct drm_connector *connector, struct seq_file *m)
 {
-	struct drm_property_blob *edid = connector->edid_blob_ptr;
+	const struct drm_edid *drm_edid = connector->edid_override;
 
-	if (connector->override_edid && edid)
-		seq_write(m, edid->data, edid->length);
+	if (drm_edid)
+		seq_write(m, drm_edid->edid, drm_edid->size);
 
 	return 0;
 }
@@ -2235,32 +2235,33 @@ int drm_edid_override_show(struct drm_connector *connector, struct seq_file *m)
 int drm_edid_override_set(struct drm_connector *connector, const void *edid,
 			  size_t size)
 {
-	int ret;
+	drm_edid_free(connector->edid_override);
 
-	if (size < EDID_LENGTH || edid_size(edid) > size)
+	connector->edid_override = drm_edid_alloc(edid, size);
+	if (!drm_edid_valid(connector->edid_override)) {
+		drm_dbg_kms(connector->dev, "[CONNECTOR:%d:%s] EDID override invalid\n",
+			    connector->base.id, connector->name);
+		drm_edid_free(connector->edid_override);
+		connector->edid_override = NULL;
 		return -EINVAL;
-
-	connector->override_edid = false;
+	}
 
 	drm_dbg_kms(connector->dev, "[CONNECTOR:%d:%s] EDID override set\n",
 		    connector->base.id, connector->name);
 
-	ret = drm_connector_update_edid_property(connector, edid);
-	if (!ret)
-		connector->override_edid = true;
-
-	return ret;
+	return 0;
 }
 
 /* For debugfs edid_override implementation */
 int drm_edid_override_reset(struct drm_connector *connector)
 {
-	connector->override_edid = false;
-
 	drm_dbg_kms(connector->dev, "[CONNECTOR:%d:%s] EDID override reset\n",
 		    connector->base.id, connector->name);
 
-	return drm_connector_update_edid_property(connector, NULL);
+	drm_edid_free(connector->edid_override);
+	connector->edid_override = NULL;
+
+	return 0;
 }
 
 /**
@@ -6634,23 +6635,6 @@ int drm_edid_connector_update(struct drm_connector *connector,
 {
 	int count;
 
-	/*
-	 * FIXME: Reconcile the differences in override_edid handling between
-	 * this and drm_connector_update_edid_property().
-	 *
-	 * If override_edid is set, and the EDID passed in here originates from
-	 * drm_edid_read() and friends, it will be the override EDID, and there
-	 * are no issues. drm_connector_update_edid_property() ignoring requests
-	 * to set the EDID dates back to a time when override EDID was not
-	 * handled at the low level EDID read.
-	 *
-	 * The only way the EDID passed in here can be different from the
-	 * override EDID is when a driver passes in an EDID that does *not*
-	 * originate from drm_edid_read() and friends, or passes in a stale
-	 * cached version. This, in turn, is a question of when an override EDID
-	 * set via debugfs should take effect.
-	 */
-
 	count = _drm_edid_connector_update(connector, drm_edid);
 
 	_drm_update_tile_info(connector, drm_edid);
@@ -6665,10 +6649,6 @@ EXPORT_SYMBOL(drm_edid_connector_update);
 static int _drm_connector_update_edid_property(struct drm_connector *connector,
 					       const struct drm_edid *drm_edid)
 {
-	/* ignore requests to set edid when overridden */
-	if (connector->override_edid)
-		return 0;
-
 	/*
 	 * Set the display info, using edid if available, otherwise resetting
 	 * the values to defaults. This duplicates the work done in
include/drm/drm_connector.h +7 -4
index b1b2df48d42c..09a7d7f23e4a 100644
@@ -1550,12 +1550,15 @@ struct drm_connector {
 	struct drm_cmdline_mode cmdline_mode;
 	/** @force: a DRM_FORCE_<foo> state for forced mode sets */
 	enum drm_connector_force force;
+
 	/**
-	 * @override_edid: has the EDID been overwritten through debugfs for
-	 * testing? Do not modify outside of drm_edid_override_set() and
-	 * drm_edid_override_reset().
+	 * @edid_override: Override EDID set via debugfs.
+	 *
+	 * Do not modify or access outside of the drm_edid_override_* family of
+	 * functions.
 	 */
-	bool override_edid;
+	const struct drm_edid *edid_override;
+
 	/** @epoch_counter: used to detect any other changes in connector, besides status */
 	u64 epoch_counter;
 
Signature · 1 line
2.34.1
#19 lore raw

PATCH 6/15 drm/edid: rename drm_add_override_edid_modes() to drm_edid_override_connector_update()

In reply to Jani Nikula

Follow the naming of both EDID override functions as well as drm_edid_connector_update(). This also matches better what the function does; a combination of EDID property update and add modes. Indeed it should later be converted to call drm_edid_connector_update().

---
 drivers/gpu/drm/drm_edid.c         | 6 +++---
 drivers/gpu/drm/drm_probe_helper.c | 2 +-
 include/drm/drm_edid.h             | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/drm_edid.c +3 -3
index 1ada36e0d826..8baa46dc2537 100644
@@ -2227,7 +2227,7 @@ int drm_edid_override_reset(struct drm_connector *connector)
 }
 
 /**
- * drm_add_override_edid_modes - add modes from override/firmware EDID
+ * drm_edid_override_connector_update - add modes from override/firmware EDID
  * @connector: connector we're probing
  *
  * Add modes from the override/firmware EDID, if available. Only to be used from
@@ -2237,7 +2237,7 @@ int drm_edid_override_reset(struct drm_connector *connector)
  *
  * Return: The number of modes added or 0 if we couldn't find any.
  */
-int drm_add_override_edid_modes(struct drm_connector *connector)
+int drm_edid_override_connector_update(struct drm_connector *connector)
 {
 	struct edid *override;
 	int num_modes = 0;
@@ -2254,7 +2254,7 @@ int drm_add_override_edid_modes(struct drm_connector *connector)
 
 	return num_modes;
 }
-EXPORT_SYMBOL(drm_add_override_edid_modes);
+EXPORT_SYMBOL(drm_edid_override_connector_update);
 
 typedef int read_block_fn(void *context, u8 *buf, unsigned int block, size_t len);
 
drivers/gpu/drm/drm_probe_helper.c +1 -1
index 69b0b2b9cc1c..2fc21df709bc 100644
@@ -367,7 +367,7 @@ static int drm_helper_probe_get_modes(struct drm_connector *connector)
 	 * override/firmware EDID.
 	 */
 	if (count == 0 && connector->status == connector_status_connected)
-		count = drm_add_override_edid_modes(connector);
+		count = drm_edid_override_connector_update(connector);
 
 	return count;
 }
include/drm/drm_edid.h +1 -1
index 429735b91f63..05380681a4fb 100644
@@ -577,7 +577,7 @@ struct edid *drm_get_edid_switcheroo(struct drm_connector *connector,
 				     struct i2c_adapter *adapter);
 struct edid *drm_edid_duplicate(const struct edid *edid);
 int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid);
-int drm_add_override_edid_modes(struct drm_connector *connector);
+int drm_edid_override_connector_update(struct drm_connector *connector);
 
 u8 drm_match_cea_mode(const struct drm_display_mode *to_match);
 bool drm_detect_hdmi_monitor(const struct edid *edid);
Signature · 1 line
2.34.1
#27 lore raw

PATCH 10/15 drm/edid/firmware: drop redundant connector_name variable/parameter

In reply to Jani Nikula

Stop passing around something that's readily available in connector->name.

---
 drivers/gpu/drm/drm_edid_load.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)
drivers/gpu/drm/drm_edid_load.c +7 -9
index 37d8ba3ddb46..13cdbfb991eb 100644
@@ -167,8 +167,7 @@ static int edid_size(const u8 *edid, int data_size)
 	return (edid[0x7e] + 1) * EDID_LENGTH;
 }
 
-static void *edid_load(struct drm_connector *connector, const char *name,
-			const char *connector_name)
+static void *edid_load(struct drm_connector *connector, const char *name)
 {
 	const struct firmware *fw = NULL;
 	const u8 *fwdata;
@@ -185,10 +184,10 @@ static void *edid_load(struct drm_connector *connector, const char *name,
 		struct platform_device *pdev;
 		int err;
 
-		pdev = platform_device_register_simple(connector_name, -1, NULL, 0);
+		pdev = platform_device_register_simple(connector->name, -1, NULL, 0);
 		if (IS_ERR(pdev)) {
 			DRM_ERROR("Failed to register EDID firmware platform device "
-				  "for connector \"%s\"\n", connector_name);
+				  "for connector \"%s\"\n", connector->name);
 			return ERR_CAST(pdev);
 		}
 
@@ -244,7 +243,7 @@ static void *edid_load(struct drm_connector *connector, const char *name,
 		edid[EDID_LENGTH-1] += edid[0x7e] - valid_extensions;
 		DRM_INFO("Found %d valid extensions instead of %d in EDID data "
 		    "\"%s\" for connector \"%s\"\n", valid_extensions,
-		    edid[0x7e], name, connector_name);
+		    edid[0x7e], name, connector->name);
 		edid[0x7e] = valid_extensions;
 
 		new_edid = krealloc(edid, (valid_extensions + 1) * EDID_LENGTH,
@@ -256,7 +255,7 @@ static void *edid_load(struct drm_connector *connector, const char *name,
 	DRM_INFO("Got %s EDID base block and %d extension%s from "
 	    "\"%s\" for connector \"%s\"\n", (builtin >= 0) ? "built-in" :
 	    "external", valid_extensions, valid_extensions == 1 ? "" : "s",
-	    name, connector_name);
+	    name, connector->name);
 
 out:
 	release_firmware(fw);
@@ -265,7 +264,6 @@ static void *edid_load(struct drm_connector *connector, const char *name,
 
 struct edid *drm_load_edid_firmware(struct drm_connector *connector)
 {
-	const char *connector_name = connector->name;
 	char *edidname, *last, *colon, *fwstr, *edidstr, *fallback = NULL;
 	struct edid *edid;
 
@@ -288,7 +286,7 @@ struct edid *drm_load_edid_firmware(struct drm_connector *connector)
 	while ((edidname = strsep(&edidstr, ","))) {
 		colon = strchr(edidname, ':');
 		if (colon != NULL) {
-			if (strncmp(connector_name, edidname, colon - edidname))
+			if (strncmp(connector->name, edidname, colon - edidname))
 				continue;
 			edidname = colon + 1;
 			break;
@@ -310,7 +308,7 @@ struct edid *drm_load_edid_firmware(struct drm_connector *connector)
 	if (*last == '\n')
 		*last = '\0';
 
-	edid = edid_load(connector, edidname, connector_name);
+	edid = edid_load(connector, edidname);
 	kfree(fwstr);
 
 	return edid;
Signature · 1 line
2.34.1
#21 lore raw

PATCH 7/15 drm/edid: split drm_edid block count helper

In reply to Jani Nikula

Split the drm_edid block count helper to a base version that reports the block count indicated by EDID contents, and another on top that limits the block count based on size allocated for the EDID.

---
 drivers/gpu/drm/drm_edid.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_edid.c +11 -4
index 8baa46dc2537..616c1cdc7507 100644
@@ -1613,7 +1613,8 @@ static const void *edid_extension_block_data(const struct edid *edid, int index)
 	return edid_block_data(edid, index + 1);
 }
 
-static int drm_edid_block_count(const struct drm_edid *drm_edid)
+/* EDID block count indicated in EDID, may exceed allocated size */
+static int __drm_edid_block_count(const struct drm_edid *drm_edid)
 {
 	int num_blocks;
 
@@ -1633,12 +1634,18 @@ static int drm_edid_block_count(const struct drm_edid *drm_edid)
 			num_blocks = eeodb;
 	}
 
-	/* Limit by allocated size */
-	num_blocks = min(num_blocks, (int)drm_edid->size / EDID_LENGTH);
-
 	return num_blocks;
 }
 
+/* EDID block count, limited by allocated size */
+static int drm_edid_block_count(const struct drm_edid *drm_edid)
+{
+	/* Limit by allocated size */
+	return min(__drm_edid_block_count(drm_edid),
+		   (int)drm_edid->size / EDID_LENGTH);
+}
+
+/* EDID extension block count, limited by allocated size */
 static int drm_edid_extension_block_count(const struct drm_edid *drm_edid)
 {
 	return drm_edid_block_count(drm_edid) - 1;
Signature · 1 line
2.34.1
#29 lore raw

PATCH 11/15 drm/edid/firmware: rename drm_load_edid_firmware() to drm_edid_load_firmware()

In reply to Jani Nikula

Follow the usual naming convention by file name.

---
 drivers/gpu/drm/drm_edid.c      | 10 +++++-----
 drivers/gpu/drm/drm_edid_load.c |  2 +-
 include/drm/drm_edid.h          |  4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/drm_edid.c +5 -5
index 0f2898badd51..2c66a901474d 100644
@@ -2211,7 +2211,7 @@ static struct edid *drm_get_override_edid(struct drm_connector *connector,
 		override = drm_edid_duplicate(connector->edid_override->edid);
 
 	if (!override)
-		override = drm_load_edid_firmware(connector);
+		override = drm_edid_load_firmware(connector);
 
 	/* FIXME: Get alloc size from deeper down the stack */
 	if (!IS_ERR_OR_NULL(override) && alloc_size)
@@ -2443,7 +2443,7 @@ static struct edid *_drm_do_get_edid(struct drm_connector *connector,
  * adapter and use drm_get_edid() instead of abusing this function.
  *
  * The EDID may be overridden using debugfs override_edid or firmware EDID
- * (drm_load_edid_firmware() and drm.edid_firmware parameter), in this priority
+ * (drm_edid_load_firmware() and drm.edid_firmware parameter), in this priority
  * order. Having either of them bypasses actual EDID reads.
  *
  * Return: Pointer to valid EDID or NULL if we couldn't find any.
@@ -2621,7 +2621,7 @@ EXPORT_SYMBOL(drm_get_edid);
  * this function.
  *
  * The EDID may be overridden using debugfs override_edid or firmware EDID
- * (drm_load_edid_firmware() and drm.edid_firmware parameter), in this priority
+ * (drm_edid_load_firmware() and drm.edid_firmware parameter), in this priority
  * order. Having either of them bypasses actual EDID reads.
  *
  * The returned pointer must be freed using drm_edid_free().
@@ -2659,7 +2659,7 @@ EXPORT_SYMBOL(drm_edid_read_custom);
  * Read EDID using the given I2C adapter.
  *
  * The EDID may be overridden using debugfs override_edid or firmware EDID
- * (drm_load_edid_firmware() and drm.edid_firmware parameter), in this priority
+ * (drm_edid_load_firmware() and drm.edid_firmware parameter), in this priority
  * order. Having either of them bypasses actual EDID reads.
  *
  * Prefer initializing connector->ddc with drm_connector_init_with_ddc() and
@@ -2695,7 +2695,7 @@ EXPORT_SYMBOL(drm_edid_read_ddc);
  * Read EDID using the connector's I2C adapter.
  *
  * The EDID may be overridden using debugfs override_edid or firmware EDID
- * (drm_load_edid_firmware() and drm.edid_firmware parameter), in this priority
+ * (drm_edid_load_firmware() and drm.edid_firmware parameter), in this priority
  * order. Having either of them bypasses actual EDID reads.
  *
  * The returned pointer must be freed using drm_edid_free().
drivers/gpu/drm/drm_edid_load.c +1 -1
index 13cdbfb991eb..bc6b96abd1b3 100644
@@ -262,7 +262,7 @@ static void *edid_load(struct drm_connector *connector, const char *name)
 	return edid;
 }
 
-struct edid *drm_load_edid_firmware(struct drm_connector *connector)
+struct edid *drm_edid_load_firmware(struct drm_connector *connector)
 {
 	char *edidname, *last, *colon, *fwstr, *edidstr, *fallback = NULL;
 	struct edid *edid;
include/drm/drm_edid.h +2 -2
index a2e25e7e6ee5..dc7467d25cd8 100644
@@ -388,12 +388,12 @@ int drm_av_sync_delay(struct drm_connector *connector,
 		      const struct drm_display_mode *mode);
 
 #ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE
-struct edid *drm_load_edid_firmware(struct drm_connector *connector);
+struct edid *drm_edid_load_firmware(struct drm_connector *connector);
 int __drm_set_edid_firmware_path(const char *path);
 int __drm_get_edid_firmware_path(char *buf, size_t bufsize);
 #else
 static inline struct edid *
-drm_load_edid_firmware(struct drm_connector *connector)
+drm_edid_load_firmware(struct drm_connector *connector)
 {
 	return ERR_PTR(-ENOENT);
 }
Signature · 1 line
2.34.1
#31 lore raw

PATCH 12/15 drm/edid: use struct drm_edid for override/firmware EDID

In reply to Jani Nikula

There's a lot going on here, but the main thing is switching the firmware EDID loader to use struct drm_edid. Unfortunately, it's difficult to reasonably split to smaller pieces.

Convert the EDID loader to struct drm_edid. There's a functional change in validation; it no longer tries to fix errors or filter invalid blocks. It's stricter in this sense. Hopefully this will not be an issue.

As a by-product, this change also allows HF-EEODB extended EDIDs to be passed via override/firmware EDID.

---
 drivers/gpu/drm/drm_edid.c      | 32 ++++++------
 drivers/gpu/drm/drm_edid_load.c | 86 +++++++--------------------------
 include/drm/drm_edid.h          |  4 +-
 3 files changed, 36 insertions(+), 86 deletions(-)
drivers/gpu/drm/drm_edid.c +17 -15
index 2c66a901474d..935bdf4e6269 100644
@@ -2202,21 +2202,16 @@ static void connector_bad_edid(struct drm_connector *connector,
 }
 
 /* Get override or firmware EDID */
-static struct edid *drm_get_override_edid(struct drm_connector *connector,
-					  size_t *alloc_size)
+static const struct drm_edid *drm_edid_override_get(struct drm_connector *connector)
 {
-	struct edid *override = NULL;
+	const struct drm_edid *override = NULL;
 
 	if (connector->edid_override)
-		override = drm_edid_duplicate(connector->edid_override->edid);
+		override = drm_edid_dup(connector->edid_override);
 
 	if (!override)
 		override = drm_edid_load_firmware(connector);
 
-	/* FIXME: Get alloc size from deeper down the stack */
-	if (!IS_ERR_OR_NULL(override) && alloc_size)
-		*alloc_size = edid_size(override);
-
 	return IS_ERR(override) ? NULL : override;
 }
 
@@ -2277,14 +2272,14 @@ int drm_edid_override_reset(struct drm_connector *connector)
  */
 int drm_edid_override_connector_update(struct drm_connector *connector)
 {
-	struct edid *override;
+	const struct drm_edid *override;
 	int num_modes = 0;
 
-	override = drm_get_override_edid(connector, NULL);
+	override = drm_edid_override_get(connector);
 	if (override) {
-		drm_connector_update_edid_property(connector, override);
-		num_modes = drm_add_edid_modes(connector, override);
-		kfree(override);
+		num_modes = drm_edid_connector_update(connector, override);
+
+		drm_edid_free(override);
 
 		DRM_DEBUG_KMS("[CONNECTOR:%d:%s] adding %d modes via fallback override/firmware EDID\n",
 			      connector->base.id, connector->name, num_modes);
@@ -2335,12 +2330,19 @@ static struct edid *_drm_do_get_edid(struct drm_connector *connector,
 {
 	enum edid_block_status status;
 	int i, num_blocks, invalid_blocks = 0;
+	const struct drm_edid *override;
 	struct edid *edid, *new;
 	size_t alloc_size = EDID_LENGTH;
 
-	edid = drm_get_override_edid(connector, &alloc_size);
-	if (edid)
+	override = drm_edid_override_get(connector);
+	if (override) {
+		alloc_size = override->size;
+		edid = kmemdup(override->edid, alloc_size, GFP_KERNEL);
+		drm_edid_free(override);
+		if (!edid)
+			return NULL;
 		goto ok;
+	}
 
 	edid = kmalloc(alloc_size, GFP_KERNEL);
 	if (!edid)
drivers/gpu/drm/drm_edid_load.c +17 -69

116 lines not on this page · raw message

include/drm/drm_edid.h +2 -2
index dc7467d25cd8..8138613f4e4e 100644
@@ -388,11 +388,11 @@ int drm_av_sync_delay(struct drm_connector *connector,
 		      const struct drm_display_mode *mode);
 
 #ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE
-struct edid *drm_edid_load_firmware(struct drm_connector *connector);
+const struct drm_edid *drm_edid_load_firmware(struct drm_connector *connector);
 int __drm_set_edid_firmware_path(const char *path);
 int __drm_get_edid_firmware_path(char *buf, size_t bufsize);
 #else
-static inline struct edid *
+static inline const struct drm_edid *
 drm_edid_load_firmware(struct drm_connector *connector)
 {
 	return ERR_PTR(-ENOENT);
Signature · 1 line
2.34.1
#33 lore raw

PATCH 13/15 drm/edid: move edid load declarations to internal header

In reply to Jani Nikula

The EDID loader is internal to drm, not for drivers.

---
 drivers/gpu/drm/drm_crtc_internal.h | 11 +++++++++++
 drivers/gpu/drm/drm_edid_load.c     |  5 +++--
 include/drm/drm_edid.h              |  7 -------
 3 files changed, 14 insertions(+), 9 deletions(-)
drivers/gpu/drm/drm_crtc_internal.h +11 -0
index fb8a68d90940..501a10edd0e1 100644
@@ -290,3 +290,14 @@ void drm_mode_fixup_1366x768(struct drm_display_mode *mode);
 int drm_edid_override_show(struct drm_connector *connector, struct seq_file *m);
 int drm_edid_override_set(struct drm_connector *connector, const void *edid, size_t size);
 int drm_edid_override_reset(struct drm_connector *connector);
+
+/* drm_edid_load.c */
+#ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE
+const struct drm_edid *drm_edid_load_firmware(struct drm_connector *connector);
+#else
+static inline const struct drm_edid *
+drm_edid_load_firmware(struct drm_connector *connector)
+{
+	return ERR_PTR(-ENOENT);
+}
+#endif
drivers/gpu/drm/drm_edid_load.c +3 -2
index 248f0685c33e..882caaa6e663 100644
@@ -11,12 +11,13 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 
-#include <drm/drm_crtc.h>
-#include <drm/drm_crtc_helper.h>
+#include <drm/drm_connector.h>
 #include <drm/drm_drv.h>
 #include <drm/drm_edid.h>
 #include <drm/drm_print.h>
 
+#include "drm_crtc_internal.h"
+
 static char edid_firmware[PATH_MAX];
 module_param_string(edid_firmware, edid_firmware, sizeof(edid_firmware), 0644);
 MODULE_PARM_DESC(edid_firmware, "Do not probe monitor, use specified EDID blob "
include/drm/drm_edid.h +0 -7
index 8138613f4e4e..372963600f1d 100644
@@ -388,15 +388,8 @@ int drm_av_sync_delay(struct drm_connector *connector,
 		      const struct drm_display_mode *mode);
 
 #ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE
-const struct drm_edid *drm_edid_load_firmware(struct drm_connector *connector);
 int __drm_set_edid_firmware_path(const char *path);
 int __drm_get_edid_firmware_path(char *buf, size_t bufsize);
-#else
-static inline const struct drm_edid *
-drm_edid_load_firmware(struct drm_connector *connector)
-{
-	return ERR_PTR(-ENOENT);
-}
 #endif
 
 bool drm_edid_are_equal(const struct edid *edid1, const struct edid *edid2);
Signature · 1 line
2.34.1
#35 lore raw

PATCH 14/15 drm/edid/firmware: convert to drm device specific logging

In reply to Jani Nikula

Conform to device specific logging.

---
 drivers/gpu/drm/drm_edid_load.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_edid_load.c +6 -4
index 882caaa6e663..dd472c66cb3c 100644
@@ -177,16 +177,18 @@ static const struct drm_edid *edid_load(struct drm_connector *connector, const c
 
 		pdev = platform_device_register_simple(connector->name, -1, NULL, 0);
 		if (IS_ERR(pdev)) {
-			DRM_ERROR("Failed to register EDID firmware platform device "
-				  "for connector \"%s\"\n", connector->name);
+			drm_err(connector->dev,
+				"Failed to register EDID firmware platform device for connector \"%s\"\n",
+				connector->name);
 			return ERR_CAST(pdev);
 		}
 
 		err = request_firmware(&fw, name, &pdev->dev);
 		platform_device_unregister(pdev);
 		if (err) {
-			DRM_ERROR("Requesting EDID firmware \"%s\" failed (err=%d)\n",
-				  name, err);
+			drm_err(connector->dev,
+				"Requesting EDID firmware \"%s\" failed (err=%d)\n",
+				name, err);
 			return ERR_PTR(err);
 		}
 
Signature · 1 line
2.34.1
#37 lore raw

PATCH 15/15 drm/edid: convert to device specific logging

In reply to Jani Nikula

Convert to drm_kms_dbg/drm_err where possible, and unify the rest of the debugs to DRM_DEBUG_KMS.

---
 drivers/gpu/drm/drm_edid.c | 105 ++++++++++++++++++-------------------
 1 file changed, 50 insertions(+), 55 deletions(-)
drivers/gpu/drm/drm_edid.c +50 -55
index 935bdf4e6269..09b0b8337382 100644
@@ -1979,7 +1979,7 @@ bool drm_edid_block_valid(u8 *_block, int block_num, bool print_bad_edid,
 
 	status = edid_block_check(block, is_base_block);
 	if (status == EDID_BLOCK_HEADER_REPAIR) {
-		DRM_DEBUG("Fixing EDID header, your hardware may be failing\n");
+		DRM_DEBUG_KMS("Fixing EDID header, your hardware may be failing\n");
 		edid_header_fix(block);
 
 		/* Retry with fixed header, update status if that worked. */
@@ -2281,8 +2281,9 @@ int drm_edid_override_connector_update(struct drm_connector *connector)
 
 		drm_edid_free(override);
 
-		DRM_DEBUG_KMS("[CONNECTOR:%d:%s] adding %d modes via fallback override/firmware EDID\n",
-			      connector->base.id, connector->name, num_modes);
+		drm_dbg_kms(connector->dev,
+			    "[CONNECTOR:%d:%s] adding %d modes via fallback override/firmware EDID\n",
+			    connector->base.id, connector->name, num_modes);
 	}
 
 	return num_modes;
@@ -3389,17 +3390,16 @@ static struct drm_display_mode *drm_mode_detailed(struct drm_device *dev,
 		return NULL;
 
 	if (pt->misc & DRM_EDID_PT_STEREO) {
-		DRM_DEBUG_KMS("stereo mode not supported\n");
+		drm_dbg_kms(dev, "Stereo mode not supported\n");
 		return NULL;
 	}
 	if (!(pt->misc & DRM_EDID_PT_SEPARATE_SYNC)) {
-		DRM_DEBUG_KMS("composite sync not supported\n");
+		drm_dbg_kms(dev, "Composite sync not supported\n");
 	}
 
 	/* it is incorrect if hsync/vsync width is zero */
 	if (!hsync_pulse_width || !vsync_pulse_width) {
-		DRM_DEBUG_KMS("Incorrect Detailed timing. "
-				"Wrong Hsync/Vsync pulse width\n");
+		drm_dbg_kms(dev, "Incorrect Detailed timing. Wrong Hsync/Vsync pulse width\n");
 		return NULL;
 	}
 
@@ -4643,7 +4643,7 @@ static int add_hdmi_mode(struct drm_connector *connector, u8 vic)
 	struct drm_display_mode *newmode;
 
 	if (!drm_valid_hdmi_vic(vic)) {
-		DRM_ERROR("Unknown HDMI VIC: %d\n", vic);
+		drm_err(connector->dev, "Unknown HDMI VIC: %d\n", vic);
 		return 0;
 	}
 
@@ -5288,8 +5288,8 @@ static void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode)
 	if (mode->clock == clock)
 		return;
 
-	DRM_DEBUG("detailed mode matches %s VIC %d, adjusting clock %d -> %d\n",
-		  type, vic, mode->clock, clock);
+	DRM_DEBUG_KMS("detailed mode matches %s VIC %d, adjusting clock %d -> %d\n",
+		      type, vic, mode->clock, clock);
 	mode->clock = clock;
 }
 
@@ -5397,15 +5397,11 @@ drm_parse_hdmi_vsdb_audio(struct drm_connector *connector, const u8 *db)
 	if (len >= 12)
 		connector->audio_latency[1] = db[12];
 
-	DRM_DEBUG_KMS("HDMI: latency present %d %d, "
-		      "video latency %d %d, "
-		      "audio latency %d %d\n",
-		      connector->latency_present[0],
-		      connector->latency_present[1],
-		      connector->video_latency[0],
-		      connector->video_latency[1],
-		      connector->audio_latency[0],
-		      connector->audio_latency[1]);
+	drm_dbg_kms(connector->dev,
+		    "HDMI: latency present %d %d, video latency %d %d, audio latency %d %d\n",
+		    connector->latency_present[0], connector->latency_present[1],
+		    connector->video_latency[0], connector->video_latency[1],
+		    connector->audio_latency[0], connector->audio_latency[1]);
 }
 
 static void
@@ -5503,7 +5499,8 @@ static void drm_edid_to_eld(struct drm_connector *connector,
 		return;
 
 	mnl = get_monitor_name(drm_edid, &eld[DRM_ELD_MONITOR_NAME_STRING]);
-	DRM_DEBUG_KMS("ELD monitor %s\n", &eld[DRM_ELD_MONITOR_NAME_STRING]);
+	drm_dbg_kms(connector->dev, "ELD monitor %s\n",
+		    &eld[DRM_ELD_MONITOR_NAME_STRING]);
 
 	eld[DRM_ELD_CEA_EDID_VER_MNL] = info->cea_rev << DRM_ELD_CEA_EDID_VER_SHIFT;
 	eld[DRM_ELD_CEA_EDID_VER_MNL] |= mnl;
@@ -5557,8 +5554,8 @@ static void drm_edid_to_eld(struct drm_connector *connector,
 	eld[DRM_ELD_BASELINE_ELD_LEN] =
 		DIV_ROUND_UP(drm_eld_calc_baseline_block_size(eld), 4);
 
-	DRM_DEBUG_KMS("ELD size %d, SAD count %d\n",
-		      drm_eld_size(eld), total_sad_count);
+	drm_dbg_kms(connector->dev, "ELD size %d, SAD count %d\n",
+		    drm_eld_size(eld), total_sad_count);
 }
 
 static int _drm_edid_to_sad(const struct drm_edid *drm_edid,
@@ -5829,7 +5826,7 @@ static void drm_parse_vcdb(struct drm_connector *connector, const u8 *db)
 {
 	struct drm_display_info *info = &connector->display_info;
 
-	DRM_DEBUG_KMS("CEA VCDB 0x%02x\n", db[2]);
+	drm_dbg_kms(connector->dev, "CEA VCDB 0x%02x\n", db[2]);
 
 	if (db[2] & EDID_CEA_VCDB_QS)
 		info->rgb_quant_range_selectable = true;
@@ -6031,39 +6028,39 @@ static void drm_parse_hdmi_deep_color_info(struct drm_connector *connector,
 	if (hdmi[6] & DRM_EDID_HDMI_DC_30) {
 		dc_bpc = 10;
 		info->edid_hdmi_rgb444_dc_modes |= DRM_EDID_HDMI_DC_30;
-		DRM_DEBUG("%s: HDMI sink does deep color 30.\n",
-			  connector->name);
+		drm_dbg_kms(connector->dev, "%s: HDMI sink does deep color 30.\n",
+			    connector->name);
 	}
 
 	if (hdmi[6] & DRM_EDID_HDMI_DC_36) {
 		dc_bpc = 12;
 		info->edid_hdmi_rgb444_dc_modes |= DRM_EDID_HDMI_DC_36;
-		DRM_DEBUG("%s: HDMI sink does deep color 36.\n",
-			  connector->name);
+		drm_dbg_kms(connector->dev, "%s: HDMI sink does deep color 36.\n",
+			    connector->name);
 	}
 
 	if (hdmi[6] & DRM_EDID_HDMI_DC_48) {
 		dc_bpc = 16;
 		info->edid_hdmi_rgb444_dc_modes |= DRM_EDID_HDMI_DC_48;
-		DRM_DEBUG("%s: HDMI sink does deep color 48.\n",
-			  connector->name);
+		drm_dbg_kms(connector->dev, "%s: HDMI sink does deep color 48.\n",
+			    connector->name);
 	}
 
 	if (dc_bpc == 0) {
-		DRM_DEBUG("%s: No deep color support on this HDMI sink.\n",
-			  connector->name);
+		drm_dbg_kms(connector->dev, "%s: No deep color support on this HDMI sink.\n",
+			    connector->name);
 		return;
 	}
 
-	DRM_DEBUG("%s: Assigning HDMI sink color depth as %d bpc.\n",
-		  connector->name, dc_bpc);
+	drm_dbg_kms(connector->dev, "%s: Assigning HDMI sink color depth as %d bpc.\n",
+		    connector->name, dc_bpc);
 	info->bpc = dc_bpc;
 
 	/* YCRCB444 is optional according to spec. */
 	if (hdmi[6] & DRM_EDID_HDMI_DC_Y444) {
 		info->edid_hdmi_ycbcr444_dc_modes = info->edid_hdmi_rgb444_dc_modes;
-		DRM_DEBUG("%s: HDMI sink does YCRCB444 in deep color.\n",
-			  connector->name);
+		drm_dbg_kms(connector->dev, "%s: HDMI sink does YCRCB444 in deep color.\n",
+			    connector->name);
 	}
 
 	/*
@@ -6071,8 +6068,8 @@ static void drm_parse_hdmi_deep_color_info(struct drm_connector *connector,
 	 * then deep color 36 bit must be supported.
 	 */
 	if (!(hdmi[6] & DRM_EDID_HDMI_DC_36)) {
-		DRM_DEBUG("%s: HDMI sink should do DC_36, but does not!\n",
-			  connector->name);
+		drm_dbg_kms(connector->dev, "%s: HDMI sink should do DC_36, but does not!\n",
+			    connector->name);
 	}
 }
 
@@ -6089,10 +6086,8 @@ drm_parse_hdmi_vsdb_video(struct drm_connector *connector, const u8 *db)
 	if (len >= 7)
 		info->max_tmds_clock = db[7] * 5000;
 
-	DRM_DEBUG_KMS("HDMI: DVI dual %d, "
-		      "max TMDS clock %d kHz\n",
-		      info->dvi_dual,
-		      info->max_tmds_clock);
+	drm_dbg_kms(connector->dev, "HDMI: DVI dual %d, max TMDS clock %d kHz\n",
+		    info->dvi_dual, info->max_tmds_clock);
 
 	drm_parse_hdmi_deep_color_info(connector, db);
 }
@@ -6134,8 +6129,8 @@ static void drm_parse_cea_ext(struct drm_connector *connector,
 			info->cea_rev = edid_ext[1];
 
 		if (info->cea_rev != edid_ext[1])
-			DRM_DEBUG_KMS("CEA extension version mismatch %u != %u\n",
-				      info->cea_rev, edid_ext[1]);
+			drm_dbg_kms(connector->dev, "CEA extension version mismatch %u != %u\n",
+				    info->cea_rev, edid_ext[1]);
 
 		/* The existence of a CTA extension should imply RGB support */
 		info->color_formats = DRM_COLOR_FORMAT_RGB444;
@@ -6221,9 +6216,8 @@ static void drm_get_monitor_range(struct drm_connector *connector,
 
 	drm_for_each_detailed_block(drm_edid, get_monitor_range, &closure);
 
-	DRM_DEBUG_KMS("Supported Monitor Refresh rate range is %d Hz - %d Hz\n",
-		      info->monitor_range.min_vfreq,
-		      info->monitor_range.max_vfreq);
+	drm_dbg_kms(connector->dev, "Supported Monitor Refresh rate range is %d Hz - %d Hz\n",
+		    info->monitor_range.min_vfreq, info->monitor_range.max_vfreq);
 }
 
 static void drm_parse_vesa_mso_data(struct drm_connector *connector,
@@ -6357,8 +6351,8 @@ static u32 update_display_info(struct drm_connector *connector,
 	if (info->bpc == 0 && edid->revision == 3 &&
 	    edid->input & DRM_EDID_DIGITAL_DFP_1_X) {
 		info->bpc = 8;
-		DRM_DEBUG("%s: Assigning DFP sink color depth as %d bpc.\n",
-			  connector->name, info->bpc);
+		drm_dbg_kms(connector->dev, "%s: Assigning DFP sink color depth as %d bpc.\n",
+			    connector->name, info->bpc);
 	}
 
 	/* Only defined for 1.4 with digital displays */
@@ -6390,8 +6384,8 @@ static u32 update_display_info(struct drm_connector *connector,
 		break;
 	}
 
-	DRM_DEBUG("%s: Assigning EDID-1.4 digital sink color depth as %d bpc.\n",
-			  connector->name, info->bpc);
+	drm_dbg_kms(connector->dev, "%s: Assigning EDID-1.4 digital sink color depth as %d bpc.\n",
+		    connector->name, info->bpc);
 
 	if (edid->features & DRM_EDID_FEATURE_RGB_YCRCB444)
 		info->color_formats |= DRM_COLOR_FORMAT_YCBCR444;
@@ -7090,11 +7084,12 @@ static void drm_parse_tiled_block(struct drm_connector *connector,
 	connector->tile_h_size = w + 1;
 	connector->tile_v_size = h + 1;
 
-	DRM_DEBUG_KMS("tile cap 0x%x\n", tile->tile_cap);
-	DRM_DEBUG_KMS("tile_size %d x %d\n", w + 1, h + 1);
-	DRM_DEBUG_KMS("topo num tiles %dx%d, location %dx%d\n",
-		      num_h_tile + 1, num_v_tile + 1, tile_h_loc, tile_v_loc);
-	DRM_DEBUG_KMS("vend %c%c%c\n", tile->topology_id[0], tile->topology_id[1], tile->topology_id[2]);
+	drm_dbg_kms(connector->dev, "tile cap 0x%x\n", tile->tile_cap);
+	drm_dbg_kms(connector->dev, "tile_size %d x %d\n", w + 1, h + 1);
+	drm_dbg_kms(connector->dev, "topo num tiles %dx%d, location %dx%d\n",
+		    num_h_tile + 1, num_v_tile + 1, tile_h_loc, tile_v_loc);
+	drm_dbg_kms(connector->dev, "vend %c%c%c\n", tile->topology_id[0],
+		    tile->topology_id[1], tile->topology_id[2]);
 
 	tg = drm_mode_get_tile_group(connector->dev, tile->topology_id);
 	if (!tg)
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 3/15
#12 lore raw

Re: [PATCH 03/15] drm/amd/display: stop using connector->override_edid

In reply to Jani Nikula
Quoted 25 lines · Jani Nikula

The connector->override_edid flag is strictly for EDID override debugfs management, and drivers have no business using it.

Cc Alex Deucher <[email protected]>
Cc Christian König <[email protected]>
Cc Xinhui Pan <[email protected]>

---

I really have no idea what the functional impact here is. I can only guess that the intention is to abuse ->override_edid to block EDID property updates. In any case, this use needs to go.

It also seems really curious we get here via connector .get_modes hook!

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
index 4c73727e0b7d..d96877196a7f 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static void create_eml_sink(struct amdgpu_dm_connector *aconnector) · line 6112

Quoted 4 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -1
@@ -6109,7 +6109,6 @@ static void create_eml_sink(struct amdgpu_dm_connector *aconnector)
 				aconnector->base.name);
 
 		aconnector->base.force = DRM_FORCE_OFF;
-		aconnector->base.override_edid = false;

I'm not even sure the DRM_FORCE_OFF business is right.

Either way, I don't think amdgpu should be messing with override_edid, so this is

Harry

Quoted 12 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -2
 		return;
 	}
 
@@ -6144,8 +6143,6 @@ static void handle_edid_mgmt(struct amdgpu_dm_connector *aconnector)
 		link->verified_link_cap.link_rate = LINK_RATE_HIGH2;
 	}
 
-
-	aconnector->base.override_edid = true;
 	create_eml_sink(aconnector);
 }
 
#13 lore raw

Re: [PATCH 03/15] drm/amd/display: stop using connector->override_edid

Quoted 28 lines · Harry Wentland
Quoted 27 lines · Jani Nikula

The connector->override_edid flag is strictly for EDID override debugfs management, and drivers have no business using it.

Cc Alex Deucher <[email protected]>
Cc Christian König <[email protected]>
Cc Xinhui Pan <[email protected]>

---

I really have no idea what the functional impact here is. I can only guess that the intention is to abuse ->override_edid to block EDID property updates. In any case, this use needs to go.

It also seems really curious we get here via connector .get_modes hook!

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
index 4c73727e0b7d..d96877196a7f 100644
@@ -6109,7 +6109,6 @@ static void create_eml_sink(struct amdgpu_dm_connector *aconnector)
 				aconnector->base.name);
 
Quoted 8 lines

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static void create_eml_sink(struct amdgpu_dm_connector *aconnector) · line 6112

Quoted 2 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -1
 		aconnector->base.force = DRM_FORCE_OFF;
-		aconnector->base.override_edid = false;

I'm not even sure the DRM_FORCE_OFF business is right.

Either way, I don't think amdgpu should be messing with override_edid, so this is

Thanks for the swift review; is it okay to merge this via drm-misc-next along with the rest (once they've been reviewed, of course)?

BR,
Jani.

Quoted 16 lines

Harry

Quoted 12 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -2
 		return;
 	}
 
@@ -6144,8 +6143,6 @@ static void handle_edid_mgmt(struct amdgpu_dm_connector *aconnector)
 		link->verified_link_cap.link_rate = LINK_RATE_HIGH2;
 	}
 
-
-	aconnector->base.override_edid = true;
 	create_eml_sink(aconnector);
 }
 
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
#14 lore raw

Re: [PATCH 03/15] drm/amd/display: stop using connector->override_edid

Quoted 35 lines · Jani Nikula
Quoted 33 lines · Harry Wentland
Quoted 25 lines · Jani Nikula

The connector->override_edid flag is strictly for EDID override debugfs management, and drivers have no business using it.

Cc Alex Deucher <[email protected]>
Cc Christian König <[email protected]>
Cc Xinhui Pan <[email protected]>

---

I really have no idea what the functional impact here is. I can only guess that the intention is to abuse ->override_edid to block EDID property updates. In any case, this use needs to go.

It also seems really curious we get here via connector .get_modes hook!

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
index 4c73727e0b7d..d96877196a7f 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static void create_eml_sink(struct amdgpu_dm_connector *aconnector) · line 6112

Quoted 4 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -1
@@ -6109,7 +6109,6 @@ static void create_eml_sink(struct amdgpu_dm_connector *aconnector)
                             aconnector->base.name);
 
             aconnector->base.force = DRM_FORCE_OFF;
-            aconnector->base.override_edid = false;

I'm not even sure the DRM_FORCE_OFF business is right.

Quoted 6 lines
Quoted 3 lines

Either way, I don't think amdgpu should be messing with override_edid, so this is

Thanks for the swift review; is it okay to merge this via drm-misc-next along with the rest (once they've been reviewed, of course)?

Sure. No problem.

Alex

Quoted 23 lines

BR,
Jani.

Quoted 10 lines

Harry

Quoted 7 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
             return;
     }
 
@@ -6144,8 +6143,6 @@ static void handle_edid_mgmt(struct amdgpu_dm_connector *aconnector)
             link->verified_link_cap.link_rate = LINK_RATE_HIGH2;
     }
 
Quoted 6 lines

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static void handle_edid_mgmt(struct amdgpu_dm_connector *aconnector) · line 6148

Quoted 5 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -2
-
-    aconnector->base.override_edid = true;
     create_eml_sink(aconnector);
 }
 

--
Jani Nikula, Intel Open Source Graphics Center

#39 lore raw

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/edid: EDID override refactoring and fixes

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: drm/edid: EDID override refactoring and fixes
URL : https://patchwork.freedesktop.org/series/109579/
State : warning

== Summary ==

Error: dim checkpatch failed
29415aa4021f drm/i915/hdmi: do dual mode detect only if connected -:20: WARNING:TYPO_SPELLING: 'firmare' may be misspelled - perhaps 'firmware'? #20:
or override/firmare or b) there's EDID but it does not indicate

            ^^^^^^^

total: 0 errors, 1 warnings, 0 checks, 48 lines checked
fd95a97d5e15 drm/i915/hdmi: stop using connector->override_edid
32546b908649 drm/amd/display: stop using connector->override_edid
a1cbfbaab17b drm/edid: debug log EDID override set/reset
35654a174a5f drm/edid: abstract debugfs override EDID show better
1226808b8f4f drm/edid: rename drm_add_override_edid_modes() to drm_edid_override_connector_update() 0a70e6d97015 drm/edid: split drm_edid block count helper
82e9ad9126c8 drm/edid: add function for checking drm_edid validity
fae9eeeeef1c drm/edid: detach debugfs EDID override from EDID property update 165bff9f8cf4 drm/edid/firmware: drop redundant connector_name variable/parameter 8d56fe1341fb drm/edid/firmware: rename drm_load_edid_firmware() to drm_edid_load_firmware() cee3395c3b41 drm/edid: use struct drm_edid for override/firmware EDID
ea688362f034 drm/edid: move edid load declarations to internal header
352c59ad14d2 drm/edid/firmware: convert to drm device specific logging
9ba65a382c1b drm/edid: convert to device specific logging

#41 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/edid: EDID override refactoring and fixes

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: drm/edid: EDID override refactoring and fixes
URL : https://patchwork.freedesktop.org/series/109579/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12233 -> Patchwork_109579v1
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

Participating hosts (45 -> 42)
------------------------------

Missing (3): fi-ctg-p8600 fi-icl-u2 fi-tgl-dsi

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

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

### IGT changes ###

#### Suppressed ####

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

* igt@i915_selftest@live:
- {fi-tgl-mst}: NOTRUN -> [INCOMPLETE][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/fi-tgl-mst/igt@[email protected]

* igt@i915_selftest@live@guc_hang:
- {bat-rpls-2}: [PASS][2] -> [DMESG-FAIL][3]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/bat-rpls-2/igt@i915_selftest@live@guc_hang.html
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/bat-rpls-2/igt@i915_selftest@live@guc_hang.html

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

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

### IGT changes ###

#### Issues hit ####

* igt@core_hotunplug@unbind-rebind:
- fi-apl-guc: [PASS][4] -> [INCOMPLETE][5] ([i915#7073])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/fi-apl-guc/igt@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/fi-apl-guc/igt@[email protected]

#### Possible fixes ####

* igt@i915_pm_rpm@module-reload:
- {fi-tgl-mst}: [DMESG-WARN][6] ([i915#5537]) -> [PASS][7]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/fi-tgl-mst/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/fi-tgl-mst/igt@[email protected]

* igt@i915_selftest@live@guc:
- {bat-rpls-1}: [DMESG-WARN][8] ([i915#6471]) -> [PASS][9]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/bat-rpls-1/igt@i915_selftest@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/bat-rpls-1/igt@i915_selftest@[email protected]

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

[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#4258]: https://gitlab.freedesktop.org/drm/intel/issues/4258
[i915#5537]: https://gitlab.freedesktop.org/drm/intel/issues/5537
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6471]: https://gitlab.freedesktop.org/drm/intel/issues/6471
[i915#6559]: https://gitlab.freedesktop.org/drm/intel/issues/6559
[i915#6596]: https://gitlab.freedesktop.org/drm/intel/issues/6596
[i915#6997]: https://gitlab.freedesktop.org/drm/intel/issues/6997
[i915#7073]: https://gitlab.freedesktop.org/drm/intel/issues/7073

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

* Linux: CI_DRM_12233 -> Patchwork_109579v1

CI-20190529: 20190529
CI_DRM_12233: 6fbcc8bcd3c991362bec9b644b6a982630406d6b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7009: cf55acdeea3747c668074a8734029364960e5f5e @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_109579v1: 6fbcc8bcd3c991362bec9b644b6a982630406d6b @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

bcd53fa7d1e7 drm/edid: convert to device specific logging
1963639e6b93 drm/edid/firmware: convert to drm device specific logging
966fab794f5d drm/edid: move edid load declarations to internal header
c48e0e554102 drm/edid: use struct drm_edid for override/firmware EDID
a9415f54aa87 drm/edid/firmware: rename drm_load_edid_firmware() to drm_edid_load_firmware() fa090e8be028 drm/edid/firmware: drop redundant connector_name variable/parameter ec6e3efd1e3e drm/edid: detach debugfs EDID override from EDID property update b2cd67b22e4d drm/edid: add function for checking drm_edid validity
0f04ee686827 drm/edid: split drm_edid block count helper
7723a53f5f51 drm/edid: rename drm_add_override_edid_modes() to drm_edid_override_connector_update() 06a01b72a136 drm/edid: abstract debugfs override EDID show better
e46e50c41da8 drm/edid: debug log EDID override set/reset
99b4eab97641 drm/amd/display: stop using connector->override_edid
0831b3d1b520 drm/i915/hdmi: stop using connector->override_edid
d2e3cab454f7 drm/i915/hdmi: do dual mode detect only if connected

== Logs ==

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

#42 lore raw

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/edid: EDID override refactoring and fixes

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: drm/edid: EDID override refactoring and fixes
URL : https://patchwork.freedesktop.org/series/109579/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_12233_full -> Patchwork_109579v1_full
====================================================

Summary
-------

**FAILURE**

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

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

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

No changes in participating hosts

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live@guc_multi_lrc:
- shard-skl: NOTRUN -> [INCOMPLETE][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl6/igt@i915_selftest@live@guc_multi_lrc.html

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

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

### CI changes ###

#### Possible fixes ####

* boot:
- shard-skl: ([PASS][2], [PASS][3], [PASS][4], [PASS][5], [PASS][6], [PASS][7], [PASS][8], [PASS][9], [PASS][10], [FAIL][11], [PASS][12], [PASS][13], [PASS][14], [PASS][15], [PASS][16], [PASS][17], [PASS][18], [PASS][19], [PASS][20], [PASS][21], [PASS][22]) ([i915#5032]) -> ([PASS][23], [PASS][24], [PASS][25], [PASS][26], [PASS][27], [PASS][28], [PASS][29], [PASS][30], [PASS][31], [PASS][32], [PASS][33], [PASS][34], [PASS][35], [PASS][36], [PASS][37], [PASS][38], [PASS][39], [PASS][40], [PASS][41], [PASS][42], [PASS][43], [PASS][44], [PASS][45], [PASS][46], [PASS][47])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl9/boot.html
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl9/boot.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl9/boot.html
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl9/boot.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl7/boot.html
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl7/boot.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl7/boot.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl6/boot.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl5/boot.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl5/boot.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl3/boot.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl3/boot.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl3/boot.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl3/boot.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl1/boot.html
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl1/boot.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl1/boot.html
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl1/boot.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl10/boot.html
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl10/boot.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl10/boot.html
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl10/boot.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl10/boot.html
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl10/boot.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl10/boot.html
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl9/boot.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl9/boot.html
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl9/boot.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl9/boot.html
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl7/boot.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl7/boot.html
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl7/boot.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl7/boot.html
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl6/boot.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl6/boot.html
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl6/boot.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl6/boot.html
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl5/boot.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl5/boot.html
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl5/boot.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl3/boot.html
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl3/boot.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl3/boot.html
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl1/boot.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl1/boot.html
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl1/boot.html

### IGT changes ###

#### Issues hit ####

* igt@gem_eio@reset-stress:
- shard-tglb: [PASS][48] -> [FAIL][49] ([i915#5784])
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-tglb3/igt@[email protected]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-tglb1/igt@[email protected]

* igt@gem_exec_balancer@parallel-bb-first:
- shard-iclb: [PASS][50] -> [SKIP][51] ([i915#4525]) +1 similar issue
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-iclb2/igt@[email protected]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-iclb3/igt@[email protected]

* igt@gem_exec_fair@basic-deadline:
- shard-glk: NOTRUN -> [FAIL][52] ([i915#2846])
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-glk7/igt@[email protected]
- shard-skl: NOTRUN -> [FAIL][53] ([i915#2846])
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl3/igt@[email protected]

* igt@gem_exec_fair@basic-none-solo@rcs0:
- shard-apl: [PASS][54] -> [FAIL][55] ([i915#2842]) +1 similar issue
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-apl7/igt@gem_exec_fair@[email protected]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-apl7/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-none@rcs0:
- shard-glk: NOTRUN -> [FAIL][56] ([i915#2842])
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-glk5/igt@gem_exec_fair@[email protected]

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

* igt@gem_lmem_swapping@heavy-verify-multi-ccs:
- shard-glk: NOTRUN -> [SKIP][58] ([fdo#109271] / [i915#4613])
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-glk5/igt@[email protected]

* igt@gem_lmem_swapping@parallel-random:
- shard-apl: NOTRUN -> [SKIP][59] ([fdo#109271] / [i915#4613])
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-apl6/igt@[email protected]

* igt@gem_lmem_swapping@verify-ccs:
- shard-skl: NOTRUN -> [SKIP][60] ([fdo#109271] / [i915#4613]) +3 similar issues
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl6/igt@[email protected]

* igt@gem_pread@exhaustion:
- shard-skl: NOTRUN -> [WARN][61] ([i915#2658])
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl1/igt@[email protected]

* igt@gem_userptr_blits@input-checking:
- shard-glk: NOTRUN -> [DMESG-WARN][62] ([i915#4991])
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-glk5/igt@[email protected]

* igt@i915_pm_dc@dc6-dpms:
- shard-skl: NOTRUN -> [FAIL][63] ([i915#454])
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl3/igt@[email protected]

* igt@i915_selftest@live@gt_pm:
- shard-skl: NOTRUN -> [DMESG-FAIL][64] ([i915#1886])
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl6/igt@i915_selftest@live@gt_pm.html

* igt@i915_selftest@mock@vma:
- shard-skl: NOTRUN -> [INCOMPLETE][65] ([i915#6950] / [i915#7065])
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl6/igt@i915_selftest@[email protected]

* igt@kms_async_flips@alternate-sync-async-flip@pipe-b-edp-1:
- shard-skl: NOTRUN -> [FAIL][66] ([i915#2521])
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl6/igt@kms_async_flips@[email protected]

* igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-async-flip:
- shard-skl: NOTRUN -> [FAIL][67] ([i915#3763])
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl3/igt@[email protected]

* igt@kms_ccs@pipe-a-ccs-on-another-bo-y_tiled_gen12_rc_ccs_cc:
- shard-apl: NOTRUN -> [SKIP][68] ([fdo#109271] / [i915#3886]) +2 similar issues
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-apl8/igt@kms_ccs@pipe-a-ccs-on-another-bo-y_tiled_gen12_rc_ccs_cc.html

* igt@kms_ccs@pipe-a-crc-primary-basic-y_tiled_gen12_mc_ccs:
- shard-glk: NOTRUN -> [SKIP][69] ([fdo#109271] / [i915#3886]) +1 similar issue
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-glk5/igt@kms_ccs@pipe-a-crc-primary-basic-y_tiled_gen12_mc_ccs.html

* igt@kms_ccs@pipe-c-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc:
- shard-skl: NOTRUN -> [SKIP][70] ([fdo#109271] / [i915#3886]) +15 similar issues
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl1/igt@kms_ccs@pipe-c-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc.html

* igt@kms_chamelium@hdmi-crc-multiple:
- shard-skl: NOTRUN -> [SKIP][71] ([fdo#109271] / [fdo#111827]) +10 similar issues
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl6/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd-for-each-pipe:
- shard-glk: NOTRUN -> [SKIP][72] ([fdo#109271] / [fdo#111827]) +1 similar issue
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-glk7/igt@[email protected]

* igt@kms_chamelium@vga-hpd:
- shard-apl: NOTRUN -> [SKIP][73] ([fdo#109271] / [fdo#111827]) +3 similar issues
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-apl8/igt@[email protected]

* igt@kms_content_protection@atomic@pipe-a-dp-1:
- shard-apl: NOTRUN -> [INCOMPLETE][74] ([i915#7121])
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-apl8/igt@kms_content_protection@[email protected]

* igt@kms_cursor_crc@cursor-suspend@pipe-b-dp-1:
- shard-apl: [PASS][75] -> [DMESG-WARN][76] ([i915#180])
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-apl7/igt@kms_cursor_crc@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-apl3/igt@kms_cursor_crc@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor@atomic-transitions-varying-size:
- shard-skl: NOTRUN -> [FAIL][77] ([i915#2346]) +1 similar issue
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl1/igt@kms_cursor_legacy@[email protected]

* igt@kms_flip@flip-vs-expired-vblank@b-edp1:
- shard-skl: [PASS][78] -> [FAIL][79] ([i915#79])
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl10/igt@kms_flip@[email protected]
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl10/igt@kms_flip@[email protected]

* igt@kms_flip@flip-vs-suspend@b-vga1:
- shard-snb: [PASS][80] -> [INCOMPLETE][81] ([i915#4839] / [i915#4939])
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-snb7/igt@kms_flip@[email protected]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-snb6/igt@kms_flip@[email protected]

* igt@kms_flip@plain-flip-fb-recreate-interruptible@c-edp1:
- shard-skl: [PASS][82] -> [FAIL][83] ([i915#2122]) +2 similar issues
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl7/igt@kms_flip@[email protected]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl10/igt@kms_flip@[email protected]

* igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-32bpp-4tiledg2rcccs-downscaling@pipe-a-valid-mode:
- shard-iclb: NOTRUN -> [SKIP][84] ([i915#2587] / [i915#2672]) +2 similar issues
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-iclb6/igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-32bpp-4tiledg2rcccs-downscaling@pipe-a-valid-mode.html

* igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling@pipe-a-valid-mode:
- shard-iclb: NOTRUN -> [SKIP][85] ([i915#2672] / [i915#3555])
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-iclb1/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling@pipe-a-valid-mode.html

* igt@kms_frontbuffer_tracking@psr-1p-pri-indfb-multidraw:
- shard-glk: NOTRUN -> [SKIP][86] ([fdo#109271]) +65 similar issues
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-glk5/igt@[email protected]

* igt@kms_plane@plane-panning-top-left@pipe-a-planes:
- shard-snb: [PASS][87] -> [SKIP][88] ([fdo#109271]) +3 similar issues
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-snb5/igt@kms_plane@[email protected]
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-snb5/igt@kms_plane@[email protected]

* igt@kms_plane_alpha_blend@alpha-transparent-fb@pipe-b-hdmi-a-2:
- shard-glk: NOTRUN -> [FAIL][89] ([i915#4573]) +2 similar issues
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-glk5/igt@kms_plane_alpha_blend@[email protected]

* igt@kms_plane_scaling@invalid-num-scalers@pipe-a-edp-1-invalid-num-scalers:
- shard-skl: NOTRUN -> [SKIP][90] ([fdo#109271] / [i915#5776]) +2 similar issues
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl1/igt@kms_plane_scaling@[email protected]

* igt@kms_plane_scaling@plane-downscale-with-pixel-format-factor-0-25@pipe-c-dp-1:
- shard-apl: NOTRUN -> [SKIP][91] ([fdo#109271]) +49 similar issues
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-apl7/igt@kms_plane_scaling@[email protected]

* igt@kms_plane_scaling@planes-downscale-factor-0-5@pipe-b-edp-1:
- shard-skl: NOTRUN -> [SKIP][92] ([fdo#109271]) +275 similar issues
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl1/igt@kms_plane_scaling@[email protected]

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

* igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area:
- shard-glk: NOTRUN -> [SKIP][94] ([fdo#109271] / [i915#658])
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-glk5/igt@[email protected]

* igt@kms_psr2_su@page_flip-p010:
- shard-iclb: NOTRUN -> [SKIP][95] ([fdo#109642] / [fdo#111068] / [i915#658])
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-iclb3/igt@kms_psr2_su@page_flip-p010.html

* igt@kms_psr@psr2_cursor_render:
- shard-iclb: [PASS][96] -> [SKIP][97] ([fdo#109441])
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-iclb1/igt@kms_psr@psr2_cursor_render.html

* igt@kms_psr_stress_test@invalidate-primary-flip-overlay:
- shard-iclb: [PASS][98] -> [SKIP][99] ([i915#5519])
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-iclb8/igt@[email protected]
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-iclb7/igt@[email protected]

* igt@kms_writeback@writeback-invalid-parameters:
- shard-glk: NOTRUN -> [SKIP][100] ([fdo#109271] / [i915#2437])
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-glk7/igt@[email protected]
- shard-skl: NOTRUN -> [SKIP][101] ([fdo#109271] / [i915#2437])
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl3/igt@[email protected]

* igt@perf@polling-parameterized:
- shard-skl: NOTRUN -> [FAIL][102] ([i915#5639])
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl1/igt@[email protected]

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

* igt@sysfs_clients@split-25:
- shard-skl: NOTRUN -> [SKIP][104] ([fdo#109271] / [i915#2994]) +4 similar issues
[104]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl10/igt@[email protected]

#### Possible fixes ####

* igt@feature_discovery@psr2:
- shard-iclb: [SKIP][105] ([i915#658]) -> [PASS][106]
[105]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-iclb3/igt@[email protected]
[106]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-iclb2/igt@[email protected]

* igt@gem_exec_balancer@parallel-keep-submit-fence:
- shard-iclb: [SKIP][107] ([i915#4525]) -> [PASS][108]
[107]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-iclb3/igt@[email protected]
[108]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-iclb2/igt@[email protected]

* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-tglb: [FAIL][109] ([i915#2842]) -> [PASS][110]
[109]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-tglb5/igt@gem_exec_fair@[email protected]
[110]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-tglb7/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-pace-solo@rcs0:
- shard-iclb: [FAIL][111] ([i915#2842]) -> [PASS][112]
[111]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-iclb5/igt@gem_exec_fair@[email protected]
[112]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-iclb5/igt@gem_exec_fair@[email protected]

* igt@gem_exec_schedule@wide@vecs0:
- shard-skl: [INCOMPLETE][113] -> [PASS][114]
[113]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl7/igt@gem_exec_schedule@[email protected]
[114]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl7/igt@gem_exec_schedule@[email protected]

* igt@gen9_exec_parse@allowed-all:
- shard-glk: [DMESG-WARN][115] ([i915#5566] / [i915#716]) -> [PASS][116] +1 similar issue
[115]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-glk5/igt@[email protected]
[116]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-glk7/igt@[email protected]

* igt@kms_cursor_crc@cursor-suspend@pipe-b-edp-1:
- shard-skl: [INCOMPLETE][117] ([i915#4939]) -> [PASS][118]
[117]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl1/igt@kms_cursor_crc@[email protected]
[118]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl5/igt@kms_cursor_crc@[email protected]

* igt@kms_fbcon_fbt@fbc-suspend:
- shard-apl: [FAIL][119] ([i915#4767]) -> [PASS][120]
[119]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-apl6/igt@[email protected]
[120]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-apl2/igt@[email protected]

* igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1:
- shard-skl: [FAIL][121] ([i915#79]) -> [PASS][122] +1 similar issue
[121]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl9/igt@kms_flip@[email protected]
[122]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl9/igt@kms_flip@[email protected]

* igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a1:
- shard-glk: [FAIL][123] ([i915#79]) -> [PASS][124]
[123]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-glk2/igt@kms_flip@[email protected]
[124]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-glk9/igt@kms_flip@[email protected]

* igt@kms_flip@plain-flip-ts-check@b-edp1:
- shard-skl: [FAIL][125] ([i915#2122]) -> [PASS][126]
[125]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl1/igt@kms_flip@[email protected]
[126]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl6/igt@kms_flip@[email protected]

* igt@kms_flip_scaled_crc@flip-32bpp-yftile-to-32bpp-yftileccs-downscaling@pipe-a-valid-mode:
- shard-iclb: [FAIL][127] ([i915#1888]) -> [PASS][128]
[127]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-iclb5/igt@kms_flip_scaled_crc@flip-32bpp-yftile-to-32bpp-yftileccs-downscaling@pipe-a-valid-mode.html
[128]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-iclb5/igt@kms_flip_scaled_crc@flip-32bpp-yftile-to-32bpp-yftileccs-downscaling@pipe-a-valid-mode.html

* igt@kms_hdr@bpc-switch-suspend@pipe-a-dp-1:
- shard-apl: [DMESG-WARN][129] ([i915#180]) -> [PASS][130] +3 similar issues
[129]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-apl8/igt@kms_hdr@[email protected]
[130]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-apl8/igt@kms_hdr@[email protected]

* igt@kms_psr@psr2_sprite_blt:
- shard-iclb: [SKIP][131] ([fdo#109441]) -> [PASS][132] +1 similar issue
[131]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-iclb3/igt@kms_psr@psr2_sprite_blt.html
[132]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-iclb2/igt@kms_psr@psr2_sprite_blt.html

* igt@kms_sysfs_edid_timing:
- shard-skl: [FAIL][133] ([i915#6493]) -> [PASS][134]
[133]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-skl1/igt@kms_sysfs_edid_timing.html
[134]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-skl6/igt@kms_sysfs_edid_timing.html

#### Warnings ####

* igt@gem_exec_balancer@parallel-ordering:
- shard-iclb: [FAIL][135] ([i915#6117]) -> [SKIP][136] ([i915#4525])
[135]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-iclb1/igt@[email protected]
[136]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-iclb3/igt@[email protected]

* igt@kms_content_protection@srm@pipe-a-dp-1:
- shard-apl: [INCOMPLETE][137] ([i915#7121]) -> [INCOMPLETE][138] ([i915#1982] / [i915#7121])
[137]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-apl1/igt@kms_content_protection@[email protected]
[138]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-apl6/igt@kms_content_protection@[email protected]

* igt@runner@aborted:
- shard-apl: ([FAIL][139], [FAIL][140], [FAIL][141], [FAIL][142], [FAIL][143], [FAIL][144]) ([i915#180] / [i915#3002] / [i915#4312]) -> ([FAIL][145], [FAIL][146], [FAIL][147]) ([i915#3002] / [i915#4312])
[139]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-apl3/igt@[email protected]
[140]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-apl8/igt@[email protected]
[141]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-apl8/igt@[email protected]
[142]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-apl8/igt@[email protected]
[143]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-apl2/igt@[email protected]
[144]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12233/shard-apl1/igt@[email protected]
[145]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-apl3/igt@[email protected]
[146]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-apl3/igt@[email protected]
[147]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109579v1/shard-apl1/igt@[email protected]

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
[i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2521]: https://gitlab.freedesktop.org/drm/intel/issues/2521
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
[i915#2994]: https://gitlab.freedesktop.org/drm/intel/issues/2994
[i915#3002]: https://gitlab.freedesktop.org/drm/intel/issues/3002
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3763]: https://gitlab.freedesktop.org/drm/intel/issues/3763
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4525]: https://gitlab.freedesktop.org/drm/intel/issues/4525
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#4573]: https://gitlab.freedesktop.org/drm/intel/issues/4573
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4767]: https://gitlab.freedesktop.org/drm/intel/issues/4767
[i915#4839]: https://gitlab.freedesktop.org/drm/intel/issues/4839
[i915#4939]: https://gitlab.freedesktop.org/drm/intel/issues/4939
[i915#4991]: https://gitlab.freedesktop.org/drm/intel/issues/4991
[i915#5032]: https://gitlab.freedesktop.org/drm/intel/issues/5032
[i915#5519]: https://gitlab.freedesktop.org/drm/intel/issues/5519
[i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
[i915#5639]: https://gitlab.freedesktop.org/drm/intel/issues/5639
[i915#5776]: https://gitlab.freedesktop.org/drm/intel/issues/5776
[i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
[i915#6117]: https://gitlab.freedesktop.org/drm/intel/issues/6117
[i915#6493]: https://gitlab.freedesktop.org/drm/intel/issues/6493
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6950]: https://gitlab.freedesktop.org/drm/intel/issues/6950
[i915#7065]: https://gitlab.freedesktop.org/drm/intel/issues/7065
[i915#7121]: https://gitlab.freedesktop.org/drm/intel/issues/7121
[i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79

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

* Linux: CI_DRM_12233 -> Patchwork_109579v1

CI-20190529: 20190529
CI_DRM_12233: 6fbcc8bcd3c991362bec9b644b6a982630406d6b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7009: cf55acdeea3747c668074a8734029364960e5f5e @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_109579v1: 6fbcc8bcd3c991362bec9b644b6a982630406d6b @ 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_109579v1/index.html

#2 lore raw

Re: [PATCH 01/15] drm/i915/hdmi: do dual mode detect only if connected

In reply to Jani Nikula
Quoted 54 lines · Jani Nikula

For normal connector detect, there's really no point in trying dual mode detect if the connector is disconnected. We can simplify the detect sequence by skipping it. Since intel_hdmi_dp_dual_mode_detect() is only called when EDID is present, we can drop the has_edid parameter.

The functional effect is speeding up disconnected connector detection ever so slightly, and, combined with firmware EDID, also stop logging about assuming dual mode adaptor.

It's a bit subtle, but this will also skip dual mode detect if the connector is force connected and a) there's no EDID of any kind, normal or override/firmare or b) there's EDID but it does not indicate digital. These are corner cases no matter what, and arguably forcing should not be limited by dual mode detect.

Cc Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/display/intel_hdmi.c +3 -6
index 93519fb23d9d..a332eaac86cd 100644
@@ -2355,7 +2355,7 @@ intel_hdmi_unset_edid(struct drm_connector *connector)
 }
 
 static void
-intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector, bool has_edid)
+intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector)
 {
 	struct drm_i915_private *dev_priv = to_i915(connector->dev);
 	struct intel_hdmi *hdmi = intel_attached_hdmi(to_intel_connector(connector));
@@ -2371,16 +2371,13 @@ intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector, bool has_edid)
 	 * CONFIG1 pin, but no such luck on our hardware.
 	 *
 	 * The only method left to us is to check the VBT to see
-	 * if the port is a dual mode capable DP port. But let's
-	 * only do that when we sucesfully read the EDID, to avoid
-	 * confusing log messages about DP dual mode adaptors when
-	 * there's nothing connected to the port.
+	 * if the port is a dual mode capable DP port.
 	 */
 	if (type == DRM_DP_DUAL_MODE_UNKNOWN) {
 		/* An overridden EDID imply that we want this port for testing.
 		 * Make sure not to set limits for that port.
 		 */
-		if (has_edid && !connector->override_edid &&
+		if (!connector->override_edid &&
 		    intel_bios_is_port_dp_dual_mode(dev_priv, port)) {
 			drm_dbg_kms(&dev_priv->drm,
 				    "Assuming DP dual mode adaptor presence based on VBT\n");

drivers/gpu/drm/i915/display/intel_hdmi.c intel_hdmi_set_edid(struct drm_connector *connector) · line 2436

Quoted 9 lines
drivers/gpu/drm/i915/display/intel_hdmi.c +0 -4
@@ -2435,18 +2432,18 @@ intel_hdmi_set_edid(struct drm_connector *connector)
 		intel_gmbus_force_bit(i2c, false);
 	}
 
-	intel_hdmi_dp_dual_mode_detect(connector, edid != NULL);
-
-	intel_display_power_put(dev_priv, POWER_DOMAIN_GMBUS, wakeref);
-
 	to_intel_connector(connector)->detect_edid = edid;
 	if (edid && edid->input & DRM_EDID_INPUT_DIGITAL) {

We didn't have this digital input thing before. What happens with HDMI->VGA dongles for example?

Hmm. This whole thing might already be broken on those. I suspect I've only used my HDMI->VGA dongle on LSPCON machines, so never noticed this. Need to go plug that thing into a native HDMI port...

Quoted 15 lines
drivers/gpu/drm/i915/display/intel_hdmi.c +4 -0
 		intel_hdmi->has_audio = drm_detect_monitor_audio(edid);
 		intel_hdmi->has_hdmi_sink = drm_detect_hdmi_monitor(edid);
 
+		intel_hdmi_dp_dual_mode_detect(connector);
+
 		connected = true;
 	}
 
+	intel_display_power_put(dev_priv, POWER_DOMAIN_GMBUS, wakeref);
+
 	cec_notifier_set_phys_addr_from_edid(intel_hdmi->cec_notifier, edid);
 
 	return connected;
Signature · 1 line
2.34.1
Signature · 2 lines
Ville Syrjälä
Intel
#3 lore raw

Re: [PATCH 01/15] drm/i915/hdmi: do dual mode detect only if connected

Quoted 68 lines · Ville Syrjälä
Quoted 54 lines · Jani Nikula

For normal connector detect, there's really no point in trying dual mode detect if the connector is disconnected. We can simplify the detect sequence by skipping it. Since intel_hdmi_dp_dual_mode_detect() is only called when EDID is present, we can drop the has_edid parameter.

The functional effect is speeding up disconnected connector detection ever so slightly, and, combined with firmware EDID, also stop logging about assuming dual mode adaptor.

It's a bit subtle, but this will also skip dual mode detect if the connector is force connected and a) there's no EDID of any kind, normal or override/firmare or b) there's EDID but it does not indicate digital. These are corner cases no matter what, and arguably forcing should not be limited by dual mode detect.

Cc Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/display/intel_hdmi.c +3 -6
index 93519fb23d9d..a332eaac86cd 100644
@@ -2355,7 +2355,7 @@ intel_hdmi_unset_edid(struct drm_connector *connector)
 }
 
 static void
-intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector, bool has_edid)
+intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector)
 {
 	struct drm_i915_private *dev_priv = to_i915(connector->dev);
 	struct intel_hdmi *hdmi = intel_attached_hdmi(to_intel_connector(connector));
@@ -2371,16 +2371,13 @@ intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector, bool has_edid)
 	 * CONFIG1 pin, but no such luck on our hardware.
 	 *
 	 * The only method left to us is to check the VBT to see
-	 * if the port is a dual mode capable DP port. But let's
-	 * only do that when we sucesfully read the EDID, to avoid
-	 * confusing log messages about DP dual mode adaptors when
-	 * there's nothing connected to the port.
+	 * if the port is a dual mode capable DP port.
 	 */
 	if (type == DRM_DP_DUAL_MODE_UNKNOWN) {
 		/* An overridden EDID imply that we want this port for testing.
 		 * Make sure not to set limits for that port.
 		 */
-		if (has_edid && !connector->override_edid &&
+		if (!connector->override_edid &&
 		    intel_bios_is_port_dp_dual_mode(dev_priv, port)) {
 			drm_dbg_kms(&dev_priv->drm,
 				    "Assuming DP dual mode adaptor presence based on VBT\n");

drivers/gpu/drm/i915/display/intel_hdmi.c intel_hdmi_set_edid(struct drm_connector *connector) · line 2436

Quoted 9 lines
drivers/gpu/drm/i915/display/intel_hdmi.c +0 -4
@@ -2435,18 +2432,18 @@ intel_hdmi_set_edid(struct drm_connector *connector)
 		intel_gmbus_force_bit(i2c, false);
 	}
 
-	intel_hdmi_dp_dual_mode_detect(connector, edid != NULL);
-
-	intel_display_power_put(dev_priv, POWER_DOMAIN_GMBUS, wakeref);
-
 	to_intel_connector(connector)->detect_edid = edid;
 	if (edid && edid->input & DRM_EDID_INPUT_DIGITAL) {

We didn't have this digital input thing before. What happens with HDMI->VGA dongles for example?

Quoted 3 lines

Hmm. This whole thing might already be broken on those. I suspect I've only used my HDMI->VGA dongle on LSPCON machines, so never noticed this. Need to go plug that thing into a native HDMI port...

Except I must have left it elsewhere since I can't find it here. So can't test right now unfortunately.

I first thought this digital check thing might be due to the DVI-I shenanigans in intel_crt_detect_ddc(), but that was added for am unspecified gen2 machine in commit f5afcd3dd0dc ("drm/i915/crt: Check for a analog monitor in case of DVI-I") so not even relevant here. And I don't think I've ever seen a g4x+ machine with an actual DVI-I port.

commit aa93d632c496 ("drm/i915: Require digital monitor on HDMI ports for detect") is where this check was added, but there is no actual justification for checking the digital thing vs. just making sure the edid read succeeded.

So looks to me like this check can just be removed. And if we do come across some real DVI-I use cases we should probably check the VBT DDC pin assignments before we go assuming anything about the wiring.

Signature · 2 lines
Ville Syrjälä
Intel
#4 lore raw

Re: [PATCH 01/15] drm/i915/hdmi: do dual mode detect only if connected

Quoted 88 lines · Ville Syrjälä
Quoted 68 lines · Ville Syrjälä
Quoted 54 lines · Jani Nikula

For normal connector detect, there's really no point in trying dual mode detect if the connector is disconnected. We can simplify the detect sequence by skipping it. Since intel_hdmi_dp_dual_mode_detect() is only called when EDID is present, we can drop the has_edid parameter.

The functional effect is speeding up disconnected connector detection ever so slightly, and, combined with firmware EDID, also stop logging about assuming dual mode adaptor.

It's a bit subtle, but this will also skip dual mode detect if the connector is force connected and a) there's no EDID of any kind, normal or override/firmare or b) there's EDID but it does not indicate digital. These are corner cases no matter what, and arguably forcing should not be limited by dual mode detect.

Cc Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/display/intel_hdmi.c +3 -6
index 93519fb23d9d..a332eaac86cd 100644
@@ -2355,7 +2355,7 @@ intel_hdmi_unset_edid(struct drm_connector *connector)
 }
 
 static void
-intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector, bool has_edid)
+intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector)
 {
 	struct drm_i915_private *dev_priv = to_i915(connector->dev);
 	struct intel_hdmi *hdmi = intel_attached_hdmi(to_intel_connector(connector));
@@ -2371,16 +2371,13 @@ intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector, bool has_edid)
 	 * CONFIG1 pin, but no such luck on our hardware.
 	 *
 	 * The only method left to us is to check the VBT to see
-	 * if the port is a dual mode capable DP port. But let's
-	 * only do that when we sucesfully read the EDID, to avoid
-	 * confusing log messages about DP dual mode adaptors when
-	 * there's nothing connected to the port.
+	 * if the port is a dual mode capable DP port.
 	 */
 	if (type == DRM_DP_DUAL_MODE_UNKNOWN) {
 		/* An overridden EDID imply that we want this port for testing.
 		 * Make sure not to set limits for that port.
 		 */
-		if (has_edid && !connector->override_edid &&
+		if (!connector->override_edid &&
 		    intel_bios_is_port_dp_dual_mode(dev_priv, port)) {
 			drm_dbg_kms(&dev_priv->drm,
 				    "Assuming DP dual mode adaptor presence based on VBT\n");

drivers/gpu/drm/i915/display/intel_hdmi.c intel_hdmi_set_edid(struct drm_connector *connector) · line 2436

Quoted 9 lines
drivers/gpu/drm/i915/display/intel_hdmi.c +0 -4
@@ -2435,18 +2432,18 @@ intel_hdmi_set_edid(struct drm_connector *connector)
 		intel_gmbus_force_bit(i2c, false);
 	}
 
-	intel_hdmi_dp_dual_mode_detect(connector, edid != NULL);
-
-	intel_display_power_put(dev_priv, POWER_DOMAIN_GMBUS, wakeref);
-
 	to_intel_connector(connector)->detect_edid = edid;
 	if (edid && edid->input & DRM_EDID_INPUT_DIGITAL) {

We didn't have this digital input thing before. What happens with HDMI->VGA dongles for example?

Quoted 3 lines

Hmm. This whole thing might already be broken on those. I suspect I've only used my HDMI->VGA dongle on LSPCON machines, so never noticed this. Need to go plug that thing into a native HDMI port...

Except I must have left it elsewhere since I can't find it here. So can't test right now unfortunately.

I first thought this digital check thing might be due to the DVI-I shenanigans in intel_crt_detect_ddc(), but that was added for am unspecified gen2 machine in commit f5afcd3dd0dc ("drm/i915/crt: Check for a analog monitor in case of DVI-I") so not even relevant here. And I don't think I've ever seen a g4x+ machine with an actual DVI-I port.

commit aa93d632c496 ("drm/i915: Require digital monitor on HDMI ports for detect") is where this check was added, but there is no actual justification for checking the digital thing vs. just making sure the edid read succeeded.

Quoted 4 lines

So looks to me like this check can just be removed. And if we do come across some real DVI-I use cases we should probably check the VBT DDC pin assignments before we go assuming anything about the wiring.

Are you saying remove the "edid->input & DRM_EDID_INPUT_DIGITAL" altogether? Or turn this into:

	if (edid) {
		if (edid->input & DRM_EDID_INPUT_DIGITAL) {
			intel_hdmi->has_audio = drm_detect_monitor_audio(edid);
			intel_hdmi->has_hdmi_sink = drm_detect_hdmi_monitor(edid);
		}
		connected = true;
	}

Since e.g. DP wraps the audio/hdmi detect calls in digital check.

OTOH I really want to get rid of the detect audio/hdmi calls [1]. Just a lot of old cruft and the rabbit hole gets deeper. :(

BR,
Jani.

[1] https://patchwork.freedesktop.org/series/108024/

Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
#5 lore raw

Re: [PATCH 01/15] drm/i915/hdmi: do dual mode detect only if connected

Quoted 105 lines · Jani Nikula
Quoted 88 lines · Ville Syrjälä
Quoted 68 lines · Ville Syrjälä
Quoted 54 lines · Jani Nikula

For normal connector detect, there's really no point in trying dual mode detect if the connector is disconnected. We can simplify the detect sequence by skipping it. Since intel_hdmi_dp_dual_mode_detect() is only called when EDID is present, we can drop the has_edid parameter.

The functional effect is speeding up disconnected connector detection ever so slightly, and, combined with firmware EDID, also stop logging about assuming dual mode adaptor.

It's a bit subtle, but this will also skip dual mode detect if the connector is force connected and a) there's no EDID of any kind, normal or override/firmare or b) there's EDID but it does not indicate digital. These are corner cases no matter what, and arguably forcing should not be limited by dual mode detect.

Cc Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/display/intel_hdmi.c +3 -6
index 93519fb23d9d..a332eaac86cd 100644
@@ -2355,7 +2355,7 @@ intel_hdmi_unset_edid(struct drm_connector *connector)
 }
 
 static void
-intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector, bool has_edid)
+intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector)
 {
 	struct drm_i915_private *dev_priv = to_i915(connector->dev);
 	struct intel_hdmi *hdmi = intel_attached_hdmi(to_intel_connector(connector));
@@ -2371,16 +2371,13 @@ intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector, bool has_edid)
 	 * CONFIG1 pin, but no such luck on our hardware.
 	 *
 	 * The only method left to us is to check the VBT to see
-	 * if the port is a dual mode capable DP port. But let's
-	 * only do that when we sucesfully read the EDID, to avoid
-	 * confusing log messages about DP dual mode adaptors when
-	 * there's nothing connected to the port.
+	 * if the port is a dual mode capable DP port.
 	 */
 	if (type == DRM_DP_DUAL_MODE_UNKNOWN) {
 		/* An overridden EDID imply that we want this port for testing.
 		 * Make sure not to set limits for that port.
 		 */
-		if (has_edid && !connector->override_edid &&
+		if (!connector->override_edid &&
 		    intel_bios_is_port_dp_dual_mode(dev_priv, port)) {
 			drm_dbg_kms(&dev_priv->drm,
 				    "Assuming DP dual mode adaptor presence based on VBT\n");

drivers/gpu/drm/i915/display/intel_hdmi.c intel_hdmi_set_edid(struct drm_connector *connector) · line 2436

Quoted 9 lines
drivers/gpu/drm/i915/display/intel_hdmi.c +0 -4
@@ -2435,18 +2432,18 @@ intel_hdmi_set_edid(struct drm_connector *connector)
 		intel_gmbus_force_bit(i2c, false);
 	}
 
-	intel_hdmi_dp_dual_mode_detect(connector, edid != NULL);
-
-	intel_display_power_put(dev_priv, POWER_DOMAIN_GMBUS, wakeref);
-
 	to_intel_connector(connector)->detect_edid = edid;
 	if (edid && edid->input & DRM_EDID_INPUT_DIGITAL) {

We didn't have this digital input thing before. What happens with HDMI->VGA dongles for example?

Quoted 3 lines

Hmm. This whole thing might already be broken on those. I suspect I've only used my HDMI->VGA dongle on LSPCON machines, so never noticed this. Need to go plug that thing into a native HDMI port...

Except I must have left it elsewhere since I can't find it here. So can't test right now unfortunately.

I first thought this digital check thing might be due to the DVI-I shenanigans in intel_crt_detect_ddc(), but that was added for am unspecified gen2 machine in commit f5afcd3dd0dc ("drm/i915/crt: Check for a analog monitor in case of DVI-I") so not even relevant here. And I don't think I've ever seen a g4x+ machine with an actual DVI-I port.

commit aa93d632c496 ("drm/i915: Require digital monitor on HDMI ports for detect") is where this check was added, but there is no actual justification for checking the digital thing vs. just making sure the edid read succeeded.

Quoted 4 lines

So looks to me like this check can just be removed. And if we do come across some real DVI-I use cases we should probably check the VBT DDC pin assignments before we go assuming anything about the wiring.

Are you saying remove the "edid->input & DRM_EDID_INPUT_DIGITAL" altogether? Or turn this into:

	if (edid) {
		if (edid->input & DRM_EDID_INPUT_DIGITAL) {
			intel_hdmi->has_audio = drm_detect_monitor_audio(edid);
			intel_hdmi->has_hdmi_sink = drm_detect_hdmi_monitor(edid);
		}
		connected = true;
	}
Quoted 1 line

Since e.g. DP wraps the audio/hdmi detect calls in digital check.

I'm thinking they should just all go. But I guess that's a separate topic for the most part.

Signature · 2 lines
Ville Syrjälä
Intel
#6 lore raw

Re: [Intel-gfx] [PATCH 01/15] drm/i915/hdmi: do dual mode detect only if connected

In reply to Ville Syrjälä
Quoted 76 lines · Ville Syrjälä
Quoted 68 lines · Ville Syrjälä
Quoted 54 lines · Jani Nikula

For normal connector detect, there's really no point in trying dual mode detect if the connector is disconnected. We can simplify the detect sequence by skipping it. Since intel_hdmi_dp_dual_mode_detect() is only called when EDID is present, we can drop the has_edid parameter.

The functional effect is speeding up disconnected connector detection ever so slightly, and, combined with firmware EDID, also stop logging about assuming dual mode adaptor.

It's a bit subtle, but this will also skip dual mode detect if the connector is force connected and a) there's no EDID of any kind, normal or override/firmare or b) there's EDID but it does not indicate digital. These are corner cases no matter what, and arguably forcing should not be limited by dual mode detect.

Cc Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/display/intel_hdmi.c +3 -6
index 93519fb23d9d..a332eaac86cd 100644
@@ -2355,7 +2355,7 @@ intel_hdmi_unset_edid(struct drm_connector *connector)
 }
 
 static void
-intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector, bool has_edid)
+intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector)
 {
 	struct drm_i915_private *dev_priv = to_i915(connector->dev);
 	struct intel_hdmi *hdmi = intel_attached_hdmi(to_intel_connector(connector));
@@ -2371,16 +2371,13 @@ intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector, bool has_edid)
 	 * CONFIG1 pin, but no such luck on our hardware.
 	 *
 	 * The only method left to us is to check the VBT to see
-	 * if the port is a dual mode capable DP port. But let's
-	 * only do that when we sucesfully read the EDID, to avoid
-	 * confusing log messages about DP dual mode adaptors when
-	 * there's nothing connected to the port.
+	 * if the port is a dual mode capable DP port.
 	 */
 	if (type == DRM_DP_DUAL_MODE_UNKNOWN) {
 		/* An overridden EDID imply that we want this port for testing.
 		 * Make sure not to set limits for that port.
 		 */
-		if (has_edid && !connector->override_edid &&
+		if (!connector->override_edid &&
 		    intel_bios_is_port_dp_dual_mode(dev_priv, port)) {
 			drm_dbg_kms(&dev_priv->drm,
 				    "Assuming DP dual mode adaptor presence based on VBT\n");

drivers/gpu/drm/i915/display/intel_hdmi.c intel_hdmi_set_edid(struct drm_connector *connector) · line 2436

Quoted 9 lines
drivers/gpu/drm/i915/display/intel_hdmi.c +0 -4
@@ -2435,18 +2432,18 @@ intel_hdmi_set_edid(struct drm_connector *connector)
 		intel_gmbus_force_bit(i2c, false);
 	}
 
-	intel_hdmi_dp_dual_mode_detect(connector, edid != NULL);
-
-	intel_display_power_put(dev_priv, POWER_DOMAIN_GMBUS, wakeref);
-
 	to_intel_connector(connector)->detect_edid = edid;
 	if (edid && edid->input & DRM_EDID_INPUT_DIGITAL) {

We didn't have this digital input thing before. What happens with HDMI->VGA dongles for example?

Quoted 3 lines

Hmm. This whole thing might already be broken on those. I suspect I've only used my HDMI->VGA dongle on LSPCON machines, so never noticed this. Need to go plug that thing into a native HDMI port...

Except I must have left it elsewhere since I can't find it here. So can't test right now unfortunately.

Quoted 6 lines

I first thought this digital check thing might be due to the DVI-I shenanigans in intel_crt_detect_ddc(), but that was added for am unspecified gen2 machine in commit f5afcd3dd0dc ("drm/i915/crt: Check for a analog monitor in case of DVI-I") so not even relevant here. And I don't think I've ever seen a g4x+ machine with an actual DVI-I port.

Good news everyone, I found such a board: Intel DG43GT. Well, I didn't physically find one but I found the manual online. And some coreboot repo even had the vbt handily available. And yes, it does show the same DDC pins being used for the DVI-D port and CRT port. So I guess given that these digital checks do make some sense.

Signature · 2 lines
Ville Syrjälä
Intel
#10 lore raw

Re: [PATCH 02/15] drm/i915/hdmi: stop using connector->override_edid

In reply to Jani Nikula
Quoted 22 lines · Jani Nikula

The connector->override_edid flag is strictly for EDID override debugfs management, and drivers have no business using it.

The check for override_edid was added in commit 301906290553 ("drm/i915:
Ignore TMDS clock limit for DP++ when EDID override is set") to facilitate mode list cross-checking against modes in override EDID when the connector in question isn't even connected. The dual mode detect fallback would do VBT based limiting in this case.

Instead of override EDID, check for connector forcing in the fallback.

Cc Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/display/intel_hdmi.c +0 -0
index a332eaac86cd..878a65c887f7 100644

drivers/gpu/drm/i915/display/intel_hdmi.c intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector) · line 2378

Quoted 9 lines
drivers/gpu/drm/i915/display/intel_hdmi.c +2 -4
@@ -2374,10 +2374,8 @@ intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector)
 	 * if the port is a dual mode capable DP port.
 	 */
 	if (type == DRM_DP_DUAL_MODE_UNKNOWN) {
-		/* An overridden EDID imply that we want this port for testing.
-		 * Make sure not to set limits for that port.
-		 */
-		if (!connector->override_edid &&
+		if (connector->force != DRM_FORCE_ON &&
+		    connector->force != DRM_FORCE_ON_DIGITAL &&

I don't think we can get here with force==OFF, so could simply to just if (!connector->force && ...

which might even be less confusing either way. At least I'm getting confused thinking we'd want to assume the presence of the adaptor with force==OFF.

Quoted 5 lines
drivers/gpu/drm/i915/display/intel_hdmi.c +0 -0
 		    intel_bios_is_port_dp_dual_mode(dev_priv, port)) {
 			drm_dbg_kms(&dev_priv->drm,
 				    "Assuming DP dual mode adaptor presence based on VBT\n");
Signature · 1 line
2.34.1
Signature · 2 lines
Ville Syrjälä
Intel
Reviewed-by on v1 4/15
#16 lore raw

Re: [PATCH 04/15] drm/edid: debug log EDID override set/reset

In reply to Jani Nikula
Quoted 4 lines · Jani Nikula

It's useful debugging information to know if and when an override EDID was set or reset.

Quoted 30 lines
---
 drivers/gpu/drm/drm_edid.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/drm_edid.c +6 -0
index 47465b9765f1..a863cffa2dc5 100644
@@ -2194,6 +2194,9 @@ int drm_edid_override_set(struct drm_connector *connector, const void *edid,
 
 	connector->override_edid = false;
 
+	drm_dbg_kms(connector->dev, "[CONNECTOR:%d:%s] EDID override set\n",
+		    connector->base.id, connector->name);
+
 	ret = drm_connector_update_edid_property(connector, edid);
 	if (!ret)
 		connector->override_edid = true;
@@ -2206,6 +2209,9 @@ int drm_edid_override_reset(struct drm_connector *connector)
 {
 	connector->override_edid = false;
 
+	drm_dbg_kms(connector->dev, "[CONNECTOR:%d:%s] EDID override reset\n",
+		    connector->base.id, connector->name);
+
 	return drm_connector_update_edid_property(connector, NULL);
 }
 
Signature · 1 line
2.34.1
Signature · 2 lines
Ville Syrjälä
Intel
Reviewed-by on v1 5/15
#18 lore raw

Re: [PATCH 05/15] drm/edid: abstract debugfs override EDID show better

In reply to Jani Nikula
Quoted 4 lines · Jani Nikula

Add a function to dump the override EDID in debugfs. This hides the override EDID management better in drm_edid.c.

Quoted 72 lines
---
 drivers/gpu/drm/drm_crtc_internal.h |  4 +++-
 drivers/gpu/drm/drm_debugfs.c       |  8 +-------
 drivers/gpu/drm/drm_edid.c          | 11 +++++++++++
 3 files changed, 15 insertions(+), 8 deletions(-)
drivers/gpu/drm/drm_crtc_internal.h +3 -1
index 56041b604881..fb8a68d90940 100644
@@ -56,9 +56,10 @@ struct drm_plane;
 struct drm_plane_state;
 struct drm_property;
 struct edid;
+struct fwnode_handle;
 struct kref;
+struct seq_file;
 struct work_struct;
-struct fwnode_handle;
 
 /* drm_crtc.c */
 int drm_mode_crtc_set_obj_prop(struct drm_mode_object *obj,
@@ -286,5 +287,6 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
 
 /* drm_edid.c */
 void drm_mode_fixup_1366x768(struct drm_display_mode *mode);
+int drm_edid_override_show(struct drm_connector *connector, struct seq_file *m);
 int drm_edid_override_set(struct drm_connector *connector, const void *edid, size_t size);
 int drm_edid_override_reset(struct drm_connector *connector);
drivers/gpu/drm/drm_debugfs.c +1 -7
index 01ee3febb813..ee445f4605ba 100644
@@ -328,13 +328,7 @@ static ssize_t connector_write(struct file *file, const char __user *ubuf,
 
 static int edid_show(struct seq_file *m, void *data)
 {
-	struct drm_connector *connector = m->private;
-	struct drm_property_blob *edid = connector->edid_blob_ptr;
-
-	if (connector->override_edid && edid)
-		seq_write(m, edid->data, edid->length);
-
-	return 0;
+	return drm_edid_override_show(m->private, m);
 }
 
 static int edid_open(struct inode *inode, struct file *file)
drivers/gpu/drm/drm_edid.c +11 -0
index a863cffa2dc5..1ada36e0d826 100644
@@ -2183,6 +2183,17 @@ static struct edid *drm_get_override_edid(struct drm_connector *connector,
 	return IS_ERR(override) ? NULL : override;
 }
 
+/* For debugfs edid_override implementation */
+int drm_edid_override_show(struct drm_connector *connector, struct seq_file *m)
+{
+	struct drm_property_blob *edid = connector->edid_blob_ptr;
+
+	if (connector->override_edid && edid)
+		seq_write(m, edid->data, edid->length);
+
+	return 0;
+}
+
 /* For debugfs edid_override implementation */
 int drm_edid_override_set(struct drm_connector *connector, const void *edid,
 			  size_t size)
Signature · 1 line
2.34.1
Signature · 2 lines
Ville Syrjälä
Intel
Reviewed-by on v1 7/15
#22 lore raw

Re: [PATCH 07/15] drm/edid: split drm_edid block count helper

In reply to Jani Nikula
Quoted 5 lines · Jani Nikula

Split the drm_edid block count helper to a base version that reports the block count indicated by EDID contents, and another on top that limits the block count based on size allocated for the EDID.

Quoted 42 lines
---
 drivers/gpu/drm/drm_edid.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_edid.c +11 -4
index 8baa46dc2537..616c1cdc7507 100644
@@ -1613,7 +1613,8 @@ static const void *edid_extension_block_data(const struct edid *edid, int index)
 	return edid_block_data(edid, index + 1);
 }
 
-static int drm_edid_block_count(const struct drm_edid *drm_edid)
+/* EDID block count indicated in EDID, may exceed allocated size */
+static int __drm_edid_block_count(const struct drm_edid *drm_edid)
 {
 	int num_blocks;
 
@@ -1633,12 +1634,18 @@ static int drm_edid_block_count(const struct drm_edid *drm_edid)
 			num_blocks = eeodb;
 	}
 
-	/* Limit by allocated size */
-	num_blocks = min(num_blocks, (int)drm_edid->size / EDID_LENGTH);
-
 	return num_blocks;
 }
 
+/* EDID block count, limited by allocated size */
+static int drm_edid_block_count(const struct drm_edid *drm_edid)
+{
+	/* Limit by allocated size */
+	return min(__drm_edid_block_count(drm_edid),
+		   (int)drm_edid->size / EDID_LENGTH);
+}
+
+/* EDID extension block count, limited by allocated size */
 static int drm_edid_extension_block_count(const struct drm_edid *drm_edid)
 {
 	return drm_edid_block_count(drm_edid) - 1;
Signature · 1 line
2.34.1
Signature · 2 lines
Ville Syrjälä
Intel
Reviewed-by on v1 8/15
#24 lore raw

Re: [PATCH 08/15] drm/edid: add function for checking drm_edid validity

In reply to Jani Nikula
Quoted 25 lines · Jani Nikula

We've lacked a function for immutable validity check on drm_edid. Add one.

---
 drivers/gpu/drm/drm_edid.c | 30 ++++++++++++++++++++++++++++++
 include/drm/drm_edid.h     |  1 +
 2 files changed, 31 insertions(+)
drivers/gpu/drm/drm_edid.c +8 -0
index 616c1cdc7507..c3cf942186b7 100644
@@ -2040,6 +2040,36 @@ bool drm_edid_is_valid(struct edid *edid)
 }
 EXPORT_SYMBOL(drm_edid_is_valid);
 
+/**
+ * drm_edid_valid - sanity check EDID data
+ * @drm_edid: EDID data
+ *
+ * Sanity check an EDID. Cross check block count against allocated size and
+ * checksum the blocks.
+ *
+ * Return: True if the EDID data is valid, false otherwise.

drivers/gpu/drm/drm_edid.c bool drm_edid_is_valid(struct edid *edid) · line 2060

Quoted 10 lines
drivers/gpu/drm/drm_edid.c +10 -0
+ */
+bool drm_edid_valid(const struct drm_edid *drm_edid)
+{
+	int i;
+
+	if (!drm_edid)
+		return false;
+
+	if (edid_size_by_blocks(__drm_edid_block_count(drm_edid)) != drm_edid->size)
+		return false;

I Was consfued about the HF-EEODB crap for a bit but __drm_edid_block_count() does include that.

So looks sane

Quoted 29 lines
drivers/gpu/drm/drm_edid.c +12 -0
+
+	for (i = 0; i < drm_edid_block_count(drm_edid); i++) {
+		const void *block = drm_edid_block_data(drm_edid, i);
+
+		if (!edid_block_valid(block, i == 0))
+			return false;
+	}
+
+	return true;
+}
+EXPORT_SYMBOL(drm_edid_valid);
+
 static struct edid *edid_filter_invalid_blocks(struct edid *edid,
 					       size_t *alloc_size)
 {
include/drm/drm_edid.h +1 -0
index 05380681a4fb..a2e25e7e6ee5 100644
@@ -606,6 +606,7 @@ drm_display_mode_from_cea_vic(struct drm_device *dev,
 const struct drm_edid *drm_edid_alloc(const void *edid, size_t size);
 const struct drm_edid *drm_edid_dup(const struct drm_edid *drm_edid);
 void drm_edid_free(const struct drm_edid *drm_edid);
+bool drm_edid_valid(const struct drm_edid *drm_edid);
 const struct edid *drm_edid_raw(const struct drm_edid *drm_edid);
 const struct drm_edid *drm_edid_read(struct drm_connector *connector);
 const struct drm_edid *drm_edid_read_ddc(struct drm_connector *connector,
Signature · 1 line
2.34.1
Signature · 2 lines
Ville Syrjälä
Intel
Reviewed-by on v1 10/15
#28 lore raw

Re: [PATCH 10/15] drm/edid/firmware: drop redundant connector_name variable/parameter

In reply to Jani Nikula
Quoted 4 lines · Jani Nikula

Stop passing around something that's readily available in connector->name.

Weird. Did we not have a connector in there at some point or something? Shrug.

Quoted 77 lines
---
 drivers/gpu/drm/drm_edid_load.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)
drivers/gpu/drm/drm_edid_load.c +7 -9
index 37d8ba3ddb46..13cdbfb991eb 100644
@@ -167,8 +167,7 @@ static int edid_size(const u8 *edid, int data_size)
 	return (edid[0x7e] + 1) * EDID_LENGTH;
 }
 
-static void *edid_load(struct drm_connector *connector, const char *name,
-			const char *connector_name)
+static void *edid_load(struct drm_connector *connector, const char *name)
 {
 	const struct firmware *fw = NULL;
 	const u8 *fwdata;
@@ -185,10 +184,10 @@ static void *edid_load(struct drm_connector *connector, const char *name,
 		struct platform_device *pdev;
 		int err;
 
-		pdev = platform_device_register_simple(connector_name, -1, NULL, 0);
+		pdev = platform_device_register_simple(connector->name, -1, NULL, 0);
 		if (IS_ERR(pdev)) {
 			DRM_ERROR("Failed to register EDID firmware platform device "
-				  "for connector \"%s\"\n", connector_name);
+				  "for connector \"%s\"\n", connector->name);
 			return ERR_CAST(pdev);
 		}
 
@@ -244,7 +243,7 @@ static void *edid_load(struct drm_connector *connector, const char *name,
 		edid[EDID_LENGTH-1] += edid[0x7e] - valid_extensions;
 		DRM_INFO("Found %d valid extensions instead of %d in EDID data "
 		    "\"%s\" for connector \"%s\"\n", valid_extensions,
-		    edid[0x7e], name, connector_name);
+		    edid[0x7e], name, connector->name);
 		edid[0x7e] = valid_extensions;
 
 		new_edid = krealloc(edid, (valid_extensions + 1) * EDID_LENGTH,
@@ -256,7 +255,7 @@ static void *edid_load(struct drm_connector *connector, const char *name,
 	DRM_INFO("Got %s EDID base block and %d extension%s from "
 	    "\"%s\" for connector \"%s\"\n", (builtin >= 0) ? "built-in" :
 	    "external", valid_extensions, valid_extensions == 1 ? "" : "s",
-	    name, connector_name);
+	    name, connector->name);
 
 out:
 	release_firmware(fw);
@@ -265,7 +264,6 @@ static void *edid_load(struct drm_connector *connector, const char *name,
 
 struct edid *drm_load_edid_firmware(struct drm_connector *connector)
 {
-	const char *connector_name = connector->name;
 	char *edidname, *last, *colon, *fwstr, *edidstr, *fallback = NULL;
 	struct edid *edid;
 
@@ -288,7 +286,7 @@ struct edid *drm_load_edid_firmware(struct drm_connector *connector)
 	while ((edidname = strsep(&edidstr, ","))) {
 		colon = strchr(edidname, ':');
 		if (colon != NULL) {
-			if (strncmp(connector_name, edidname, colon - edidname))
+			if (strncmp(connector->name, edidname, colon - edidname))
 				continue;
 			edidname = colon + 1;
 			break;
@@ -310,7 +308,7 @@ struct edid *drm_load_edid_firmware(struct drm_connector *connector)
 	if (*last == '\n')
 		*last = '\0';
 
-	edid = edid_load(connector, edidname, connector_name);
+	edid = edid_load(connector, edidname);
 	kfree(fwstr);
 
 	return edid;
Signature · 1 line
2.34.1
Signature · 2 lines
Ville Syrjälä
Intel
Reviewed-by on v1 12/15
#32 lore raw

Re: [PATCH 12/15] drm/edid: use struct drm_edid for override/firmware EDID

In reply to Jani Nikula
Quoted 11 lines · Jani Nikula

There's a lot going on here, but the main thing is switching the firmware EDID loader to use struct drm_edid. Unfortunately, it's difficult to reasonably split to smaller pieces.

Convert the EDID loader to struct drm_edid. There's a functional change in validation; it no longer tries to fix errors or filter invalid blocks. It's stricter in this sense. Hopefully this will not be an issue.

As a by-product, this change also allows HF-EEODB extended EDIDs to be passed via override/firmware EDID.

Was pondering about that reading the earlier patch. Figured I'd keep on reading, and voila here it is.

Quoted 158 lines
---
 drivers/gpu/drm/drm_edid.c      | 32 ++++++------
 drivers/gpu/drm/drm_edid_load.c | 86 +++++++--------------------------
 include/drm/drm_edid.h          |  4 +-
 3 files changed, 36 insertions(+), 86 deletions(-)
drivers/gpu/drm/drm_edid.c +17 -15
index 2c66a901474d..935bdf4e6269 100644
@@ -2202,21 +2202,16 @@ static void connector_bad_edid(struct drm_connector *connector,
 }
 
 /* Get override or firmware EDID */
-static struct edid *drm_get_override_edid(struct drm_connector *connector,
-					  size_t *alloc_size)
+static const struct drm_edid *drm_edid_override_get(struct drm_connector *connector)
 {
-	struct edid *override = NULL;
+	const struct drm_edid *override = NULL;
 
 	if (connector->edid_override)
-		override = drm_edid_duplicate(connector->edid_override->edid);
+		override = drm_edid_dup(connector->edid_override);
 
 	if (!override)
 		override = drm_edid_load_firmware(connector);
 
-	/* FIXME: Get alloc size from deeper down the stack */
-	if (!IS_ERR_OR_NULL(override) && alloc_size)
-		*alloc_size = edid_size(override);
-
 	return IS_ERR(override) ? NULL : override;
 }
 
@@ -2277,14 +2272,14 @@ int drm_edid_override_reset(struct drm_connector *connector)
  */
 int drm_edid_override_connector_update(struct drm_connector *connector)
 {
-	struct edid *override;
+	const struct drm_edid *override;
 	int num_modes = 0;
 
-	override = drm_get_override_edid(connector, NULL);
+	override = drm_edid_override_get(connector);
 	if (override) {
-		drm_connector_update_edid_property(connector, override);
-		num_modes = drm_add_edid_modes(connector, override);
-		kfree(override);
+		num_modes = drm_edid_connector_update(connector, override);
+
+		drm_edid_free(override);
 
 		DRM_DEBUG_KMS("[CONNECTOR:%d:%s] adding %d modes via fallback override/firmware EDID\n",
 			      connector->base.id, connector->name, num_modes);
@@ -2335,12 +2330,19 @@ static struct edid *_drm_do_get_edid(struct drm_connector *connector,
 {
 	enum edid_block_status status;
 	int i, num_blocks, invalid_blocks = 0;
+	const struct drm_edid *override;
 	struct edid *edid, *new;
 	size_t alloc_size = EDID_LENGTH;
 
-	edid = drm_get_override_edid(connector, &alloc_size);
-	if (edid)
+	override = drm_edid_override_get(connector);
+	if (override) {
+		alloc_size = override->size;
+		edid = kmemdup(override->edid, alloc_size, GFP_KERNEL);
+		drm_edid_free(override);
+		if (!edid)
+			return NULL;
 		goto ok;
+	}
 
 	edid = kmalloc(alloc_size, GFP_KERNEL);
 	if (!edid)
drivers/gpu/drm/drm_edid_load.c +5 -54
index bc6b96abd1b3..248f0685c33e 100644
@@ -159,22 +159,12 @@ static const u8 generic_edid[GENERIC_EDIDS][128] = {
 	},
 };
 
-static int edid_size(const u8 *edid, int data_size)
-{
-	if (data_size < EDID_LENGTH)
-		return 0;
-
-	return (edid[0x7e] + 1) * EDID_LENGTH;
-}
-
-static void *edid_load(struct drm_connector *connector, const char *name)
+static const struct drm_edid *edid_load(struct drm_connector *connector, const char *name)
 {
 	const struct firmware *fw = NULL;
 	const u8 *fwdata;
-	u8 *edid;
+	const struct drm_edid *drm_edid;
 	int fwsize, builtin;
-	int i, valid_extensions = 0;
-	bool print_bad_edid = !connector->bad_edid_counter || drm_debug_enabled(DRM_UT_KMS);
 
 	builtin = match_string(generic_edid_name, GENERIC_EDIDS, name);
 	if (builtin >= 0) {
@@ -203,69 +193,26 @@ static void *edid_load(struct drm_connector *connector, const char *name)
 		fwsize = fw->size;
 	}
 
-	if (edid_size(fwdata, fwsize) != fwsize) {
-		DRM_ERROR("Size of EDID firmware \"%s\" is invalid "
-			  "(expected %d, got %d\n", name,
-			  edid_size(fwdata, fwsize), (int)fwsize);
-		edid = ERR_PTR(-EINVAL);
-		goto out;
-	}
-
-	edid = kmemdup(fwdata, fwsize, GFP_KERNEL);
-	if (edid == NULL) {
-		edid = ERR_PTR(-ENOMEM);
-		goto out;
-	}
-
-	if (!drm_edid_block_valid(edid, 0, print_bad_edid,
-				  &connector->edid_corrupt)) {
-		connector->bad_edid_counter++;
-		DRM_ERROR("Base block of EDID firmware \"%s\" is invalid ",
-		    name);
-		kfree(edid);
-		edid = ERR_PTR(-EINVAL);
-		goto out;
-	}
-
-	for (i = 1; i <= edid[0x7e]; i++) {
-		if (i != valid_extensions + 1)
-			memcpy(edid + (valid_extensions + 1) * EDID_LENGTH,
-			    edid + i * EDID_LENGTH, EDID_LENGTH);
-		if (drm_edid_block_valid(edid + i * EDID_LENGTH, i,
-					 print_bad_edid,
-					 NULL))
-			valid_extensions++;
-	}
-
-	if (valid_extensions != edid[0x7e]) {
-		u8 *new_edid;
+	drm_dbg_kms(connector->dev, "[CONNECTOR:%d:%s] Loaded %s firmware EDID \"%s\"\n",
+		    connector->base.id, connector->name,
+		    builtin >= 0 ? "built-in" : "external", name);
 
-		edid[EDID_LENGTH-1] += edid[0x7e] - valid_extensions;
-		DRM_INFO("Found %d valid extensions instead of %d in EDID data "
-		    "\"%s\" for connector \"%s\"\n", valid_extensions,
-		    edid[0x7e], name, connector->name);
-		edid[0x7e] = valid_extensions;
-

drivers/gpu/drm/drm_edid_load.c static void *edid_load(struct drm_connector *connector, const char *name) · line 205

Quoted 10 lines
drivers/gpu/drm/drm_edid_load.c +5 -4
-		new_edid = krealloc(edid, (valid_extensions + 1) * EDID_LENGTH,
-				    GFP_KERNEL);
-		if (new_edid)
-			edid = new_edid;
+	drm_edid = drm_edid_alloc(fwdata, fwsize);
+	if (!drm_edid_valid(drm_edid)) {
+		drm_err(connector->dev, "Invalid firmware EDID \"%s\"\n", name);
+		drm_edid_free(drm_edid);
+		drm_edid = ERR_PTR(-EINVAL);
 	}

Lovely diffstat ratio there.

Quoted 54 lines
drivers/gpu/drm/drm_edid_load.c +7 -11
-	DRM_INFO("Got %s EDID base block and %d extension%s from "
-	    "\"%s\" for connector \"%s\"\n", (builtin >= 0) ? "built-in" :
-	    "external", valid_extensions, valid_extensions == 1 ? "" : "s",
-	    name, connector->name);
-
-out:
 	release_firmware(fw);
-	return edid;
+
+	return drm_edid;
 }
 
-struct edid *drm_edid_load_firmware(struct drm_connector *connector)
+const struct drm_edid *drm_edid_load_firmware(struct drm_connector *connector)
 {
 	char *edidname, *last, *colon, *fwstr, *edidstr, *fallback = NULL;
-	struct edid *edid;
+	const struct drm_edid *drm_edid;
 
 	if (edid_firmware[0] == '\0')
 		return ERR_PTR(-ENOENT);
@@ -308,8 +255,9 @@ struct edid *drm_edid_load_firmware(struct drm_connector *connector)
 	if (*last == '\n')
 		*last = '\0';
 
-	edid = edid_load(connector, edidname);
+	drm_edid = edid_load(connector, edidname);
+
 	kfree(fwstr);
 
-	return edid;
+	return drm_edid;
 }
include/drm/drm_edid.h +2 -2
index dc7467d25cd8..8138613f4e4e 100644
@@ -388,11 +388,11 @@ int drm_av_sync_delay(struct drm_connector *connector,
 		      const struct drm_display_mode *mode);
 
 #ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE
-struct edid *drm_edid_load_firmware(struct drm_connector *connector);
+const struct drm_edid *drm_edid_load_firmware(struct drm_connector *connector);
 int __drm_set_edid_firmware_path(const char *path);
 int __drm_get_edid_firmware_path(char *buf, size_t bufsize);
 #else
-static inline struct edid *
+static inline const struct drm_edid *
 drm_edid_load_firmware(struct drm_connector *connector)
 {
 	return ERR_PTR(-ENOENT);
Signature · 1 line
2.34.1
Signature · 2 lines
Ville Syrjälä
Intel
Reviewed-by on v1 6/15
#20 lore raw

Re: [PATCH 06/15] drm/edid: rename drm_add_override_edid_modes() to drm_edid_override_connector_update()

In reply to Jani Nikula
Quoted 4 lines · Jani Nikula

Follow the naming of both EDID override functions as well as drm_edid_connector_update(). This also matches better what the function does; a combination of EDID property update and add modes. Indeed it should later be converted to call drm_edid_connector_update().

All the function names around that stuff still make my head spin, but hopefully it'll clear up eventually when all the cruft has disappeared.

Quoted 67 lines
---
 drivers/gpu/drm/drm_edid.c         | 6 +++---
 drivers/gpu/drm/drm_probe_helper.c | 2 +-
 include/drm/drm_edid.h             | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/drm_edid.c +3 -3
index 1ada36e0d826..8baa46dc2537 100644
@@ -2227,7 +2227,7 @@ int drm_edid_override_reset(struct drm_connector *connector)
 }
 
 /**
- * drm_add_override_edid_modes - add modes from override/firmware EDID
+ * drm_edid_override_connector_update - add modes from override/firmware EDID
  * @connector: connector we're probing
  *
  * Add modes from the override/firmware EDID, if available. Only to be used from
@@ -2237,7 +2237,7 @@ int drm_edid_override_reset(struct drm_connector *connector)
  *
  * Return: The number of modes added or 0 if we couldn't find any.
  */
-int drm_add_override_edid_modes(struct drm_connector *connector)
+int drm_edid_override_connector_update(struct drm_connector *connector)
 {
 	struct edid *override;
 	int num_modes = 0;
@@ -2254,7 +2254,7 @@ int drm_add_override_edid_modes(struct drm_connector *connector)
 
 	return num_modes;
 }
-EXPORT_SYMBOL(drm_add_override_edid_modes);
+EXPORT_SYMBOL(drm_edid_override_connector_update);
 
 typedef int read_block_fn(void *context, u8 *buf, unsigned int block, size_t len);
 
drivers/gpu/drm/drm_probe_helper.c +1 -1
index 69b0b2b9cc1c..2fc21df709bc 100644
@@ -367,7 +367,7 @@ static int drm_helper_probe_get_modes(struct drm_connector *connector)
 	 * override/firmware EDID.
 	 */
 	if (count == 0 && connector->status == connector_status_connected)
-		count = drm_add_override_edid_modes(connector);
+		count = drm_edid_override_connector_update(connector);
 
 	return count;
 }
include/drm/drm_edid.h +1 -1
index 429735b91f63..05380681a4fb 100644
@@ -577,7 +577,7 @@ struct edid *drm_get_edid_switcheroo(struct drm_connector *connector,
 				     struct i2c_adapter *adapter);
 struct edid *drm_edid_duplicate(const struct edid *edid);
 int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid);
-int drm_add_override_edid_modes(struct drm_connector *connector);
+int drm_edid_override_connector_update(struct drm_connector *connector);
 
 u8 drm_match_cea_mode(const struct drm_display_mode *to_match);
 bool drm_detect_hdmi_monitor(const struct edid *edid);
Signature · 1 line
2.34.1
Signature · 2 lines
Ville Syrjälä
Intel
#26 lore raw

Re: [PATCH 09/15] drm/edid: detach debugfs EDID override from EDID property update

In reply to Jani Nikula
Quoted 57 lines · Jani Nikula

Having the EDID override debugfs directly update the EDID property is problematic. The update is partial only. The driver has no way of knowing it's been updated. Mode list is not updated. It's an inconsistent state.

Detach debugfs EDID override from the property update completely. Only set and reset a separate override EDID copy from debugfs, and have it take effect only at detect (via EDID read). The copy is at connector->edid_override.

This also brings override EDID closer to firmware EDID in behaviour.

Add validation of the override EDID which we completely lacked.

Note that IGT already forces a detect whenever tests update the override EDID.

---
 drivers/gpu/drm/drm_edid.c  | 56 ++++++++++++-------------------------
 include/drm/drm_connector.h | 11 +++++---
 2 files changed, 25 insertions(+), 42 deletions(-)
drivers/gpu/drm/drm_edid.c +5 -6
index c3cf942186b7..0f2898badd51 100644
@@ -2207,8 +2207,8 @@ static struct edid *drm_get_override_edid(struct drm_connector *connector,
 {
 	struct edid *override = NULL;
 
-	if (connector->override_edid)
-		override = drm_edid_duplicate(connector->edid_blob_ptr->data);
+	if (connector->edid_override)
+		override = drm_edid_duplicate(connector->edid_override->edid);
 
 	if (!override)
 		override = drm_load_edid_firmware(connector);
@@ -2223,10 +2223,10 @@ static struct edid *drm_get_override_edid(struct drm_connector *connector,
 /* For debugfs edid_override implementation */
 int drm_edid_override_show(struct drm_connector *connector, struct seq_file *m)
 {
-	struct drm_property_blob *edid = connector->edid_blob_ptr;
+	const struct drm_edid *drm_edid = connector->edid_override;
 
-	if (connector->override_edid && edid)
-		seq_write(m, edid->data, edid->length);
+	if (drm_edid)
+		seq_write(m, drm_edid->edid, drm_edid->size);
 
 	return 0;
 }
@@ -2235,32 +2235,33 @@ int drm_edid_override_show(struct drm_connector *connector, struct seq_file *m)
 int drm_edid_override_set(struct drm_connector *connector, const void *edid,
 			  size_t size)
 {
-	int ret;

drivers/gpu/drm/drm_edid.c int drm_edid_override_show(struct drm_connector *connector, struct seq_file *m) · line 2246

Quoted 10 lines
drivers/gpu/drm/drm_edid.c +7 -1
+	drm_edid_free(connector->edid_override);
 
-	if (size < EDID_LENGTH || edid_size(edid) > size)
+	connector->edid_override = drm_edid_alloc(edid, size);
+	if (!drm_edid_valid(connector->edid_override)) {
+		drm_dbg_kms(connector->dev, "[CONNECTOR:%d:%s] EDID override invalid\n",
+			    connector->base.id, connector->name);
+		drm_edid_free(connector->edid_override);
+		connector->edid_override = NULL;
 		return -EINVAL;

Hmm. Should we perhaps invest in some locking around these parts?

Quoted 92 lines
drivers/gpu/drm/drm_edid.c +6 -31
-
-	connector->override_edid = false;
+	}
 
 	drm_dbg_kms(connector->dev, "[CONNECTOR:%d:%s] EDID override set\n",
 		    connector->base.id, connector->name);
 
-	ret = drm_connector_update_edid_property(connector, edid);
-	if (!ret)
-		connector->override_edid = true;
-
-	return ret;
+	return 0;
 }
 
 /* For debugfs edid_override implementation */
 int drm_edid_override_reset(struct drm_connector *connector)
 {
-	connector->override_edid = false;
-
 	drm_dbg_kms(connector->dev, "[CONNECTOR:%d:%s] EDID override reset\n",
 		    connector->base.id, connector->name);
 
-	return drm_connector_update_edid_property(connector, NULL);
+	drm_edid_free(connector->edid_override);
+	connector->edid_override = NULL;
+
+	return 0;
 }
 
 /**
@@ -6634,23 +6635,6 @@ int drm_edid_connector_update(struct drm_connector *connector,
 {
 	int count;
 
-	/*
-	 * FIXME: Reconcile the differences in override_edid handling between
-	 * this and drm_connector_update_edid_property().
-	 *
-	 * If override_edid is set, and the EDID passed in here originates from
-	 * drm_edid_read() and friends, it will be the override EDID, and there
-	 * are no issues. drm_connector_update_edid_property() ignoring requests
-	 * to set the EDID dates back to a time when override EDID was not
-	 * handled at the low level EDID read.
-	 *
-	 * The only way the EDID passed in here can be different from the
-	 * override EDID is when a driver passes in an EDID that does *not*
-	 * originate from drm_edid_read() and friends, or passes in a stale
-	 * cached version. This, in turn, is a question of when an override EDID
-	 * set via debugfs should take effect.
-	 */
-
 	count = _drm_edid_connector_update(connector, drm_edid);
 
 	_drm_update_tile_info(connector, drm_edid);
@@ -6665,10 +6649,6 @@ EXPORT_SYMBOL(drm_edid_connector_update);
 static int _drm_connector_update_edid_property(struct drm_connector *connector,
 					       const struct drm_edid *drm_edid)
 {
-	/* ignore requests to set edid when overridden */
-	if (connector->override_edid)
-		return 0;
-
 	/*
 	 * Set the display info, using edid if available, otherwise resetting
 	 * the values to defaults. This duplicates the work done in
include/drm/drm_connector.h +7 -4
index b1b2df48d42c..09a7d7f23e4a 100644
@@ -1550,12 +1550,15 @@ struct drm_connector {
 	struct drm_cmdline_mode cmdline_mode;
 	/** @force: a DRM_FORCE_<foo> state for forced mode sets */
 	enum drm_connector_force force;
+
 	/**
-	 * @override_edid: has the EDID been overwritten through debugfs for
-	 * testing? Do not modify outside of drm_edid_override_set() and
-	 * drm_edid_override_reset().
+	 * @edid_override: Override EDID set via debugfs.
+	 *
+	 * Do not modify or access outside of the drm_edid_override_* family of
+	 * functions.
 	 */
-	bool override_edid;
+	const struct drm_edid *edid_override;
+
 	/** @epoch_counter: used to detect any other changes in connector, besides status */
 	u64 epoch_counter;
 
Signature · 1 line
2.34.1
Signature · 2 lines
Ville Syrjälä
Intel
Reviewed-by on v1 11/15
#30 lore raw

Re: [PATCH 11/15] drm/edid/firmware: rename drm_load_edid_firmware() to drm_edid_load_firmware()

In reply to Jani Nikula
Quoted 3 lines · Jani Nikula

Follow the usual naming convention by file name.

Quoted 89 lines
---
 drivers/gpu/drm/drm_edid.c      | 10 +++++-----
 drivers/gpu/drm/drm_edid_load.c |  2 +-
 include/drm/drm_edid.h          |  4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/drm_edid.c +5 -5
index 0f2898badd51..2c66a901474d 100644
@@ -2211,7 +2211,7 @@ static struct edid *drm_get_override_edid(struct drm_connector *connector,
 		override = drm_edid_duplicate(connector->edid_override->edid);
 
 	if (!override)
-		override = drm_load_edid_firmware(connector);
+		override = drm_edid_load_firmware(connector);
 
 	/* FIXME: Get alloc size from deeper down the stack */
 	if (!IS_ERR_OR_NULL(override) && alloc_size)
@@ -2443,7 +2443,7 @@ static struct edid *_drm_do_get_edid(struct drm_connector *connector,
  * adapter and use drm_get_edid() instead of abusing this function.
  *
  * The EDID may be overridden using debugfs override_edid or firmware EDID
- * (drm_load_edid_firmware() and drm.edid_firmware parameter), in this priority
+ * (drm_edid_load_firmware() and drm.edid_firmware parameter), in this priority
  * order. Having either of them bypasses actual EDID reads.
  *
  * Return: Pointer to valid EDID or NULL if we couldn't find any.
@@ -2621,7 +2621,7 @@ EXPORT_SYMBOL(drm_get_edid);
  * this function.
  *
  * The EDID may be overridden using debugfs override_edid or firmware EDID
- * (drm_load_edid_firmware() and drm.edid_firmware parameter), in this priority
+ * (drm_edid_load_firmware() and drm.edid_firmware parameter), in this priority
  * order. Having either of them bypasses actual EDID reads.
  *
  * The returned pointer must be freed using drm_edid_free().
@@ -2659,7 +2659,7 @@ EXPORT_SYMBOL(drm_edid_read_custom);
  * Read EDID using the given I2C adapter.
  *
  * The EDID may be overridden using debugfs override_edid or firmware EDID
- * (drm_load_edid_firmware() and drm.edid_firmware parameter), in this priority
+ * (drm_edid_load_firmware() and drm.edid_firmware parameter), in this priority
  * order. Having either of them bypasses actual EDID reads.
  *
  * Prefer initializing connector->ddc with drm_connector_init_with_ddc() and
@@ -2695,7 +2695,7 @@ EXPORT_SYMBOL(drm_edid_read_ddc);
  * Read EDID using the connector's I2C adapter.
  *
  * The EDID may be overridden using debugfs override_edid or firmware EDID
- * (drm_load_edid_firmware() and drm.edid_firmware parameter), in this priority
+ * (drm_edid_load_firmware() and drm.edid_firmware parameter), in this priority
  * order. Having either of them bypasses actual EDID reads.
  *
  * The returned pointer must be freed using drm_edid_free().
drivers/gpu/drm/drm_edid_load.c +1 -1
index 13cdbfb991eb..bc6b96abd1b3 100644
@@ -262,7 +262,7 @@ static void *edid_load(struct drm_connector *connector, const char *name)
 	return edid;
 }
 
-struct edid *drm_load_edid_firmware(struct drm_connector *connector)
+struct edid *drm_edid_load_firmware(struct drm_connector *connector)
 {
 	char *edidname, *last, *colon, *fwstr, *edidstr, *fallback = NULL;
 	struct edid *edid;
include/drm/drm_edid.h +2 -2
index a2e25e7e6ee5..dc7467d25cd8 100644
@@ -388,12 +388,12 @@ int drm_av_sync_delay(struct drm_connector *connector,
 		      const struct drm_display_mode *mode);
 
 #ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE
-struct edid *drm_load_edid_firmware(struct drm_connector *connector);
+struct edid *drm_edid_load_firmware(struct drm_connector *connector);
 int __drm_set_edid_firmware_path(const char *path);
 int __drm_get_edid_firmware_path(char *buf, size_t bufsize);
 #else
 static inline struct edid *
-drm_load_edid_firmware(struct drm_connector *connector)
+drm_edid_load_firmware(struct drm_connector *connector)
 {
 	return ERR_PTR(-ENOENT);
 }
Signature · 1 line
2.34.1
Signature · 2 lines
Ville Syrjälä
Intel
Reviewed-by on v1 13/15
#34 lore raw

Re: [PATCH 13/15] drm/edid: move edid load declarations to internal header

In reply to Jani Nikula
Quoted 3 lines · Jani Nikula

The EDID loader is internal to drm, not for drivers.

Quoted 67 lines
---
 drivers/gpu/drm/drm_crtc_internal.h | 11 +++++++++++
 drivers/gpu/drm/drm_edid_load.c     |  5 +++--
 include/drm/drm_edid.h              |  7 -------
 3 files changed, 14 insertions(+), 9 deletions(-)
drivers/gpu/drm/drm_crtc_internal.h +11 -0
index fb8a68d90940..501a10edd0e1 100644
@@ -290,3 +290,14 @@ void drm_mode_fixup_1366x768(struct drm_display_mode *mode);
 int drm_edid_override_show(struct drm_connector *connector, struct seq_file *m);
 int drm_edid_override_set(struct drm_connector *connector, const void *edid, size_t size);
 int drm_edid_override_reset(struct drm_connector *connector);
+
+/* drm_edid_load.c */
+#ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE
+const struct drm_edid *drm_edid_load_firmware(struct drm_connector *connector);
+#else
+static inline const struct drm_edid *
+drm_edid_load_firmware(struct drm_connector *connector)
+{
+	return ERR_PTR(-ENOENT);
+}
+#endif
drivers/gpu/drm/drm_edid_load.c +3 -2
index 248f0685c33e..882caaa6e663 100644
@@ -11,12 +11,13 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 
-#include <drm/drm_crtc.h>
-#include <drm/drm_crtc_helper.h>
+#include <drm/drm_connector.h>
 #include <drm/drm_drv.h>
 #include <drm/drm_edid.h>
 #include <drm/drm_print.h>
 
+#include "drm_crtc_internal.h"
+
 static char edid_firmware[PATH_MAX];
 module_param_string(edid_firmware, edid_firmware, sizeof(edid_firmware), 0644);
 MODULE_PARM_DESC(edid_firmware, "Do not probe monitor, use specified EDID blob "
include/drm/drm_edid.h +0 -7
index 8138613f4e4e..372963600f1d 100644
@@ -388,15 +388,8 @@ int drm_av_sync_delay(struct drm_connector *connector,
 		      const struct drm_display_mode *mode);
 
 #ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE
-const struct drm_edid *drm_edid_load_firmware(struct drm_connector *connector);
 int __drm_set_edid_firmware_path(const char *path);
 int __drm_get_edid_firmware_path(char *buf, size_t bufsize);
-#else
-static inline const struct drm_edid *
-drm_edid_load_firmware(struct drm_connector *connector)
-{
-	return ERR_PTR(-ENOENT);
-}
 #endif
 
 bool drm_edid_are_equal(const struct edid *edid1, const struct edid *edid2);
Signature · 1 line
2.34.1
Signature · 2 lines
Ville Syrjälä
Intel
#36 lore raw

Re: [PATCH 14/15] drm/edid/firmware: convert to drm device specific logging

In reply to Jani Nikula
Quoted 12 lines · Jani Nikula

Conform to device specific logging.

---
 drivers/gpu/drm/drm_edid_load.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_edid_load.c +0 -0
index 882caaa6e663..dd472c66cb3c 100644

drivers/gpu/drm/drm_edid_load.c static const struct drm_edid *edid_load(struct drm_connector *connector, const c · line 182

Quoted 8 lines
drivers/gpu/drm/drm_edid_load.c +3 -2
@@ -177,16 +177,18 @@ static const struct drm_edid *edid_load(struct drm_connector *connector, const c
 
 		pdev = platform_device_register_simple(connector->name, -1, NULL, 0);
 		if (IS_ERR(pdev)) {
-			DRM_ERROR("Failed to register EDID firmware platform device "
-				  "for connector \"%s\"\n", connector->name);
+			drm_err(connector->dev,
+				"Failed to register EDID firmware platform device for connector \"%s\"\n",
+				connector->name);

Can go for the full [CONNECTOR:...] thing?

Quoted 16 lines
drivers/gpu/drm/drm_edid_load.c +3 -2
 			return ERR_CAST(pdev);
 		}
 
 		err = request_firmware(&fw, name, &pdev->dev);
 		platform_device_unregister(pdev);
 		if (err) {
-			DRM_ERROR("Requesting EDID firmware \"%s\" failed (err=%d)\n",
-				  name, err);
+			drm_err(connector->dev,
+				"Requesting EDID firmware \"%s\" failed (err=%d)\n",
+				name, err);
 			return ERR_PTR(err);
 		}
 
Signature · 1 line
2.34.1
Signature · 2 lines
Ville Syrjälä
Intel
#38 lore raw

Re: [PATCH 15/15] drm/edid: convert to device specific logging

In reply to Jani Nikula
Quoted 55 lines · Jani Nikula

Convert to drm_kms_dbg/drm_err where possible, and unify the rest of the debugs to DRM_DEBUG_KMS.

---
 drivers/gpu/drm/drm_edid.c | 105 ++++++++++++++++++-------------------
 1 file changed, 50 insertions(+), 55 deletions(-)
drivers/gpu/drm/drm_edid.c +7 -7
index 935bdf4e6269..09b0b8337382 100644
@@ -1979,7 +1979,7 @@ bool drm_edid_block_valid(u8 *_block, int block_num, bool print_bad_edid,
 
 	status = edid_block_check(block, is_base_block);
 	if (status == EDID_BLOCK_HEADER_REPAIR) {
-		DRM_DEBUG("Fixing EDID header, your hardware may be failing\n");
+		DRM_DEBUG_KMS("Fixing EDID header, your hardware may be failing\n");
 		edid_header_fix(block);
 
 		/* Retry with fixed header, update status if that worked. */
@@ -2281,8 +2281,9 @@ int drm_edid_override_connector_update(struct drm_connector *connector)
 
 		drm_edid_free(override);
 
-		DRM_DEBUG_KMS("[CONNECTOR:%d:%s] adding %d modes via fallback override/firmware EDID\n",
-			      connector->base.id, connector->name, num_modes);
+		drm_dbg_kms(connector->dev,
+			    "[CONNECTOR:%d:%s] adding %d modes via fallback override/firmware EDID\n",
+			    connector->base.id, connector->name, num_modes);
 	}
 
 	return num_modes;
@@ -3389,17 +3390,16 @@ static struct drm_display_mode *drm_mode_detailed(struct drm_device *dev,
 		return NULL;
 
 	if (pt->misc & DRM_EDID_PT_STEREO) {
-		DRM_DEBUG_KMS("stereo mode not supported\n");
+		drm_dbg_kms(dev, "Stereo mode not supported\n");
 		return NULL;
 	}
 	if (!(pt->misc & DRM_EDID_PT_SEPARATE_SYNC)) {
-		DRM_DEBUG_KMS("composite sync not supported\n");
+		drm_dbg_kms(dev, "Composite sync not supported\n");
 	}
 
 	/* it is incorrect if hsync/vsync width is zero */
 	if (!hsync_pulse_width || !vsync_pulse_width) {
-		DRM_DEBUG_KMS("Incorrect Detailed timing. "
-				"Wrong Hsync/Vsync pulse width\n");
+		drm_dbg_kms(dev, "Incorrect Detailed timing. Wrong Hsync/Vsync pulse width\n");
 		return NULL;
 	}
 

drivers/gpu/drm/drm_edid.c static int add_hdmi_mode(struct drm_connector *connector, u8 vic) · line 4646

Quoted 5 lines
drivers/gpu/drm/drm_edid.c +1 -1
@@ -4643,7 +4643,7 @@ static int add_hdmi_mode(struct drm_connector *connector, u8 vic)
 	struct drm_display_mode *newmode;
 
 	if (!drm_valid_hdmi_vic(vic)) {
-		DRM_ERROR("Unknown HDMI VIC: %d\n", vic);
+		drm_err(connector->dev, "Unknown HDMI VIC: %d\n", vic);

Quit a lot of these could also do the full [CONNECTOR:...] thing it seems.

Signature · 2 lines
Ville Syrjälä
Intel
#7 lore raw

Re: [Intel-gfx] [PATCH 01/15] drm/i915/hdmi: do dual mode detect only if connected

In reply to Ville Syrjälä
Quoted 27 lines · Ville Syrjälä
Quoted 19 lines · Ville Syrjälä
Quoted 11 lines · Ville Syrjälä

drivers/gpu/drm/i915/display/intel_hdmi.c intel_hdmi_set_edid(struct drm_connector *connector) · line 2436

Quoted 6 lines · Jani Nikula
drivers/gpu/drm/i915/display/intel_hdmi.c +0 -4
-	intel_hdmi_dp_dual_mode_detect(connector, edid != NULL);
-
-	intel_display_power_put(dev_priv, POWER_DOMAIN_GMBUS, wakeref);
-
 	to_intel_connector(connector)->detect_edid = edid;
 	if (edid && edid->input & DRM_EDID_INPUT_DIGITAL) {

We didn't have this digital input thing before. What happens with HDMI->VGA dongles for example?

Quoted 3 lines

Hmm. This whole thing might already be broken on those. I suspect I've only used my HDMI->VGA dongle on LSPCON machines, so never noticed this. Need to go plug that thing into a native HDMI port...

Except I must have left it elsewhere since I can't find it here. So can't test right now unfortunately.

Quoted 6 lines

I first thought this digital check thing might be due to the DVI-I shenanigans in intel_crt_detect_ddc(), but that was added for am unspecified gen2 machine in commit f5afcd3dd0dc ("drm/i915/crt: Check for a analog monitor in case of DVI-I") so not even relevant here. And I don't think I've ever seen a g4x+ machine with an actual DVI-I port.

Quoted 6 lines

Good news everyone, I found such a board: Intel DG43GT. Well, I didn't physically find one but I found the manual online. And some coreboot repo even had the vbt handily available. And yes, it does show the same DDC pins being used for the DVI-D port and CRT port. So I guess given that these digital checks do make some sense.

So what's the conclusion wrt the patch at hand?

BR,
Jani.

Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Reviewed-by
#8 lore raw

Re: [Intel-gfx] [PATCH 01/15] drm/i915/hdmi: do dual mode detect only if connected

Quoted 28 lines · Jani Nikula
Quoted 27 lines · Ville Syrjälä
Quoted 25 lines · Ville Syrjälä
Quoted 11 lines · Ville Syrjälä

drivers/gpu/drm/i915/display/intel_hdmi.c intel_hdmi_set_edid(struct drm_connector *connector) · line 2436

Quoted 6 lines · Jani Nikula
drivers/gpu/drm/i915/display/intel_hdmi.c +0 -4
-	intel_hdmi_dp_dual_mode_detect(connector, edid != NULL);
-
-	intel_display_power_put(dev_priv, POWER_DOMAIN_GMBUS, wakeref);
-
 	to_intel_connector(connector)->detect_edid = edid;
 	if (edid && edid->input & DRM_EDID_INPUT_DIGITAL) {

We didn't have this digital input thing before. What happens with HDMI->VGA dongles for example?

Quoted 3 lines

Hmm. This whole thing might already be broken on those. I suspect I've only used my HDMI->VGA dongle on LSPCON machines, so never noticed this. Need to go plug that thing into a native HDMI port...

Except I must have left it elsewhere since I can't find it here. So can't test right now unfortunately.

I first thought this digital check thing might be due to the DVI-I shenanigans in intel_crt_detect_ddc(), but that was added for am unspecified gen2 machine in commit f5afcd3dd0dc ("drm/i915/crt: Check for a analog monitor in case of DVI-I") so not even relevant here. And I don't think I've ever seen a g4x+ machine with an actual DVI-I port.

Quoted 8 lines
Quoted 6 lines

Good news everyone, I found such a board: Intel DG43GT. Well, I didn't physically find one but I found the manual online. And some coreboot repo even had the vbt handily available. And yes, it does show the same DDC pins being used for the DVI-D port and CRT port. So I guess given that these digital checks do make some sense.

So what's the conclusion wrt the patch at hand?

Seems fine as is for the moment. We'll know more once I locate my dongle again.

Signature · 2 lines
Ville Syrjälä
Intel