From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: <intel-gfx@lists.freedesktop.org>,
Alexander Usyskin <alexander.usyskin@intel.com>
Subject: Re: [PATCH v2 1/2] mei: me: Add exported function to get the PCI ID list
Date: Fri, 12 Sep 2025 07:55:03 -0700 [thread overview]
Message-ID: <fb4a23fb-c4a8-474d-8edb-e2f347805132@intel.com> (raw)
In-Reply-To: <2025091228-chewable-amusable-5d2e@gregkh>
On 9/12/2025 6:44 AM, Greg Kroah-Hartman wrote:
> On Thu, Sep 11, 2025 at 10:50:23AM -0700, Daniele Ceraolo Spurio wrote:
>> The intel GFX drivers (i915/xe) interface with the ME device for some of
>> their features (e.g. PXP, HDCP) via the component interface. Given that
>> the ME device can be hidden by BIOS/Coreboot, the GFX drivers need a
>> way to check if the device is available before attempting to bind the
>> component, otherwise they'll go ahead and initialize features that will
>> never work.
>> The simplest way to check if the device is available is to check the
>> available devices against the PCI ID list of the mei_me driver. To avoid
>> duplication, this patch adds an exported function that the GFX driver
>> can call to obtain the list. Locking around the checks, if required,
>> is left to the caller.
>>
>> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>> Cc: Alexander Usyskin <alexander.usyskin@intel.com>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> ---
>> drivers/misc/mei/pci-me.c | 22 ++++++++++++++++++++++
>> include/linux/mei_me.h | 20 ++++++++++++++++++++
>> 2 files changed, 42 insertions(+)
>> create mode 100644 include/linux/mei_me.h
>>
>> diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c
>> index 3f9c60b579ae..147e79b4ae1f 100644
>> --- a/drivers/misc/mei/pci-me.c
>> +++ b/drivers/misc/mei/pci-me.c
>> @@ -18,6 +18,7 @@
>> #include <linux/pm_runtime.h>
>>
>> #include <linux/mei.h>
>> +#include <linux/mei_me.h>
>>
>> #include "mei_dev.h"
>> #include "client.h"
>> @@ -133,6 +134,27 @@ static const struct pci_device_id mei_me_pci_tbl[] = {
>>
>> MODULE_DEVICE_TABLE(pci, mei_me_pci_tbl);
>>
>> +/**
>> + * mei_me_get_device_id_table - get the list of ME pci device IDs
>> + *
>> + * Other drivers (e.g., i915, xe) interface with the ME device for some of their
>> + * features (e.g., PXP, HDCP). However, the ME device can be unplugged via the
>> + * pci subsystem or hidden by BIOS/coreboot, so those drivers might want to
>> + * check if the device is available before initializing those features. This
>> + * function offers a way for those drivers to get the list of ME device IDs,
>> + * so they can check if one of them is available before attempting to
>> + * interface with it. Locking around the availability check, if required,
>> + * is left to the caller.
>> + *
>> + * Return: An array of struct pci_device_id entries containing the IDs of
>> + * the ME devices.
>> + */
>> +const struct pci_device_id *mei_me_get_device_id_table(void)
>> +{
>> + return mei_me_pci_tbl;
>> +}
>> +EXPORT_SYMBOL_GPL(mei_me_get_device_id_table);
> Why not just do:
>
> EXPORT_SYMBOL_GPL(mei_me_pci_tbl);
>
> instead?
>
> Much simpler :)
Good point! :P
I'll update.
Thanks,
Daniele
>
> thanks,
>
> greg k-h
next prev parent reply other threads:[~2025-09-12 14:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-11 17:50 [PATCH v2 0/2] Check if CSME is available before initializing PXP Daniele Ceraolo Spurio
2025-09-11 17:50 ` [PATCH v2 1/2] mei: me: Add exported function to get the PCI ID list Daniele Ceraolo Spurio
2025-09-12 13:44 ` Greg Kroah-Hartman
2025-09-12 14:55 ` Daniele Ceraolo Spurio [this message]
2025-09-11 17:50 ` [PATCH v2 2/2] drm/i915/pxp: Do not support PXP if CSME is not available Daniele Ceraolo Spurio
2025-09-11 20:39 ` ✓ i915.CI.BAT: success for Check if CSME is available before initializing PXP (rev2) Patchwork
2025-09-12 12:43 ` ✗ i915.CI.Full: 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=fb4a23fb-c4a8-474d-8edb-e2f347805132@intel.com \
--to=daniele.ceraolospurio@intel.com \
--cc=alexander.usyskin@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=intel-gfx@lists.freedesktop.org \
/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.