Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] drm/i915: Implement DisplayID based VBT panel type detection
@ 2026-12-01 18:14 Ville Syrjala
  2026-12-01 18:14 ` [PATCH v2 1/5] drm/edid: Introduce drm_edid_get_displayid_product_id() Ville Syrjala
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Ville Syrjala @ 2026-12-01 18:14 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx, intel-xe

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

On some new systems we apparently have to use the
the DisplayID product ID block rather than the EDID
base block to find the correct panel entry in the VBT.
Implement that.

v2: Call it drm_edid_get_displayid_product_id()
    Return errno from the get_product_id() functions
    Also skip bogus EDID product IDs
    Do one is_panel_type_valid_or_pnp() conversion while at it

Ville Syrjälä (5):
  drm/edid: Introduce drm_edid_get_displayid_product_id()
  drm/i915/bios: Attempt to match the VBT PnP ID against DisplayID first
  drm/edid: Have drm_edid_get_product_id() tell us if it found something
  drm/i915/bios: Skip VBT PnP ID match if there is no EDID product ID
  drm/i915/bios: Use is_panel_type_valid_or_pnp() for the sanity check

 drivers/gpu/drm/drm_displayid_internal.h  | 11 +++
 drivers/gpu/drm/drm_edid.c                | 73 +++++++++++++++++--
 drivers/gpu/drm/i915/display/intel_bios.c | 87 +++++++++++++++++------
 include/drm/drm_edid.h                    | 14 +++-
 4 files changed, 158 insertions(+), 27 deletions(-)

-- 
2.56.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2 1/5] drm/edid: Introduce drm_edid_get_displayid_product_id()
  2026-12-01 18:14 [PATCH v2 0/5] drm/i915: Implement DisplayID based VBT panel type detection Ville Syrjala
@ 2026-12-01 18:14 ` Ville Syrjala
  2026-12-02  9:48   ` Jani Nikula
  2026-12-01 18:14 ` [PATCH v2 2/5] drm/i915/bios: Attempt to match the VBT PnP ID against DisplayID first Ville Syrjala
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Ville Syrjala @ 2026-12-01 18:14 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx, intel-xe, Jani Nikula

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Add drm_edid_get_displayid_product_id() as the DisplayID based
counterpart to the already existing EDID base block based
drm_edid_get_product_id().

In DisplayID the information is stored in the "Product ID"
block (0x00 or 0x20). The layout is slightly different to the
EDID one as the vendor ID is a three byte OUI isntead of
the compressed ASCII EISA/PNPID of EDID. The "year of
manufacture" is now relative to the year 2000, as opposed
to 1990 for EDID.

There is also a product ID string, but I decided to leave that
out from the user visible struct because the variable length
would just complicate things.

v2: Call it drm_edid_get_displayid_product_id() (Jani)
    Return an error to indicate what happened (Jani)

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_displayid_internal.h | 11 +++++
 drivers/gpu/drm/drm_edid.c               | 56 ++++++++++++++++++++++++
 include/drm/drm_edid.h                   | 10 +++++
 3 files changed, 77 insertions(+)

diff --git a/drivers/gpu/drm/drm_displayid_internal.h b/drivers/gpu/drm/drm_displayid_internal.h
index ef7e6c9bd4db..2177c19cae4c 100644
--- a/drivers/gpu/drm/drm_displayid_internal.h
+++ b/drivers/gpu/drm/drm_displayid_internal.h
@@ -103,6 +103,17 @@ struct displayid_block {
 	u8 num_bytes;
 } __packed;
 
+struct displayid_product_id_block {
+	struct displayid_block base;
+	u8 vendor_id[3];
+	__le16 product_code;
+	__le32 serial_number;
+	u8 week_of_manufacture;
+	u8 year_of_manufacture;
+	u8 size_of_product_id_string;
+	u8 product_id_string[];
+} __packed;
+
 struct displayid_tiled_block {
 	struct displayid_block base;
 	u8 tile_cap;
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index b8f882a17c8f..8faec57f70d1 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -2791,6 +2791,62 @@ void drm_edid_get_product_id(const struct drm_edid *drm_edid,
 }
 EXPORT_SYMBOL(drm_edid_get_product_id);
 
+static bool displayid_is_product_id_block(const struct displayid_iter *iter,
+					  const struct displayid_block *block)
+{
+	return (displayid_version(iter) < DISPLAY_ID_STRUCTURE_VER_20 &&
+		block->tag == DATA_BLOCK_PRODUCT_ID) ||
+		(displayid_version(iter) == DISPLAY_ID_STRUCTURE_VER_20 &&
+		 block->tag == DATA_BLOCK_2_PRODUCT_ID);
+}
+
+/**
+ * drm_edid_get_displayid_product_id - Get the vendor and product identification from DisplayID
+ * @drm_edid: EDID
+ * @id: Where to place the product id
+ *
+ * Return: Zero on success, or a negative errno code otherwise.
+ */
+int drm_edid_get_displayid_product_id(const struct drm_edid *drm_edid,
+				      struct drm_displayid_product_id *id)
+{
+	const struct displayid_block *block;
+	struct displayid_iter iter;
+	int ret = -ENOENT;
+
+	memset(id, 0, sizeof(*id));
+
+	if (!drm_edid)
+		return -EINVAL;
+
+	displayid_iter_edid_begin(drm_edid, &iter);
+	displayid_iter_for_each(block, &iter) {
+		const struct displayid_product_id_block *prod_id =
+			(struct displayid_product_id_block *)block;
+
+		if (!displayid_is_product_id_block(&iter, block))
+			continue;
+
+		if (block->num_bytes < sizeof(*prod_id) - sizeof(prod_id->base))
+			continue;
+
+		id->vendor_id[0] = prod_id->vendor_id[0];
+		id->vendor_id[1] = prod_id->vendor_id[1];
+		id->vendor_id[2] = prod_id->vendor_id[2];
+		id->product_code = prod_id->product_code;
+		id->serial_number = prod_id->serial_number;
+		id->week_of_manufacture = prod_id->week_of_manufacture;
+		id->year_of_manufacture = prod_id->year_of_manufacture;
+
+		ret = 0;
+		break;
+	}
+	displayid_iter_end(&iter);
+
+	return ret;
+}
+EXPORT_SYMBOL(drm_edid_get_displayid_product_id);
+
 static void decode_date(struct seq_buf *s, const struct drm_edid_product_id *id)
 {
 	int week = id->week_of_manufacture;
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index a2617aa34edf..a4e5366b53ad 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -288,6 +288,14 @@ struct drm_edid_product_id {
 	u8 year_of_manufacture;
 } __packed;
 
+struct drm_displayid_product_id {
+	u8 vendor_id[3];
+	__le16 product_code;
+	__le32 serial_number;
+	u8 week_of_manufacture;
+	u8 year_of_manufacture;
+} __packed;
+
 struct edid {
 	u8 header[8];
 	/* Vendor & product info */
@@ -484,6 +492,8 @@ int drm_edid_connector_add_modes(struct drm_connector *connector);
 bool drm_edid_is_digital(const struct drm_edid *drm_edid);
 void drm_edid_get_product_id(const struct drm_edid *drm_edid,
 			     struct drm_edid_product_id *id);
+int drm_edid_get_displayid_product_id(const struct drm_edid *drm_edid,
+				      struct drm_displayid_product_id *id);
 void drm_edid_print_product_id(struct drm_printer *p,
 			       const struct drm_edid_product_id *id, bool raw);
 u32 drm_edid_get_panel_id(const struct drm_edid *drm_edid);
-- 
2.56.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 2/5] drm/i915/bios: Attempt to match the VBT PnP ID against DisplayID first
  2026-12-01 18:14 [PATCH v2 0/5] drm/i915: Implement DisplayID based VBT panel type detection Ville Syrjala
  2026-12-01 18:14 ` [PATCH v2 1/5] drm/edid: Introduce drm_edid_get_displayid_product_id() Ville Syrjala
@ 2026-12-01 18:14 ` Ville Syrjala
  2026-12-01 18:14 ` [PATCH v2 3/5] drm/edid: Have drm_edid_get_product_id() tell us if it found something Ville Syrjala
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Ville Syrjala @ 2026-12-01 18:14 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx, intel-xe, Jani Nikula

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The Windows driver policy appears to be now to first match the
VBT PnP ID against the DisplayID product ID block, and only if
there is no match (not even a partial one) then attempt to
match the against the EDID base block vendor/product ID.
Implement the same policy.

We also need to implement the same weird scheme of just smashing
the first two bytes of the DisplayID three byte OUI into the
old EISA/PNPID field of the EDID defined structure. That is
then matched against the similar old EDID style structures in
the VBT.

Smoke tested with a firmware override of EDID and VBT:
 [drm:get_panel_type [xe]] Panel type (VBT): 255
 [drm:pnpid_get_panel_type [xe]] DisplayID manufacturer name: NRA, product code: 16826, serial number: 0, year of manufacture: 2014
 [drm:pnpid_get_panel_type [xe]] DisplayID raw product id: ba 41 ba 41 00 00 00 00 00 18
 [drm:get_panel_type [xe]] Panel type (PNPID DisplayID): 3
 [drm:pnpid_get_panel_type [xe]] EDID manufacturer name: SDC, product code: 16826, serial number: 65441, year of manufacture: 2024
 [drm:pnpid_get_panel_type [xe]] EDID raw product id: 4c 83 ba 41 a1 ff 00 00 00 22
 [drm:get_panel_type [xe]] Panel type (fallback): 0
 [drm:get_panel_type [xe]] Selected panel type (PNPID DisplayID): 3

v2: Skip if there is no DisplayID product ID
    Document why the debug print is somewhat nonsensical (Jani)

Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/8969
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_bios.c | 85 ++++++++++++++++++-----
 1 file changed, 67 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index b77d1599482a..70da8613c8bf 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -684,27 +684,28 @@ static int vbt_get_panel_type(struct intel_display *display,
 }
 
 static int pnpid_get_panel_type(struct intel_display *display,
-				const struct intel_bios_encoder_data *devdata,
-				const struct drm_edid *drm_edid, bool use_fallback)
+				const struct drm_edid_product_id *product_id,
+				const char *source)
 {
 	const struct bdb_lfp_data *data;
 	const struct bdb_lfp_data_ptrs *ptrs;
-	struct drm_edid_product_id product_id, product_id_nodate;
+	struct drm_edid_product_id product_id_nodate;
 	struct drm_printer p;
 	int i, best = -1;
 
-	if (!drm_edid)
-		return -1;
+	/*
+	 * Note that the printed product ID is somewhat nonsensical
+	 * for the DisplayID case (OUI is mangled and date is offset
+	 * incorrectly), but since the VBT also contains similarly
+	 * nonsensical data we do want to print it as is.
+	 */
+	p = drm_dbg_printer(display->drm, DRM_UT_KMS, source);
+	drm_edid_print_product_id(&p, product_id, true);
 
-	drm_edid_get_product_id(drm_edid, &product_id);
-
-	product_id_nodate = product_id;
+	product_id_nodate = *product_id;
 	product_id_nodate.week_of_manufacture = 0;
 	product_id_nodate.year_of_manufacture = 0;
 
-	p = drm_dbg_printer(display->drm, DRM_UT_KMS, "EDID");
-	drm_edid_print_product_id(&p, &product_id, true);
-
 	ptrs = bdb_find_section(display, BDB_LFP_DATA_PTRS);
 	if (!ptrs)
 		return -1;
@@ -718,7 +719,7 @@ static int pnpid_get_panel_type(struct intel_display *display,
 			get_lfp_pnp_id(data, ptrs, i);
 
 		/* full match? */
-		if (!memcmp(vbt_id, &product_id, sizeof(*vbt_id)))
+		if (!memcmp(vbt_id, product_id, sizeof(*vbt_id)))
 			return i;
 
 		/*
@@ -733,6 +734,46 @@ static int pnpid_get_panel_type(struct intel_display *display,
 	return best;
 }
 
+static int pnpid_edid_get_panel_type(struct intel_display *display,
+				     const struct intel_bios_encoder_data *devdata,
+				     const struct drm_edid *drm_edid, bool use_fallback)
+{
+	struct drm_edid_product_id product_id;
+
+	if (!drm_edid)
+		return -1;
+
+	drm_edid_get_product_id(drm_edid, &product_id);
+
+	return pnpid_get_panel_type(display, &product_id, "EDID");
+}
+
+static int pnpid_displayid_get_panel_type(struct intel_display *display,
+					  const struct intel_bios_encoder_data *devdata,
+					  const struct drm_edid *drm_edid, bool use_fallback)
+{
+	struct drm_displayid_product_id displayid_id;
+	struct drm_edid_product_id product_id;
+
+	if (drm_edid_get_displayid_product_id(drm_edid, &displayid_id))
+		return -1;
+
+	/*
+	 * Only the first two bytes of the OUI get
+	 * smashed into the old EISA/PNPID field, and
+	 * that gets matched against what's in the VBT.
+	 */
+	product_id.manufacturer_name =
+		cpu_to_be16((displayid_id.vendor_id[0] << 8) |
+			    displayid_id.vendor_id[1]);
+	product_id.product_code = displayid_id.product_code;
+	product_id.serial_number = displayid_id.serial_number;
+	product_id.week_of_manufacture = displayid_id.week_of_manufacture;
+	product_id.year_of_manufacture = displayid_id.year_of_manufacture;
+
+	return pnpid_get_panel_type(display, &product_id, "DisplayID");
+}
+
 static int fallback_get_panel_type(struct intel_display *display,
 				   const struct intel_bios_encoder_data *devdata,
 				   const struct drm_edid *drm_edid, bool use_fallback)
@@ -743,7 +784,8 @@ static int fallback_get_panel_type(struct intel_display *display,
 enum panel_type {
 	PANEL_TYPE_OPREGION,
 	PANEL_TYPE_VBT,
-	PANEL_TYPE_PNPID,
+	PANEL_TYPE_PNPID_DISPLAYID,
+	PANEL_TYPE_PNPID_EDID,
 	PANEL_TYPE_FALLBACK,
 };
 
@@ -766,9 +808,13 @@ static int get_panel_type(struct intel_display *display,
 			.name = "VBT",
 			.get_panel_type = vbt_get_panel_type,
 		},
-		[PANEL_TYPE_PNPID] = {
-			.name = "PNPID",
-			.get_panel_type = pnpid_get_panel_type,
+		[PANEL_TYPE_PNPID_DISPLAYID] = {
+			.name = "PNPID DisplayID",
+			.get_panel_type = pnpid_displayid_get_panel_type,
+		},
+		[PANEL_TYPE_PNPID_EDID] = {
+			.name = "PNPID EDID",
+			.get_panel_type = pnpid_edid_get_panel_type,
 		},
 		[PANEL_TYPE_FALLBACK] = {
 			.name = "fallback",
@@ -792,8 +838,11 @@ static int get_panel_type(struct intel_display *display,
 	if (is_panel_type_valid(panel_types[PANEL_TYPE_OPREGION].panel_type))
 		i = PANEL_TYPE_OPREGION;
 	else if (is_panel_type_pnp(panel_types[PANEL_TYPE_VBT].panel_type) &&
-		 is_panel_type_valid(panel_types[PANEL_TYPE_PNPID].panel_type))
-		i = PANEL_TYPE_PNPID;
+		 is_panel_type_valid(panel_types[PANEL_TYPE_PNPID_DISPLAYID].panel_type))
+		i = PANEL_TYPE_PNPID_DISPLAYID;
+	else if (is_panel_type_pnp(panel_types[PANEL_TYPE_VBT].panel_type) &&
+		 is_panel_type_valid(panel_types[PANEL_TYPE_PNPID_EDID].panel_type))
+		i = PANEL_TYPE_PNPID_EDID;
 	else if (is_panel_type_valid(panel_types[PANEL_TYPE_VBT].panel_type))
 		i = PANEL_TYPE_VBT;
 	else
-- 
2.56.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 3/5] drm/edid: Have drm_edid_get_product_id() tell us if it found something
  2026-12-01 18:14 [PATCH v2 0/5] drm/i915: Implement DisplayID based VBT panel type detection Ville Syrjala
  2026-12-01 18:14 ` [PATCH v2 1/5] drm/edid: Introduce drm_edid_get_displayid_product_id() Ville Syrjala
  2026-12-01 18:14 ` [PATCH v2 2/5] drm/i915/bios: Attempt to match the VBT PnP ID against DisplayID first Ville Syrjala
@ 2026-12-01 18:14 ` Ville Syrjala
  2026-12-01 19:43   ` Jani Nikula
  2026-12-01 18:14 ` [PATCH v2 4/5] drm/i915/bios: Skip VBT PnP ID match if there is no EDID product ID Ville Syrjala
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Ville Syrjala @ 2026-12-01 18:14 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx, intel-xe

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

If drm_edid_get_product_id() is used on a NULL or bogus
EDID it will just fill the product ID with zeros. Have
it inform the caller what it did by returning an errno,
just like drm_edid_get_displayid_product_id() does.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_edid.c | 17 ++++++++++++-----
 include/drm/drm_edid.h     |  4 ++--
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 8faec57f70d1..51e855d34adc 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -2780,14 +2780,21 @@ EXPORT_SYMBOL(drm_edid_read);
  * drm_edid_get_product_id - Get the vendor and product identification
  * @drm_edid: EDID
  * @id: Where to place the product id
+ *
+ * Return: Zero on success, or a negative errno code otherwise.
  */
-void drm_edid_get_product_id(const struct drm_edid *drm_edid,
-			     struct drm_edid_product_id *id)
+int drm_edid_get_product_id(const struct drm_edid *drm_edid,
+			    struct drm_edid_product_id *id)
 {
-	if (drm_edid && drm_edid->edid && drm_edid->size >= EDID_LENGTH)
+	if (drm_edid && drm_edid->edid && drm_edid->size >= EDID_LENGTH) {
 		memcpy(id, &drm_edid->edid->product_id, sizeof(*id));
-	else
-		memset(id, 0, sizeof(*id));
+
+		return 0;
+	}
+
+	memset(id, 0, sizeof(*id));
+
+	return -EINVAL;
 }
 EXPORT_SYMBOL(drm_edid_get_product_id);
 
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index a4e5366b53ad..b075a8eafd17 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -490,8 +490,8 @@ int drm_edid_connector_update(struct drm_connector *connector,
 			      const struct drm_edid *edid);
 int drm_edid_connector_add_modes(struct drm_connector *connector);
 bool drm_edid_is_digital(const struct drm_edid *drm_edid);
-void drm_edid_get_product_id(const struct drm_edid *drm_edid,
-			     struct drm_edid_product_id *id);
+int drm_edid_get_product_id(const struct drm_edid *drm_edid,
+			    struct drm_edid_product_id *id);
 int drm_edid_get_displayid_product_id(const struct drm_edid *drm_edid,
 				      struct drm_displayid_product_id *id);
 void drm_edid_print_product_id(struct drm_printer *p,
-- 
2.56.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 4/5] drm/i915/bios: Skip VBT PnP ID match if there is no EDID product ID
  2026-12-01 18:14 [PATCH v2 0/5] drm/i915: Implement DisplayID based VBT panel type detection Ville Syrjala
                   ` (2 preceding siblings ...)
  2026-12-01 18:14 ` [PATCH v2 3/5] drm/edid: Have drm_edid_get_product_id() tell us if it found something Ville Syrjala
@ 2026-12-01 18:14 ` Ville Syrjala
  2026-12-01 19:44   ` Jani Nikula
  2026-12-01 18:14 ` [PATCH v2 5/5] drm/i915/bios: Use is_panel_type_valid_or_pnp() for the sanity check Ville Syrjala
  2026-12-01 19:15 ` ✓ i915.CI.BAT: success for drm/i915: Implement DisplayID based VBT panel type detection (rev2) Patchwork
  5 siblings, 1 reply; 12+ messages in thread
From: Ville Syrjala @ 2026-12-01 18:14 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx, intel-xe

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Don't search through the VBT panel PnP IDs is the EDID
is bogus. Avoids accidentally matching a fully zeroed VBT PnP
ID (not that we've ever seen that).

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_bios.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 70da8613c8bf..9b8cc3821892 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -740,11 +740,9 @@ static int pnpid_edid_get_panel_type(struct intel_display *display,
 {
 	struct drm_edid_product_id product_id;
 
-	if (!drm_edid)
+	if (drm_edid_get_product_id(drm_edid, &product_id))
 		return -1;
 
-	drm_edid_get_product_id(drm_edid, &product_id);
-
 	return pnpid_get_panel_type(display, &product_id, "EDID");
 }
 
-- 
2.56.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 5/5] drm/i915/bios: Use is_panel_type_valid_or_pnp() for the sanity check
  2026-12-01 18:14 [PATCH v2 0/5] drm/i915: Implement DisplayID based VBT panel type detection Ville Syrjala
                   ` (3 preceding siblings ...)
  2026-12-01 18:14 ` [PATCH v2 4/5] drm/i915/bios: Skip VBT PnP ID match if there is no EDID product ID Ville Syrjala
@ 2026-12-01 18:14 ` Ville Syrjala
  2026-12-01 19:46   ` Jani Nikula
  2026-12-01 19:15 ` ✓ i915.CI.BAT: success for drm/i915: Implement DisplayID based VBT panel type detection (rev2) Patchwork
  5 siblings, 1 reply; 12+ messages in thread
From: Ville Syrjala @ 2026-12-01 18:14 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx, intel-xe

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The sanity check WARN in get_panel_type() still hand rolls the
panel_type validity checks. Switch to is_panel_type_valid_or_pnp().

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_bios.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 9b8cc3821892..bcb379ec097a 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -825,8 +825,8 @@ static int get_panel_type(struct intel_display *display,
 		panel_types[i].panel_type = panel_types[i].get_panel_type(display, devdata,
 									  drm_edid, use_fallback);
 
-		drm_WARN_ON(display->drm, panel_types[i].panel_type > 0xf &&
-			    panel_types[i].panel_type != 0xff);
+		drm_WARN_ON(display->drm, panel_types[i].panel_type >= 0 &&
+			    !is_panel_type_valid_or_pnp(panel_types[i].panel_type));
 
 		if (panel_types[i].panel_type >= 0)
 			drm_dbg_kms(display->drm, "Panel type (%s): %d\n",
-- 
2.56.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* ✓ i915.CI.BAT: success for drm/i915: Implement DisplayID based VBT panel type detection (rev2)
  2026-12-01 18:14 [PATCH v2 0/5] drm/i915: Implement DisplayID based VBT panel type detection Ville Syrjala
                   ` (4 preceding siblings ...)
  2026-12-01 18:14 ` [PATCH v2 5/5] drm/i915/bios: Use is_panel_type_valid_or_pnp() for the sanity check Ville Syrjala
@ 2026-12-01 19:15 ` Patchwork
  5 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2026-12-01 19:15 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 4316 bytes --]

== Series Details ==

Series: drm/i915: Implement DisplayID based VBT panel type detection (rev2)
URL   : https://patchwork.freedesktop.org/series/179567/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_19647 -> Patchwork_179567v2
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

Participating hosts (38 -> 37)
------------------------------

  Additional (1): bat-jsl-5 
  Missing    (2): bat-dg2-13 bat-adls-6 

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_huc_copy@huc-copy:
    - bat-jsl-5:          NOTRUN -> [SKIP][1] ([i915#2190])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_179567v2/bat-jsl-5/igt@gem_huc_copy@huc-copy.html

  * igt@gem_lmem_swapping@basic:
    - bat-jsl-5:          NOTRUN -> [SKIP][2] ([i915#4613]) +3 other tests skip
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_179567v2/bat-jsl-5/igt@gem_lmem_swapping@basic.html

  * igt@intel_hwmon@hwmon-write:
    - bat-jsl-5:          NOTRUN -> [SKIP][3] ([i915#7707]) +1 other test skip
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_179567v2/bat-jsl-5/igt@intel_hwmon@hwmon-write.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
    - bat-jsl-5:          NOTRUN -> [SKIP][4] ([i915#4103]) +1 other test skip
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_179567v2/bat-jsl-5/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html

  * igt@kms_dsc@dsc-basic:
    - bat-jsl-5:          NOTRUN -> [SKIP][5] ([i915#16361])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_179567v2/bat-jsl-5/igt@kms_dsc@dsc-basic.html

  * igt@kms_force_connector_basic@force-load-detect:
    - bat-jsl-5:          NOTRUN -> [SKIP][6] ([i915#17452])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_179567v2/bat-jsl-5/igt@kms_force_connector_basic@force-load-detect.html

  * igt@kms_pm_backlight@basic-brightness:
    - bat-jsl-5:          NOTRUN -> [SKIP][7] ([i915#15205])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_179567v2/bat-jsl-5/igt@kms_pm_backlight@basic-brightness.html

  * igt@kms_psr@psr-sprite-plane-onoff:
    - bat-jsl-5:          NOTRUN -> [SKIP][8] ([i915#1072]) +3 other tests skip
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_179567v2/bat-jsl-5/igt@kms_psr@psr-sprite-plane-onoff.html

  * igt@kms_setmode@basic-clone-single-crtc:
    - bat-jsl-5:          NOTRUN -> [SKIP][9] ([i915#3555])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_179567v2/bat-jsl-5/igt@kms_setmode@basic-clone-single-crtc.html

  * igt@vgem_basic@unload:
    - bat-rpls-4:         [PASS][10] -> [DMESG-WARN][11] ([i915#13400])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19647/bat-rpls-4/igt@vgem_basic@unload.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_179567v2/bat-rpls-4/igt@vgem_basic@unload.html

  
  [i915#1072]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/1072
  [i915#13400]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13400
  [i915#15205]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15205
  [i915#16361]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/16361
  [i915#17452]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/17452
  [i915#2190]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/2190
  [i915#3555]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3555
  [i915#4103]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4103
  [i915#4613]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4613
  [i915#7707]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/7707


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

  * Linux: CI_DRM_19647 -> Patchwork_179567v2

  CI-20190529: 20190529
  CI_DRM_19647: 84c2801ba68c91f613802f666010676d07847116 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_9220: 9220
  Patchwork_179567v2: 84c2801ba68c91f613802f666010676d07847116 @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

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

[-- Attachment #2: Type: text/html, Size: 5161 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 3/5] drm/edid: Have drm_edid_get_product_id() tell us if it found something
  2026-12-01 18:14 ` [PATCH v2 3/5] drm/edid: Have drm_edid_get_product_id() tell us if it found something Ville Syrjala
@ 2026-12-01 19:43   ` Jani Nikula
  0 siblings, 0 replies; 12+ messages in thread
From: Jani Nikula @ 2026-12-01 19:43 UTC (permalink / raw)
  To: Ville Syrjala, dri-devel; +Cc: intel-gfx, intel-xe

On Tue, 01 Dec 2026, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> If drm_edid_get_product_id() is used on a NULL or bogus
> EDID it will just fill the product ID with zeros. Have
> it inform the caller what it did by returning an errno,
> just like drm_edid_get_displayid_product_id() does.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/drm_edid.c | 17 ++++++++++++-----
>  include/drm/drm_edid.h     |  4 ++--
>  2 files changed, 14 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 8faec57f70d1..51e855d34adc 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -2780,14 +2780,21 @@ EXPORT_SYMBOL(drm_edid_read);
>   * drm_edid_get_product_id - Get the vendor and product identification
>   * @drm_edid: EDID
>   * @id: Where to place the product id
> + *
> + * Return: Zero on success, or a negative errno code otherwise.
>   */
> -void drm_edid_get_product_id(const struct drm_edid *drm_edid,
> -			     struct drm_edid_product_id *id)
> +int drm_edid_get_product_id(const struct drm_edid *drm_edid,
> +			    struct drm_edid_product_id *id)
>  {
> -	if (drm_edid && drm_edid->edid && drm_edid->size >= EDID_LENGTH)
> +	if (drm_edid && drm_edid->edid && drm_edid->size >= EDID_LENGTH) {
>  		memcpy(id, &drm_edid->edid->product_id, sizeof(*id));
> -	else
> -		memset(id, 0, sizeof(*id));
> +
> +		return 0;
> +	}
> +
> +	memset(id, 0, sizeof(*id));
> +
> +	return -EINVAL;
>  }
>  EXPORT_SYMBOL(drm_edid_get_product_id);
>  
> diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
> index a4e5366b53ad..b075a8eafd17 100644
> --- a/include/drm/drm_edid.h
> +++ b/include/drm/drm_edid.h
> @@ -490,8 +490,8 @@ int drm_edid_connector_update(struct drm_connector *connector,
>  			      const struct drm_edid *edid);
>  int drm_edid_connector_add_modes(struct drm_connector *connector);
>  bool drm_edid_is_digital(const struct drm_edid *drm_edid);
> -void drm_edid_get_product_id(const struct drm_edid *drm_edid,
> -			     struct drm_edid_product_id *id);
> +int drm_edid_get_product_id(const struct drm_edid *drm_edid,
> +			    struct drm_edid_product_id *id);
>  int drm_edid_get_displayid_product_id(const struct drm_edid *drm_edid,
>  				      struct drm_displayid_product_id *id);
>  void drm_edid_print_product_id(struct drm_printer *p,

-- 
Jani Nikula, Intel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 4/5] drm/i915/bios: Skip VBT PnP ID match if there is no EDID product ID
  2026-12-01 18:14 ` [PATCH v2 4/5] drm/i915/bios: Skip VBT PnP ID match if there is no EDID product ID Ville Syrjala
@ 2026-12-01 19:44   ` Jani Nikula
  0 siblings, 0 replies; 12+ messages in thread
From: Jani Nikula @ 2026-12-01 19:44 UTC (permalink / raw)
  To: Ville Syrjala, dri-devel; +Cc: intel-gfx, intel-xe

On Tue, 01 Dec 2026, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Don't search through the VBT panel PnP IDs is the EDID

*if

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> is bogus. Avoids accidentally matching a fully zeroed VBT PnP
> ID (not that we've ever seen that).
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_bios.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index 70da8613c8bf..9b8cc3821892 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -740,11 +740,9 @@ static int pnpid_edid_get_panel_type(struct intel_display *display,
>  {
>  	struct drm_edid_product_id product_id;
>  
> -	if (!drm_edid)
> +	if (drm_edid_get_product_id(drm_edid, &product_id))
>  		return -1;
>  
> -	drm_edid_get_product_id(drm_edid, &product_id);
> -
>  	return pnpid_get_panel_type(display, &product_id, "EDID");
>  }

-- 
Jani Nikula, Intel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 5/5] drm/i915/bios: Use is_panel_type_valid_or_pnp() for the sanity check
  2026-12-01 18:14 ` [PATCH v2 5/5] drm/i915/bios: Use is_panel_type_valid_or_pnp() for the sanity check Ville Syrjala
@ 2026-12-01 19:46   ` Jani Nikula
  0 siblings, 0 replies; 12+ messages in thread
From: Jani Nikula @ 2026-12-01 19:46 UTC (permalink / raw)
  To: Ville Syrjala, dri-devel; +Cc: intel-gfx, intel-xe

On Tue, 01 Dec 2026, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> The sanity check WARN in get_panel_type() still hand rolls the
> panel_type validity checks. Switch to is_panel_type_valid_or_pnp().
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_bios.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index 9b8cc3821892..bcb379ec097a 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -825,8 +825,8 @@ static int get_panel_type(struct intel_display *display,
>  		panel_types[i].panel_type = panel_types[i].get_panel_type(display, devdata,
>  									  drm_edid, use_fallback);
>  
> -		drm_WARN_ON(display->drm, panel_types[i].panel_type > 0xf &&
> -			    panel_types[i].panel_type != 0xff);
> +		drm_WARN_ON(display->drm, panel_types[i].panel_type >= 0 &&
> +			    !is_panel_type_valid_or_pnp(panel_types[i].panel_type));
>  
>  		if (panel_types[i].panel_type >= 0)
>  			drm_dbg_kms(display->drm, "Panel type (%s): %d\n",

-- 
Jani Nikula, Intel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 1/5] drm/edid: Introduce drm_edid_get_displayid_product_id()
  2026-12-01 18:14 ` [PATCH v2 1/5] drm/edid: Introduce drm_edid_get_displayid_product_id() Ville Syrjala
@ 2026-12-02  9:48   ` Jani Nikula
  2026-12-02 14:53     ` Ville Syrjälä
  0 siblings, 1 reply; 12+ messages in thread
From: Jani Nikula @ 2026-12-02  9:48 UTC (permalink / raw)
  To: Ville Syrjala, dri-devel; +Cc: intel-gfx, intel-xe

On Tue, 01 Dec 2026, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Add drm_edid_get_displayid_product_id() as the DisplayID based
> counterpart to the already existing EDID base block based
> drm_edid_get_product_id().
>
> In DisplayID the information is stored in the "Product ID"
> block (0x00 or 0x20). The layout is slightly different to the
> EDID one as the vendor ID is a three byte OUI isntead of
> the compressed ASCII EISA/PNPID of EDID. The "year of
> manufacture" is now relative to the year 2000, as opposed
> to 1990 for EDID.
>
> There is also a product ID string, but I decided to leave that
> out from the user visible struct because the variable length
> would just complicate things.
>
> v2: Call it drm_edid_get_displayid_product_id() (Jani)
>     Return an error to indicate what happened (Jani)
>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/drm_displayid_internal.h | 11 +++++
>  drivers/gpu/drm/drm_edid.c               | 56 ++++++++++++++++++++++++
>  include/drm/drm_edid.h                   | 10 +++++
>  3 files changed, 77 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_displayid_internal.h b/drivers/gpu/drm/drm_displayid_internal.h
> index ef7e6c9bd4db..2177c19cae4c 100644
> --- a/drivers/gpu/drm/drm_displayid_internal.h
> +++ b/drivers/gpu/drm/drm_displayid_internal.h
> @@ -103,6 +103,17 @@ struct displayid_block {
>  	u8 num_bytes;
>  } __packed;
>  
> +struct displayid_product_id_block {
> +	struct displayid_block base;
> +	u8 vendor_id[3];
> +	__le16 product_code;
> +	__le32 serial_number;
> +	u8 week_of_manufacture;
> +	u8 year_of_manufacture;
> +	u8 size_of_product_id_string;
> +	u8 product_id_string[];
> +} __packed;
> +
>  struct displayid_tiled_block {
>  	struct displayid_block base;
>  	u8 tile_cap;
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index b8f882a17c8f..8faec57f70d1 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -2791,6 +2791,62 @@ void drm_edid_get_product_id(const struct drm_edid *drm_edid,
>  }
>  EXPORT_SYMBOL(drm_edid_get_product_id);
>  
> +static bool displayid_is_product_id_block(const struct displayid_iter *iter,
> +					  const struct displayid_block *block)
> +{
> +	return (displayid_version(iter) < DISPLAY_ID_STRUCTURE_VER_20 &&
> +		block->tag == DATA_BLOCK_PRODUCT_ID) ||
> +		(displayid_version(iter) == DISPLAY_ID_STRUCTURE_VER_20 &&
> +		 block->tag == DATA_BLOCK_2_PRODUCT_ID);
> +}

The r-b still stands, and let's not block this series as they're
fixes. But I think this will be cleaner with [1]. I can rebase later.

[1] https://lore.kernel.org/r/2a6f7a494a37cbdc3f438c71435224ff5e978df8.1796136101.git.jani.nikula@intel.com

> +
> +/**
> + * drm_edid_get_displayid_product_id - Get the vendor and product identification from DisplayID
> + * @drm_edid: EDID
> + * @id: Where to place the product id
> + *
> + * Return: Zero on success, or a negative errno code otherwise.
> + */
> +int drm_edid_get_displayid_product_id(const struct drm_edid *drm_edid,
> +				      struct drm_displayid_product_id *id)
> +{
> +	const struct displayid_block *block;
> +	struct displayid_iter iter;
> +	int ret = -ENOENT;
> +
> +	memset(id, 0, sizeof(*id));
> +
> +	if (!drm_edid)
> +		return -EINVAL;
> +
> +	displayid_iter_edid_begin(drm_edid, &iter);
> +	displayid_iter_for_each(block, &iter) {
> +		const struct displayid_product_id_block *prod_id =
> +			(struct displayid_product_id_block *)block;

Ditto [2].

[2] https://lore.kernel.org/r/83a63743366ac41a2ed947b9d72f884b439a40be.1796136101.git.jani.nikula@intel.com


> +
> +		if (!displayid_is_product_id_block(&iter, block))
> +			continue;
> +
> +		if (block->num_bytes < sizeof(*prod_id) - sizeof(prod_id->base))
> +			continue;
> +
> +		id->vendor_id[0] = prod_id->vendor_id[0];
> +		id->vendor_id[1] = prod_id->vendor_id[1];
> +		id->vendor_id[2] = prod_id->vendor_id[2];
> +		id->product_code = prod_id->product_code;
> +		id->serial_number = prod_id->serial_number;
> +		id->week_of_manufacture = prod_id->week_of_manufacture;
> +		id->year_of_manufacture = prod_id->year_of_manufacture;
> +
> +		ret = 0;
> +		break;
> +	}
> +	displayid_iter_end(&iter);
> +
> +	return ret;
> +}
> +EXPORT_SYMBOL(drm_edid_get_displayid_product_id);
> +
>  static void decode_date(struct seq_buf *s, const struct drm_edid_product_id *id)
>  {
>  	int week = id->week_of_manufacture;
> diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
> index a2617aa34edf..a4e5366b53ad 100644
> --- a/include/drm/drm_edid.h
> +++ b/include/drm/drm_edid.h
> @@ -288,6 +288,14 @@ struct drm_edid_product_id {
>  	u8 year_of_manufacture;
>  } __packed;
>  
> +struct drm_displayid_product_id {
> +	u8 vendor_id[3];
> +	__le16 product_code;
> +	__le32 serial_number;
> +	u8 week_of_manufacture;
> +	u8 year_of_manufacture;
> +} __packed;
> +
>  struct edid {
>  	u8 header[8];
>  	/* Vendor & product info */
> @@ -484,6 +492,8 @@ int drm_edid_connector_add_modes(struct drm_connector *connector);
>  bool drm_edid_is_digital(const struct drm_edid *drm_edid);
>  void drm_edid_get_product_id(const struct drm_edid *drm_edid,
>  			     struct drm_edid_product_id *id);
> +int drm_edid_get_displayid_product_id(const struct drm_edid *drm_edid,
> +				      struct drm_displayid_product_id *id);
>  void drm_edid_print_product_id(struct drm_printer *p,
>  			       const struct drm_edid_product_id *id, bool raw);
>  u32 drm_edid_get_panel_id(const struct drm_edid *drm_edid);

-- 
Jani Nikula, Intel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 1/5] drm/edid: Introduce drm_edid_get_displayid_product_id()
  2026-12-02  9:48   ` Jani Nikula
@ 2026-12-02 14:53     ` Ville Syrjälä
  0 siblings, 0 replies; 12+ messages in thread
From: Ville Syrjälä @ 2026-12-02 14:53 UTC (permalink / raw)
  To: Jani Nikula; +Cc: dri-devel, intel-gfx, intel-xe

On Wed, Dec 02, 2026 at 11:48:21AM +0200, Jani Nikula wrote:
> On Tue, 01 Dec 2026, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Add drm_edid_get_displayid_product_id() as the DisplayID based
> > counterpart to the already existing EDID base block based
> > drm_edid_get_product_id().
> >
> > In DisplayID the information is stored in the "Product ID"
> > block (0x00 or 0x20). The layout is slightly different to the
> > EDID one as the vendor ID is a three byte OUI isntead of
> > the compressed ASCII EISA/PNPID of EDID. The "year of
> > manufacture" is now relative to the year 2000, as opposed
> > to 1990 for EDID.
> >
> > There is also a product ID string, but I decided to leave that
> > out from the user visible struct because the variable length
> > would just complicate things.
> >
> > v2: Call it drm_edid_get_displayid_product_id() (Jani)
> >     Return an error to indicate what happened (Jani)
> >
> > Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/drm_displayid_internal.h | 11 +++++
> >  drivers/gpu/drm/drm_edid.c               | 56 ++++++++++++++++++++++++
> >  include/drm/drm_edid.h                   | 10 +++++
> >  3 files changed, 77 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/drm_displayid_internal.h b/drivers/gpu/drm/drm_displayid_internal.h
> > index ef7e6c9bd4db..2177c19cae4c 100644
> > --- a/drivers/gpu/drm/drm_displayid_internal.h
> > +++ b/drivers/gpu/drm/drm_displayid_internal.h
> > @@ -103,6 +103,17 @@ struct displayid_block {
> >  	u8 num_bytes;
> >  } __packed;
> >  
> > +struct displayid_product_id_block {
> > +	struct displayid_block base;
> > +	u8 vendor_id[3];
> > +	__le16 product_code;
> > +	__le32 serial_number;
> > +	u8 week_of_manufacture;
> > +	u8 year_of_manufacture;
> > +	u8 size_of_product_id_string;
> > +	u8 product_id_string[];
> > +} __packed;
> > +
> >  struct displayid_tiled_block {
> >  	struct displayid_block base;
> >  	u8 tile_cap;
> > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> > index b8f882a17c8f..8faec57f70d1 100644
> > --- a/drivers/gpu/drm/drm_edid.c
> > +++ b/drivers/gpu/drm/drm_edid.c
> > @@ -2791,6 +2791,62 @@ void drm_edid_get_product_id(const struct drm_edid *drm_edid,
> >  }
> >  EXPORT_SYMBOL(drm_edid_get_product_id);
> >  
> > +static bool displayid_is_product_id_block(const struct displayid_iter *iter,
> > +					  const struct displayid_block *block)
> > +{
> > +	return (displayid_version(iter) < DISPLAY_ID_STRUCTURE_VER_20 &&
> > +		block->tag == DATA_BLOCK_PRODUCT_ID) ||
> > +		(displayid_version(iter) == DISPLAY_ID_STRUCTURE_VER_20 &&
> > +		 block->tag == DATA_BLOCK_2_PRODUCT_ID);
> > +}
> 
> The r-b still stands, and let's not block this series as they're
> fixes. But I think this will be cleaner with [1]. I can rebase later.
> 
> [1] https://lore.kernel.org/r/2a6f7a494a37cbdc3f438c71435224ff5e978df8.1796136101.git.jani.nikula@intel.com

Yeah, I'll probably have to slap a cc:stable on the first two patches
since machines needing this are already in the wild. So better get
those in before the refactoring.

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-12-02 14:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 18:14 [PATCH v2 0/5] drm/i915: Implement DisplayID based VBT panel type detection Ville Syrjala
2026-12-01 18:14 ` [PATCH v2 1/5] drm/edid: Introduce drm_edid_get_displayid_product_id() Ville Syrjala
2026-12-02  9:48   ` Jani Nikula
2026-12-02 14:53     ` Ville Syrjälä
2026-12-01 18:14 ` [PATCH v2 2/5] drm/i915/bios: Attempt to match the VBT PnP ID against DisplayID first Ville Syrjala
2026-12-01 18:14 ` [PATCH v2 3/5] drm/edid: Have drm_edid_get_product_id() tell us if it found something Ville Syrjala
2026-12-01 19:43   ` Jani Nikula
2026-12-01 18:14 ` [PATCH v2 4/5] drm/i915/bios: Skip VBT PnP ID match if there is no EDID product ID Ville Syrjala
2026-12-01 19:44   ` Jani Nikula
2026-12-01 18:14 ` [PATCH v2 5/5] drm/i915/bios: Use is_panel_type_valid_or_pnp() for the sanity check Ville Syrjala
2026-12-01 19:46   ` Jani Nikula
2026-12-01 19:15 ` ✓ i915.CI.BAT: success for drm/i915: Implement DisplayID based VBT panel type detection (rev2) Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox