Re: [PATCH v4 1/3] media: ipu-bridge: Add DMI information of Lenovo X9 to the image upside-down list
From: Sakari Ailus
Date: Thu Jun 11 2026 - 08:45:54 EST
Hi Kate,
On Thu, Jun 11, 2026 at 05:42:04PM +0800, Kate Hsuan wrote:
> Hi Sakari,
>
> On Thu, Jun 11, 2026 at 4:24 PM Sakari Ailus
> <sakari.ailus@xxxxxxxxxxxxxxx> wrote:
> >
> > Hi Kate,
> >
> > On Thu, Jun 11, 2026 at 03:25:46PM +0800, Kate Hsuan wrote:
> > > Hi Sakari and Mark,
> > >
> > > On Thu, Jun 11, 2026 at 5:59 AM Sakari Ailus
> > > <sakari.ailus@xxxxxxxxxxxxxxx> wrote:
> > > >
> > > > Hi Kate,
> > > >
> > > > I know several people have given you different advices but...
> > > >
> > > > On Tue, Jun 09, 2026 at 08:49:24PM +0800, Kate Hsuan wrote:
> > > > > The Lenovo X9 has an upside-down-mounted Sony IMX471 sensor so the image
> > > > > was displayed upside-down. Add the DMI information of Lenovo X9 to
> > > > > resolve the issue.
> > > > >
> > > > > Signed-off-by: Kate Hsuan <hpa@xxxxxxxxxx>
> > > > > ---
> > > > > drivers/media/pci/intel/ipu-bridge.c | 32 ++++++++++++++++++++++++++++
> > > > > 1 file changed, 32 insertions(+)
> > > > >
> > > > > diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c
> > > > > index fc6608e33de4..9e24aaceecdf 100644
> > > > > --- a/drivers/media/pci/intel/ipu-bridge.c
> > > > > +++ b/drivers/media/pci/intel/ipu-bridge.c
> > > > > @@ -134,6 +134,38 @@ static const struct dmi_system_id upside_down_sensor_dmi_ids[] = {
> > > > > },
> > > > > .driver_data = "OVTI02C1",
> > > > > },
> > > > > + {
> > > > > + /* Lenovo X9-14 */
> > > > > + .matches = {
> > > > > + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> > > > > + DMI_MATCH(DMI_BOARD_NAME, "21QA"),
> > > > > + },
> > > > > + .driver_data = "SONY471A",
> > > > > + },
> > > > > + {
> > > > > + /* Lenovo X9-14 */
> > > >
> > > > How are the two X9-14's different? It'd be good to have some comment here
> > > > which model this actually is: the board name is only available (typically
> > > > at least) in DMI.
> > >
> > > According to the datasheet of X9-14 and 15. Lenovo offers 2 screen
> > > sizes (14-inch and 15-inch) and 2 CPU types (Core Ultra 5 and 7).
> >
> > Is the CPU SKU the difference here? If so, can you add that to the comment?
> I looked into the datasheet and it is hard to describe the difference
> between 21QA and 21QB (X9-14) or 21Q6 and 21Q7 (X9-15).
Ack.
> The 21QA and 21QB cover many kinds of configurations.
I think it'd be good to say that in a comment, too.
Some Lenovo models have UVC webcams, too, and often it's hard to tell which
laptop has which camera. :-(
>
> >
> > > They may ship customised firmware for a specific purpose with a random
> > > DMI_PRODUCT_VERSION.
> > > So, using the DMI_BOARD_NAME prefix to identify the laptop SKU is
> > > safer and easier.
> > >
> > > I think DMI_MATCH(DMI_BOARD_NAME, "21Q") covers all X9 but I don't
> > > know the side effect :(
> > > They may propose a new model with a different MIPI camera or HID.
> >
> > Indeed. Is the BOARD_NAME guaranteed to be unique by Lenovo? I think I'd
> > use DMI_EXACT_MATCH(), too.
>
> The board name is a 10-character string, and the first four characters
> are used to identify the SKU, called "machine type". For example, my
> X9 is 21QBZCK... so DMI_MATCH() matches the first 4 characters (21QB)
> to identify that it is a X9-14.
Ack.
--
Kind regards,
Sakari Ailus