From: Raag Jadav <raag.jadav@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: heikki.krogerus@linux.intel.com, andi.shyti@linux.intel.com,
rodrigo.vivi@intel.com, matthew.d.roper@intel.com,
Raag Jadav <raag.jadav@intel.com>
Subject: [PATCH v1] drm/xe/i2c: Assert/Deassert I2C IRQ
Date: Fri, 13 Mar 2026 13:34:38 +0530 [thread overview]
Message-ID: <20260313080438.4166251-1-raag.jadav@intel.com> (raw)
I2C IRQ is triggered using virtual wire. Assert/Deassert it in IRQ
handler to allow subsequent interrupt generation.
Signed-off-by: Raag Jadav <raag.jadav@intel.com>
---
drivers/gpu/drm/xe/xe_i2c.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_i2c.c b/drivers/gpu/drm/xe/xe_i2c.c
index 1deb812fe01d..706783863d07 100644
--- a/drivers/gpu/drm/xe/xe_i2c.c
+++ b/drivers/gpu/drm/xe/xe_i2c.c
@@ -176,11 +176,18 @@ static bool xe_i2c_irq_present(struct xe_device *xe)
*/
void xe_i2c_irq_handler(struct xe_device *xe, u32 master_ctl)
{
- if (!xe_i2c_irq_present(xe))
+ struct xe_mmio *mmio = xe_root_tile_mmio(xe);
+
+ if (!(master_ctl & I2C_IRQ) || !xe_i2c_irq_present(xe))
return;
- if (master_ctl & I2C_IRQ)
- generic_handle_irq_safe(xe->i2c->adapter_irq);
+ /* Forward interrupt to I2C adapter */
+ generic_handle_irq_safe(xe->i2c->adapter_irq);
+
+ /* Deassert after I2C adapter clears the interrupt */
+ xe_mmio_rmw32(mmio, I2C_CONFIG_CMD, 0, PCI_COMMAND_INTX_DISABLE);
+ /* Reassert to allow subsequent interrupt generation */
+ xe_mmio_rmw32(mmio, I2C_CONFIG_CMD, PCI_COMMAND_INTX_DISABLE, 0);
}
void xe_i2c_irq_reset(struct xe_device *xe)
@@ -190,6 +197,7 @@ void xe_i2c_irq_reset(struct xe_device *xe)
if (!xe_i2c_irq_present(xe))
return;
+ xe_mmio_rmw32(mmio, I2C_CONFIG_CMD, 0, PCI_COMMAND_INTX_DISABLE);
xe_mmio_rmw32(mmio, I2C_BRIDGE_PCICFGCTL, ACPI_INTR_EN, 0);
}
@@ -201,6 +209,7 @@ void xe_i2c_irq_postinstall(struct xe_device *xe)
return;
xe_mmio_rmw32(mmio, I2C_BRIDGE_PCICFGCTL, 0, ACPI_INTR_EN);
+ xe_mmio_rmw32(mmio, I2C_CONFIG_CMD, PCI_COMMAND_INTX_DISABLE, 0);
}
static int xe_i2c_irq_map(struct irq_domain *h, unsigned int virq,
--
2.43.0
next reply other threads:[~2026-03-13 8:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 8:04 Raag Jadav [this message]
2026-03-13 8:14 ` ✓ CI.KUnit: success for drm/xe/i2c: Assert/Deassert I2C IRQ Patchwork
2026-03-13 8:55 ` [PATCH v1] " Heikki Krogerus
2026-03-13 9:00 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-03-14 10:15 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-03-14 18:23 ` Raag Jadav
2026-03-16 14:39 ` Matt Roper
2026-03-17 17:16 ` [PATCH v1] " Andi Shyti
2026-03-18 11:30 ` Heikki Krogerus
2026-03-23 7:56 ` Raag Jadav
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260313080438.4166251-1-raag.jadav@intel.com \
--to=raag.jadav@intel.com \
--cc=andi.shyti@linux.intel.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
--cc=rodrigo.vivi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox