On Wed, Dec 02, 2026 at 11:48:21AM +0200, Jani Nikula wrote:
> On Tue, 01 Dec 2026, Ville Syrjala <[email protected]> wrote:
> > From: Ville Syrjälä <[email protected]>
> >
> > 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 <[email protected]>
> > Signed-off-by: Ville Syrjälä <[email protected]>
> > ---
> >  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.nik...@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

Reply via email to