From: sashiko-bot@kernel.org
To: "Laura Nao" <laura.nao@collabora.com>
Cc: ojeda@kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v4] drm/tyr: add Job IRQ handling
Date: Wed, 05 Aug 2026 15:03:36 +0000 [thread overview]
Message-ID: <20260805150337.474581F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260805-tyr-irq-v2-v4-1-81a4701611c0@collabora.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Missing interrupt mask teardown leaves the device asserting the physical IRQ line when the driver is unloaded, risking an IRQ storm on a shared line.
--
--- Patch [1]: [PATCH v4] drm/tyr: add Job IRQ handling ---
commit fd73c579108c1051f2238bc09dcd25149bcc3d3b
Author: Laura Nao <laura.nao@collabora.com>
drm/tyr: add Job IRQ handling
Add a threaded IRQ wrapper for Tyr interrupt sources and use it to handle
the firmware Job IRQ. A wait queue and a bool flag are added so the handler
can signal firmware readiness when the GLB bit is set.
> diff --git a/drivers/gpu/drm/tyr/driver.rs b/drivers/gpu/drm/tyr/driver.rs
> index bfb0ba19caff9..020df7c257355 100644
> --- a/drivers/gpu/drm/tyr/driver.rs
> +++ b/drivers/gpu/drm/tyr/driver.rs
[ ... ]
> +/// A threaded IRQ wrapper shared by all Tyr interrupt sources.
> +#[pin_data]
> +pub(crate) struct TyrIrq<T: TyrIrqTrait> {
> + /// The interrupt source.
> + irq: T,
> + #[pin]
> + _pin: PhantomPinned,
> +}
[Severity: High]
Does this wrapper need a Drop (or PinnedDrop) implementation to clean up the
interrupt mask?
If the registration is dropped (for example, during driver unbind or probe
failure), there doesn't seem to be a call to clear_mask(). Leaving the
interrupt unmasked while the handler is unregistered could cause an unhandled
IRQ storm if the device asserts the line. This might potentially cause the
kernel's IRQ core to permanently disable a shared IRQ line.
[ ... ]
> diff --git a/drivers/gpu/drm/tyr/fw/irq.rs b/drivers/gpu/drm/tyr/fw/irq.rs
> index 0000000000000..fcdc0097f2dde
> --- /dev/null
> +++ b/drivers/gpu/drm/tyr/fw/irq.rs
[ ... ]
> + // SAFETY: The caller guarantees the resulting registration will not be leaked.
> + let registration = unsafe { TyrIrq::request(pdev, c"job", job_irq) };
> +
> + // Unmask once the handler has been successfully registered.
> + Ok(registration?.pin_chain(|reg| {
> + reg.handler().irq().reenable_mask();
> + Ok(())
> + }))
> +}
[Severity: High]
Since the interrupt is explicitly unmasked here via reenable_mask() during
initialization, shouldn't there be a corresponding teardown step to mask it
again when the registration chain is dropped?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260805-tyr-irq-v2-v4-1-81a4701611c0@collabora.com?part=1
prev parent reply other threads:[~2026-08-05 15:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-05 14:33 [PATCH v4] drm/tyr: add Job IRQ handling Laura Nao
2026-08-05 15:03 ` sashiko-bot [this message]
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=20260805150337.474581F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=laura.nao@collabora.com \
--cc=ojeda@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.