summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Laguna <lukasz.laguna@intel.com>2025-07-17 17:54:20 +0200
committerRodrigo Vivi <rodrigo.vivi@intel.com>2025-07-28 10:22:33 -0400
commitcccb918e0231fefba059f049acced18760242136 (patch)
tree0ddc01567cd9da0ad52337bd1693c6f3f994f450
parentdc94168eaa6f6f2476c4e1a894bd8d031df6226d (diff)
drm/xe/vf: Don't register I2C devices if VF
VF drivers can't access I2C devices, so skip their registration when running as VF. Signed-off-by: Lukasz Laguna <lukasz.laguna@intel.com> Fixes: f0e53aadd702 ("drm/xe: Support for I2C attached MCUs") Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://lore.kernel.org/r/20250717155420.25298-1-lukasz.laguna@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> (cherry picked from commit 9a220e065914b67b55d3d0ab91c3e215742fdd73) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
-rw-r--r--drivers/gpu/drm/xe/xe_i2c.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_i2c.c b/drivers/gpu/drm/xe/xe_i2c.c
index 1f19718db559..bc7dc2099470 100644
--- a/drivers/gpu/drm/xe/xe_i2c.c
+++ b/drivers/gpu/drm/xe/xe_i2c.c
@@ -283,6 +283,9 @@ int xe_i2c_probe(struct xe_device *xe)
if (xe->info.platform != XE_BATTLEMAGE)
return 0;
+ if (IS_SRIOV_VF(xe))
+ return 0;
+
xe_i2c_read_endpoint(xe_root_tile_mmio(xe), &ep);
if (ep.cookie != XE_I2C_EP_COOKIE_DEVICE)
return 0;