From: "Danilo Krummrich" <dakr@kernel.org>
To: "Laura Nao" <laura.nao@collabora.com>
Cc: "Daniel Almeida" <daniel.almeida@collabora.com>,
"Alice Ryhl" <aliceryhl@google.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Tamir Duberstein" <tamird@kernel.org>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Onur Özkan" <work@onurozkan.dev>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
rust-for-linux@vger.kernel.org, kernel@collabora.com,
"Deborah Brouwer" <deborah.brouwer@collabora.com>
Subject: Re: [PATCH v7 3/3] drm/tyr: add Job IRQ handling
Date: Thu, 26 Nov 2026 12:45:33 +0100 [thread overview]
Message-ID: <DN548CRVXMGK.BOPO5J56Y1OH@kernel.org> (raw)
In-Reply-To: <20260728-tyr-irq-v2-v7-3-4e172e58e28c@collabora.com>
On Mon Nov 23, 2026 at 3:58 PM CET, Laura Nao wrote:
> +/// Requests a threaded IRQ registration for the Job IRQ.
> +///
> +/// # Safety
> +///
> +/// Callers must not `mem::forget()` the resulting registration or otherwise prevent its
> +/// [`Drop`] implementation from running.
> +pub(crate) unsafe fn job_irq_init<'a>(
> + pdev: &'a platform::Device<Bound>,
> + hw: Arc<HwGate<'a>>,
> + events: Arc<JobIrqEvents>,
> +) -> Result<Pin<KBox<TyrIrqRegistration<'a, JobIrq>>>> {
> + let job_irq = JobIrq { events };
> + // Ensure interrupt sources are disabled until the handler is registered.
> + job_irq.clear_mask(hw.access().iomem());
> +
> + // SAFETY: The caller guarantees the resulting registration will not be leaked.
> + unsafe { TyrIrqRegistration::request(pdev, c"job", job_irq, hw) }
> +}
You could implement a constructor in an impl TyrIrqRegistration<'a, JobIrq>
block instead, which is think is cleaner than a free standing function.
next prev parent reply other threads:[~2026-11-26 11:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 14:58 [PATCH v7 0/3] drm/tyr: add Job IRQ handling Laura Nao
2026-11-23 14:58 ` [PATCH v7 1/3] drm/tyr: add HwGate::try_access_atomic() Laura Nao
2026-11-23 18:13 ` Onur Özkan
2026-11-23 14:58 ` [PATCH v7 2/3] drm/tyr: add TyrIrq threaded IRQ wrapper Laura Nao
2026-11-24 17:54 ` Daniel Almeida
2026-11-26 11:21 ` Laura Nao
2026-11-26 11:41 ` Danilo Krummrich
2026-11-26 14:21 ` Laura Nao
2026-11-23 14:58 ` [PATCH v7 3/3] drm/tyr: add Job IRQ handling Laura Nao
2026-11-24 20:49 ` Daniel Almeida
2026-11-26 11:11 ` Laura Nao
2026-11-26 14:18 ` Laura Nao
2026-11-26 16:01 ` Danilo Krummrich
2026-11-26 11:45 ` Danilo Krummrich [this message]
2026-11-26 14:23 ` Laura Nao
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=DN548CRVXMGK.BOPO5J56Y1OH@kernel.org \
--to=dakr@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=deborah.brouwer@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--cc=kernel@collabora.com \
--cc=laura.nao@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.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.