]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe/i2c: Force polling mode in survivability
authorRaag Jadav <raag.jadav@intel.com>
Mon, 5 Jan 2026 08:07:50 +0000 (13:37 +0530)
committerMatt Roper <matthew.d.roper@intel.com>
Mon, 5 Jan 2026 15:43:22 +0000 (07:43 -0800)
SGUnit interrupts are not initialized in survivability. Force I2C
controller to polling mode while in survivability.

v2: Use helper function instead of manual check (Riana)

Signed-off-by: Raag Jadav <raag.jadav@intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://patch.msgid.link/20260105080750.16605-1-raag.jadav@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
drivers/gpu/drm/xe/xe_i2c.c
drivers/gpu/drm/xe/xe_survivability_mode.c

index 8eccbae05705eece09bf6f705db4bc4a20d90207..befc77e46eae4eb97e676f7b0a8ee7b05dac5fce 100644 (file)
@@ -31,6 +31,7 @@
 #include "xe_i2c.h"
 #include "xe_mmio.h"
 #include "xe_platform_types.h"
+#include "xe_survivability_mode.h"
 
 /**
  * DOC: Xe I2C devices
@@ -213,11 +214,13 @@ static const struct irq_domain_ops xe_i2c_irq_ops = {
        .map = xe_i2c_irq_map,
 };
 
-static int xe_i2c_create_irq(struct xe_i2c *i2c)
+static int xe_i2c_create_irq(struct xe_device *xe)
 {
+       struct xe_i2c *i2c = xe->i2c;
        struct irq_domain *domain;
 
-       if (!(i2c->ep.capabilities & XE_I2C_EP_CAP_IRQ))
+       if (!(i2c->ep.capabilities & XE_I2C_EP_CAP_IRQ) ||
+           xe_survivability_mode_is_boot_enabled(xe))
                return 0;
 
        domain = irq_domain_create_linear(dev_fwnode(i2c->drm_dev), 1, &xe_i2c_irq_ops, NULL);
@@ -351,7 +354,7 @@ int xe_i2c_probe(struct xe_device *xe)
        if (ret)
                return ret;
 
-       ret = xe_i2c_create_irq(i2c);
+       ret = xe_i2c_create_irq(xe);
        if (ret)
                goto err_unregister_notifier;
 
index 4c716182ad3b3ac5c9ac71673b0bebb770406205..31456f432fc8036032dbca685e19964e52653cf1 100644 (file)
@@ -321,7 +321,7 @@ static int enable_boot_survivability_mode(struct pci_dev *pdev)
        if (ret)
                return ret;
 
-       /* Make sure xe_heci_gsc_init() knows about survivability mode */
+       /* Make sure xe_heci_gsc_init() and xe_i2c_probe() are aware of survivability */
        survivability->mode = true;
 
        xe_heci_gsc_init(xe);