Skip to content

Commit a0776c2

Browse files
ausyskingregkh
authored andcommitted
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: 1dd924f ("mei: gsc_proxy: add gsc proxy driver") Cc: stable@vger.kernel.org # v6.3+ Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Link: https://lore.kernel.org/r/20240220200020.231192-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a283d7f commit a0776c2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/misc/mei/gsc_proxy/mei_gsc_proxy.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ static const struct component_master_ops mei_component_master_ops = {
9696
*
9797
* The function checks if the device is pci device and
9898
* Intel VGA adapter, the subcomponent is SW Proxy
99-
* and the parent of MEI PCI and the parent of VGA are the same PCH device.
99+
* and the VGA is on the bus 0 reserved for built-in devices
100+
* to reject discrete GFX.
100101
*
101102
* @dev: master device
102103
* @subcomponent: subcomponent to match (I915_COMPONENT_SWPROXY)
@@ -123,7 +124,8 @@ static int mei_gsc_proxy_component_match(struct device *dev, int subcomponent,
123124
if (subcomponent != I915_COMPONENT_GSC_PROXY)
124125
return 0;
125126

126-
return component_compare_dev(dev->parent, ((struct device *)data)->parent);
127+
/* Only built-in GFX */
128+
return (pdev->bus->number == 0);
127129
}
128130

129131
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,
146148
}
147149

148150
component_match_add_typed(&cldev->dev, &master_match,
149-
mei_gsc_proxy_component_match, cldev->dev.parent);
151+
mei_gsc_proxy_component_match, NULL);
150152
if (IS_ERR_OR_NULL(master_match)) {
151153
ret = -ENOMEM;
152154
goto err_exit;

0 commit comments

Comments
 (0)