From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Raag Jadav <raag.jadav@intel.com>
Cc: intel-xe@lists.freedesktop.org, andi.shyti@linux.intel.com,
rodrigo.vivi@intel.com, matthew.d.roper@intel.com
Subject: Re: [PATCH v1] drm/xe/i2c: Assert/Deassert I2C IRQ
Date: Wed, 18 Mar 2026 13:30:29 +0200 [thread overview]
Message-ID: <abqM1X6B4blCKukO@kuha> (raw)
In-Reply-To: <20260313080438.4166251-1-raag.jadav@intel.com>
Hi Raag,
Fri, Mar 13, 2026 at 01:34:38PM +0530, Raag Jadav wrote:
> 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);
Do we need to do this always, or only with the SMBus Alerts?
thanks,
--
heikki
next prev parent reply other threads:[~2026-03-18 11:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 8:04 [PATCH v1] drm/xe/i2c: Assert/Deassert I2C IRQ Raag Jadav
2026-03-13 8:14 ` ✓ CI.KUnit: success for " 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 [this message]
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=abqM1X6B4blCKukO@kuha \
--to=heikki.krogerus@linux.intel.com \
--cc=andi.shyti@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
--cc=raag.jadav@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.