Commit a0776c21 authored by Alexander Usyskin's avatar Alexander Usyskin Committed by Greg Kroah-Hartman

mei: gsc_proxy: match component when GSC is on different bus

On Arrow Lake S systems, MEI is no longer strictly connected to bus 0,
while graphics remain exclusively on bus 0. Adapt the component
matching logic to accommodate this change:

Original behavior: Required both MEI and graphics to be on the same
bus 0.

New behavior: Only enforces graphics to be on bus 0 (integrated),
allowing MEI to reside on any bus.
This ensures compatibility with Arrow Lake S and maintains functionality
for the legacy systems.

Fixes: 1dd924f6 ("mei: gsc_proxy: add gsc proxy driver")
Cc: stable@vger.kernel.org # v6.3+
Signed-off-by: default avatarAlexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20240220200020.231192-1-tomas.winkler@intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a283d7f1
...@@ -96,7 +96,8 @@ static const struct component_master_ops mei_component_master_ops = { ...@@ -96,7 +96,8 @@ static const struct component_master_ops mei_component_master_ops = {
* *
* The function checks if the device is pci device and * The function checks if the device is pci device and
* Intel VGA adapter, the subcomponent is SW Proxy * Intel VGA adapter, the subcomponent is SW Proxy
* and the parent of MEI PCI and the parent of VGA are the same PCH device. * and the VGA is on the bus 0 reserved for built-in devices
* to reject discrete GFX.
* *
* @dev: master device * @dev: master device
* @subcomponent: subcomponent to match (I915_COMPONENT_SWPROXY) * @subcomponent: subcomponent to match (I915_COMPONENT_SWPROXY)
...@@ -123,7 +124,8 @@ static int mei_gsc_proxy_component_match(struct device *dev, int subcomponent, ...@@ -123,7 +124,8 @@ static int mei_gsc_proxy_component_match(struct device *dev, int subcomponent,
if (subcomponent != I915_COMPONENT_GSC_PROXY) if (subcomponent != I915_COMPONENT_GSC_PROXY)
return 0; return 0;
return component_compare_dev(dev->parent, ((struct device *)data)->parent); /* Only built-in GFX */
return (pdev->bus->number == 0);
} }
static int mei_gsc_proxy_probe(struct mei_cl_device *cldev, static int mei_gsc_proxy_probe(struct mei_cl_device *cldev,
...@@ -146,7 +148,7 @@ static int mei_gsc_proxy_probe(struct mei_cl_device *cldev, ...@@ -146,7 +148,7 @@ static int mei_gsc_proxy_probe(struct mei_cl_device *cldev,
} }
component_match_add_typed(&cldev->dev, &master_match, component_match_add_typed(&cldev->dev, &master_match,
mei_gsc_proxy_component_match, cldev->dev.parent); mei_gsc_proxy_component_match, NULL);
if (IS_ERR_OR_NULL(master_match)) { if (IS_ERR_OR_NULL(master_match)) {
ret = -ENOMEM; ret = -ENOMEM;
goto err_exit; goto err_exit;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment