From: Laura Nao <laura.nao@collabora.com>
To: dakr@kernel.org
Cc: a.hindborg@kernel.org, acourbot@nvidia.com, airlied@gmail.com,
aliceryhl@google.com, bjorn3_gh@protonmail.com, boqun@kernel.org,
daniel.almeida@collabora.com, deborah.brouwer@collabora.com,
dri-devel@lists.freedesktop.org, gary@garyguo.net,
kernel@collabora.com, laura.nao@collabora.com,
linux-kernel@vger.kernel.org, lossin@kernel.org,
ojeda@kernel.org, rust-for-linux@vger.kernel.org,
simona@ffwll.ch, tamird@kernel.org, tmgross@umich.edu,
work@onurozkan.dev
Subject: Re: [PATCH v7 3/3] drm/tyr: add Job IRQ handling
Date: Thu, 26 Nov 2026 15:23:28 +0100 [thread overview]
Message-ID: <20261126142328.216740-1-laura.nao@collabora.com> (raw)
In-Reply-To: <DN548CRVXMGK.BOPO5J56Y1OH@kernel.org>
On 11/26/26 12:45, Danilo Krummrich wrote:
> 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.
Right, thanks for the suggestion. Will do.
Best,
Laura
prev parent reply other threads:[~2026-11-26 14:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 14:58 [PATCH v7 0/3] " 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
2026-11-26 14:23 ` Laura Nao [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=20261126142328.216740-1-laura.nao@collabora.com \
--to=laura.nao@collabora.com \
--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=dakr@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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®