mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Laura Nao <laura.nao@collabora.com>
To: "Danilo Krummrich" <dakr@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Daniel Almeida" <daniel.almeida@collabora.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>,
	"FUJITA Tomonori" <fujita.tomonori@gmail.com>,
	"Frederic Weisbecker" <frederic@kernel.org>,
	"Lyude Paul" <lyude@redhat.com>,
	"Thomas Gleixner" <tglx@kernel.org>,
	"Anna-Maria Behnsen" <anna-maria@linutronix.de>,
	"John Stultz" <jstultz@google.com>,
	"Stephen Boyd" <sboyd@kernel.org>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	 driver-core@lists.linux.dev, rust-for-linux@vger.kernel.org,
	 kernel@collabora.com, Laura Nao <laura.nao@collabora.com>,
	 Deborah Brouwer <deborah.brouwer@collabora.com>,
	 Boris Brezillon <boris.brezillon@collabora.com>
Subject: [PATCH 0/9] drm/tyr: add CSF firmware interface support
Date: Tue, 15 Sep 2026 12:57:33 +0200	[thread overview]
Message-ID: <20260915-tyr-interfaces-v1-0-5d28f1f75aca@collabora.com> (raw)

This series follows up to [1], which adds support for firmware loading
and MCU booting to the Tyr driver. The changes included here were
originally introduced in its v4, then dropped to reduce the scope of
the series, and have been adjusted to work with the HRT (Higher-Ranked
Lifetime Types) driver architecture and I/O projections support recently 
introduced.

The series adds support for the Command Stream Frontend (CSF) firmware
interfaces, enabling communication between the Tyr driver and the MCU
through shared memory.

The firmware binary is first validated to contain the shared section
used for this communication. Firmware sections that need CPU access get
a persistent CPU mapping alongside their GPU mapping, kept for the
lifetime of the driver in the case of the shared section. This is the
foundation for resolving firmware-reported MCU virtual addresses into
validated views of the shared section: addresses are represented with a
dedicated McuVa type nd are resolved into bound-checked and
alignment-checked views. Read-only blocks (control, output) use a freely
cloneable view, while writable blocks (input) use a view that takes an
exclusive claim on its byte range, removing the need for locking around
the interface state.

The global (GLB), command stream group (CSG), and command stream (CS)
interfaces are implemented on top of this, providing access to the
firmware control, input, and output blocks and allowing discovery of the
available CSGs and CSs at runtime. The interface is versioned:
GLB_VERSION is read once at probe time to select the layout matching the
firmware's generation.

The global interface is initialized and programmed during probe and its
readiness is notified through the Job IRQ.

A safe wrapper for arch_timer_get_rate() is also added for programming
the GLB timers, and the CONFIG_64BIT restriction on system memory u64
accesses is dropped so the register bitfields used by these interfaces
work on 32-bit too.

This series is based on drm-rust-next and depends on:
- [PATCH v6 0/2] drm/tyr: add Job IRQ handling [2] and its dependencies

[1] https://lore.kernel.org/all/20260728-fw-boot-b4-v10-0-9187aefa3f2f@collabora.com/
[2] https://lore.kernel.org/all/20260728-tyr-irq-v2-v6-0-15c90baed949@collabora.com/

Signed-off-by: Laura Nao <laura.nao@collabora.com>
---
Daniel Almeida (2):
      drm/tyr: add MappedBo, a kernel BO with an always-valid CPU mapping
      drm/tyr: add McuVa and claim-checked MappedBo views

Deborah Brouwer (2):
      drm/tyr: validate presence of CSF shared section
      rust: time: add arch_timer_get_rate wrapper

Laura Nao (5):
      rust: io: drop the CONFIG_64BIT restriction on system memory u64 access
      drm/tyr: drop unused KernelBo::bo() function
      drm/tyr: add CSF firmware interface support
      drm/tyr: program CSF global interface
      drm/tyr: wait for global interface readiness

 drivers/gpu/drm/tyr/driver.rs               |   33 +-
 drivers/gpu/drm/tyr/fw.rs                   |  148 ++-
 drivers/gpu/drm/tyr/fw/interfaces.rs        | 1524 +++++++++++++++++++++++++++
 drivers/gpu/drm/tyr/fw/interfaces/layout.rs |  152 +++
 drivers/gpu/drm/tyr/fw/interfaces/v1.rs     | 1230 +++++++++++++++++++++
 drivers/gpu/drm/tyr/fw/irq.rs               |    1 -
 drivers/gpu/drm/tyr/fw/parser.rs            |   14 +
 drivers/gpu/drm/tyr/gem.rs                  |  334 +++++-
 rust/helpers/time.c                         |    6 +
 rust/kernel/io.rs                           |    4 +-
 rust/kernel/time.rs                         |   30 +
 11 files changed, 3432 insertions(+), 44 deletions(-)
---
base-commit: d1aec98b17f6ee395097b08ccb03c16d725d4ed1
change-id: 20260901-tyr-interfaces-3dd510152348

Best regards,
-- 
Laura Nao <laura.nao@collabora.com>


             reply	other threads:[~2026-09-15 10:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 10:57 Laura Nao [this message]
2026-09-15 10:57 ` [PATCH 1/9] drm/tyr: validate presence of CSF shared section Laura Nao
2026-09-15 10:57 ` [PATCH 2/9] rust: io: drop the CONFIG_64BIT restriction on system memory u64 access Laura Nao
2026-09-15 11:18   ` Gary Guo
2026-09-15 10:57 ` [PATCH 3/9] drm/tyr: add MappedBo, a kernel BO with an always-valid CPU mapping Laura Nao
2026-09-15 10:57 ` [PATCH 4/9] drm/tyr: add McuVa and claim-checked MappedBo views Laura Nao
2026-09-15 10:57 ` [PATCH 5/9] drm/tyr: drop unused KernelBo::bo() function Laura Nao
2026-09-15 10:57 ` [PATCH 6/9] drm/tyr: add CSF firmware interface support Laura Nao
2026-09-15 10:57 ` [PATCH 7/9] rust: time: add arch_timer_get_rate wrapper Laura Nao
2026-09-15 10:57 ` [PATCH 8/9] drm/tyr: program CSF global interface Laura Nao
2026-09-15 10:57 ` [PATCH 9/9] drm/tyr: wait for global interface readiness 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=20260915-tyr-interfaces-v1-0-5d28f1f75aca@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=anna-maria@linutronix.de \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=boris.brezillon@collabora.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=deborah.brouwer@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=driver-core@lists.linux.dev \
    --cc=frederic@kernel.org \
    --cc=fujita.tomonori@gmail.com \
    --cc=gary@garyguo.net \
    --cc=jstultz@google.com \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=lyude@redhat.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=sboyd@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tamird@kernel.org \
    --cc=tglx@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®