[PATCH 1/2] mei/mei_hdcp: Use check for intel gfx instead of i915 in match functions
Ankit Nautiyal
ankit.k.nautiyal at intel.com
Wed Aug 9 16:04:04 UTC 2023
Instead of explicitly checking for i915 driver check for the
device being an intel graphics card. This will help to have compibility
with xe driver.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
---
drivers/misc/mei/hdcp/mei_hdcp.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/mei/hdcp/mei_hdcp.c b/drivers/misc/mei/hdcp/mei_hdcp.c
index 51359cc5ece9..bfe96e857f0a 100644
--- a/drivers/misc/mei/hdcp/mei_hdcp.c
+++ b/drivers/misc/mei/hdcp/mei_hdcp.c
@@ -20,6 +20,7 @@
#include <linux/slab.h>
#include <linux/mei.h>
#include <linux/mei_cl_bus.h>
+#include <linux/pci.h>
#include <linux/component.h>
#include <drm/drm_connector.h>
#include <drm/i915_component.h>
@@ -781,8 +782,14 @@ static int mei_hdcp_component_match(struct device *dev, int subcomponent,
void *data)
{
struct device *base = data;
+ struct pci_dev *pdev;
- if (!dev->driver || strcmp(dev->driver->name, "i915") ||
+ if (!dev_is_pci(dev))
+ return 0;
+
+ pdev = to_pci_dev(dev);
+
+ if (!dev->driver || pdev->vendor != PCI_VENDOR_ID_INTEL ||
subcomponent != I915_COMPONENT_HDCP)
return 0;
--
2.40.1
More information about the Intel-gfx-trybot
mailing list