From: sashiko-bot@kernel.org
To: "Ville Syrjala" <ville.syrjala@linux.intel.com>,
dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915/bios: Attempt to match the VBT PnP ID against DisplayID first
Date: Tue, 24 Nov 2026 22:56:48 +0000 [thread overview]
Message-ID: <sashiko-outbox-232179@kernel.org> (raw)
In-Reply-To: <20261124224621.6506-3-ville.syrjala@linux.intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] drm/i915/bios: false VBT match in
pnpid_displayid_get_panel_type()
--
commit b621730b3ac12390341a723bfb91f30971b56f98
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
drm/i915/bios: Attempt to match the VBT PnP ID against DisplayID first
This commit attempts to match the VBT PnP ID against the DisplayID product ID
block before falling back to the base EDID vendor/product ID.
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index 7b6a6f8c3cf19..8fbabf2e8b6f8 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
[ ... ]
> @@ -732,6 +727,48 @@ 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)
> + return -1;
> +
> + drm_displayid_get_product_id(drm_edid, &displayid_id);
> +
> + /*
> + * 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");
> +}
[Severity: High]
Can pnpid_displayid_get_panel_type() falsely match an unpopulated VBT PnP ID
entry when the EDID has no DisplayID Product ID block?
drm_displayid_get_product_id() zeroes displayid_id up front and leaves it
zero-filled if no DisplayID Product ID block is present. Passing the resulting
all-zero product_id into pnpid_get_panel_type() will match the first unused
(all-zero) slot among the 16 entries in BDB_LFP_DATA, causing get_panel_type()
to select that unpopulated VBT panel index via PANEL_TYPE_PNPID_DISPLAYID
instead of falling back to PANEL_TYPE_PNPID_EDID.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261124224621.6506-2-ville.syrjala@linux.intel.com?part=2
next prev parent reply other threads:[~2026-11-24 22:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 22:46 [PATCH 0/2] drm/i915: Implement DisplayID based VBT panel type detection Ville Syrjala
2026-11-24 22:46 ` [PATCH 1/2] drm/edid: Introduce drm_edid_get_displayid_product_id() Ville Syrjala
2026-11-24 22:51 ` sashiko-bot
2026-11-24 23:02 ` Ville Syrjälä
2026-11-24 22:46 ` [PATCH 2/2] drm/i915/bios: Attempt to match the VBT PnP ID against DisplayID first Ville Syrjala
2026-11-24 22:56 ` sashiko-bot [this message]
2026-11-24 23:06 ` Ville Syrjälä
2026-11-25 0:13 ` ✗ CI.checkpatch: warning for drm/i915: Implement DisplayID based VBT panel type detection Patchwork
2026-11-25 0:16 ` ✓ CI.KUnit: success " Patchwork
2026-11-25 0:55 ` ✗ Xe.CI.BAT: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-232179@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox