From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Arnd Bergmann <arnd@arndb.de>
Cc: "Usyskin, Alexander" <alexander.usyskin@intel.com>,
"Nilawar, Badal" <badal.nilawar@intel.com>,
"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Gupta, Anshuman" <anshuman.gupta@intel.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"Ceraolo Spurio, Daniele" <daniele.ceraolospurio@intel.com>,
"mika.westerberg@linux.intel.com"
<mika.westerberg@linux.intel.com>,
"Poosa, Karthik" <karthik.poosa@intel.com>
Subject: Re: [PATCH v9 2/9] mei: late_bind: add late binding component driver
Date: Thu, 18 Sep 2025 11:41:13 -0400 [thread overview]
Message-ID: <aMwoGX9LOLS5_8fe@intel.com> (raw)
In-Reply-To: <7l4emr357ugep2brz67d6mxgudxqpgfkf3gyhr5cp6i6uhku42@jhgdf4cujbis>
On Fri, Sep 12, 2025 at 12:19:21AM -0500, Lucas De Marchi wrote:
> On Tue, Sep 09, 2025 at 09:43:02AM -0500, Lucas De Marchi wrote:
> > On Tue, Sep 09, 2025 at 04:50:41AM +0000, Usyskin, Alexander wrote:
> > > > > +static int mei_lb_component_match(struct device *dev, int subcomponent,
> > > > > + void *data)
> > > > > +{
> > > > > + /*
> > > > > + * This function checks if requester is Intel %PCI_CLASS_DISPLAY_VGA
> > > > or
> > > > > + * %PCI_CLASS_DISPLAY_OTHER device, and checks if the requester is
> > > > the
> > > > > + * grand parent of mei_if i.e. late bind MEI device
> > > > > + */
> > > > > + struct device *base = data;
> > > > > + struct pci_dev *pdev;
> > > > > +
> > > > > + if (!dev)
> > > > > + return 0;
> > > > > +
> > > > > + if (!dev_is_pci(dev))
> > > > > + return 0;
> > > > > +
> > > > > + pdev = to_pci_dev(dev);
> > > > > +
> > > > > + if (pdev->vendor != PCI_VENDOR_ID_INTEL)
> > > > > + return 0;
> > > > > +
> > > > > + if (pdev->class != (PCI_CLASS_DISPLAY_VGA << 8) &&
> > > > > + pdev->class != (PCI_CLASS_DISPLAY_OTHER << 8))
> > > >
> > > > this doesn't seem right, we should allow other PCI classes. AFAICS this
> > > > check could just be removed and just leave the INTEL_COMPONENT_LB below
> > > > to protect for component match
> > > >
> > > > Lucas De Marchi
> > > >
> > >
> > > The subcomponent is unique only in its own instance of the component framework.
> > > Or I'm wrong here?
> > > We have to ensure that we have Intel display device, not any other device to
> > > subcomponent check to work correctly.
> >
> > We are matching by child-parent relationship + the component id. So you
> > have both the mei device and another pci device that added that specific
> > subcomponent and both need to have a common parent. Thinking about
> > another device that would match the parent-child relationship: audio,
> > but audio doesn't add that.
> >
> > what scenario would cause a false match that I'm not seeing?
>
> so, I doesn't seem it would fail any, but it's fine as a sanity check.
> This is in fact very similar to mei_pxp_component_match(). If we are
> going to remove the display check, it could be done later on top, making
> sure not to match what it shouldn't.
>
> So, this looks good to me. I tested this on a Battlemage card
> it's correclty loading the firmware:
>
> xe 0000:03:00.0: [drm:xe_late_bind_init [xe]] Request late binding firmware xe/fan_control_8086_e20b_8086_1100.bin
> xe 0000:03:00.0: [drm] Using fan_control firmware from xe/fan_control_8086_e20b_8086_1100.bin version 203.0.0.0
> ...
> mei_lb xe.mei-gscfi.768-e2c2afa2-3817-4d19-9d95-06b16b588a5d: bound 0000:03:00.0 (ops xe_late_bind_component_ops [xe])
> xe 0000:03:00.0: [drm:xe_late_bind_work [xe]] Load fan_control firmware
> xe 0000:03:00.0: [drm:xe_late_bind_work [xe]] Load fan_control firmware successful
>
>
> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
>
> Greg, does this look ok to you now for us to merge through drm?
Greg or Arnd,
ack on getting these 2 mei patches in this series from drm-next trees?
Thanks,
Rodrigo.
>
> thanks
> Lucas De Marchi
>
> >
> > Lucas De Marchi
next prev parent reply other threads:[~2025-09-18 15:41 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-05 15:49 [PATCH v9 0/9] Introducing firmware late binding Badal Nilawar
2025-09-05 15:49 ` [PATCH v9 1/9] mei: bus: add mei_cldev_mtu interface Badal Nilawar
2025-09-05 15:49 ` [PATCH v9 2/9] mei: late_bind: add late binding component driver Badal Nilawar
2025-09-08 16:25 ` Lucas De Marchi
2025-09-09 4:50 ` Usyskin, Alexander
2025-09-09 14:43 ` Lucas De Marchi
2025-09-12 5:19 ` Lucas De Marchi
2025-09-18 15:41 ` Rodrigo Vivi [this message]
2025-09-18 16:27 ` gregkh
2025-09-05 15:49 ` [PATCH v9 3/9] drm/xe/xe_late_bind_fw: Introduce xe_late_bind_fw Badal Nilawar
2025-09-05 15:49 ` [PATCH v9 4/9] drm/xe/xe_late_bind_fw: Initialize late binding firmware Badal Nilawar
2025-09-05 15:49 ` [PATCH v9 5/9] drm/xe/xe_late_bind_fw: Load " Badal Nilawar
2025-09-05 15:49 ` [PATCH v9 6/9] drm/xe/xe_late_bind_fw: Reload late binding fw in rpm resume Badal Nilawar
2025-09-05 15:49 ` [PATCH v9 7/9] drm/xe/xe_late_bind_fw: Reload late binding fw during system resume Badal Nilawar
2025-09-05 15:49 ` [PATCH v9 8/9] drm/xe/xe_late_bind_fw: Introduce debug fs node to disable late binding Badal Nilawar
2025-09-05 15:49 ` [PATCH v9 9/9] drm/xe/xe_late_bind_fw: Extract and print version info Badal Nilawar
2025-09-24 20:44 ` Kees Bakker
2025-09-25 12:09 ` Nilawar, Badal
2025-09-05 16:08 ` ✗ CI.checkpatch: warning for Introducing firmware late binding Patchwork
2025-09-05 16:09 ` ✓ CI.KUnit: success " Patchwork
2025-09-05 16:24 ` ✗ CI.checksparse: warning " Patchwork
2025-09-05 16:51 ` ✓ Xe.CI.BAT: success " Patchwork
2025-09-06 2:54 ` ✓ Xe.CI.Full: " 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=aMwoGX9LOLS5_8fe@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=alexander.usyskin@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=arnd@arndb.de \
--cc=badal.nilawar@intel.com \
--cc=daniele.ceraolospurio@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=karthik.poosa@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucas.demarchi@intel.com \
--cc=mika.westerberg@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.