public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Deborah Brouwer <deborah.brouwer@collabora.com>
To: dri-devel@lists.freedesktop.org, rust-for-linux@vger.kernel.org,
	Boqun Feng <boqun@kernel.org>
Cc: Danilo Krummrich <dakr@kernel.org>,
	Alice Ryhl <aliceryhl@google.com>,
	Daniel Almeida <daniel.almeida@collabora.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Miguel Ojeda <ojeda@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>,
	Steven Price <steven.price@arm.com>,
	Boris Brezillon <boris.brezillon@collabora.com>,
	Dirk Behme <dirk.behme@gmail.com>,
	Alexandre Courbot <acourbot@nvidia.com>,
	Deborah Brouwer <deborah.brouwer@collabora.com>,
	Boqun Feng <boqun@kernel.org>
Subject: [PATCH v5 0/6] drm/tyr: Use register! macro
Date: Thu, 09 Apr 2026 10:51:23 -0700	[thread overview]
Message-ID: <20260409-b4-tyr-use-register-macro-v5-v5-0-8abfff8a0204@collabora.com> (raw)

This series changes the Tyr driver to use the kernel's register! macro
for hardware register access, replacing manual bit manipulation and custom
register structures with a more type-safe and maintainable approach.

---
Changes in v5:
- All 1-bit glb fields use => bool.
- Convert gpu_info_log to a method of GpuInfo to avoid redundant MMIO reads.
- Fix typo in the field name for SHADER_PWRTRANS_HI.
- Add details to all commit messages.

- Link to v4: https://lore.kernel.org/r/20260402-tyr-use-register-macro-v4-v4-0-96a8d42f8bd1@collabora.com

This series applies on drm-rust-next
tag: drm-rust-next-2026-04-06
base commit: a7a080bb4236

Changes in v4:
 - Add PartialEq to all enums so they can be used in comparisons.
 - Replace u64 registers with u32 LO/HI pairs and helper functions to read them.
 - Combine all MMU register definitions into one patch.
 - Drop [PATCH v3 03/12] drm/tyr: Set interconnect coherency during probe
   to avoid possible leaks/data corruption.
 - Pick up Ab, Rb tags

 - Link to v3: https://lore.kernel.org/r/20260323-b4-tyr-use-register-macro-v3-v3-0-a87daf9e4701@collabora.com

Changes in v3:
 - Update write_val() with write_reg() from API change.
 - Replace const values with enums and use => ?=> syntax.
 - Convert 1-bit fields to bool.
 - Change module visibility from pub(super) to pub(crate).
 - Add new commits to define mmu address registers.
 - Add new commit exposing hardware DOORBELLS.
 - Pick up Reviewed-by tags.

 There are also change logs per patch.

 - Link to v2: https://lore.kernel.org/r/20260311-b4-tyr-use-register-macro-v2-v2-0-b936d9eb8f51@collabora.com

Changes in v2:
 - Rebase on v8 of register! macro series;
 - Add documentation;
 - Remove manual functions to get address bits;
 - Revise gpu_info() to use macro;
 - Remove manual functions to get address bits;
 - Revise gpu_info() to use macro;
 - Revise l2_power_on() to use macro;
 - Set interconnect coherency protocol with macro;
 - Separate commits for each register page;
 - Replace HI/LO pairs with 64bit registers
 - Order registers by address;
 - Remove doorbell clear field from GPU_IRQ_CLEAR;
 - GPU command is redesigned to accommodate multiple layouts;
 - MMU register bits corrected;
 - Use UPPERCASE for register names;
 - Move the consts to impl block for registers;

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>

---
Daniel Almeida (1):
      drm/tyr: Use register! macro for GPU_CONTROL

Deborah Brouwer (5):
      drm/tyr: Print GPU_ID without filtering
      drm/tyr: Use register! macro for JOB_CONTROL
      drm/tyr: Use register! macro for MMU_CONTROL
      drm/tyr: Remove custom register struct
      drm/tyr: Add DOORBELL_BLOCK registers

 drivers/gpu/drm/tyr/driver.rs |   19 +-
 drivers/gpu/drm/tyr/gpu.rs    |  175 ++---
 drivers/gpu/drm/tyr/regs.rs   | 1744 ++++++++++++++++++++++++++++++++++++++---
 3 files changed, 1723 insertions(+), 215 deletions(-)
---
base-commit: a7a080bb4236ebe577b6776d940d1717912ff6dd
change-id: 20260409-b4-tyr-use-register-macro-v5-f836fd1d8a68

Best regards,
-- 
Deborah Brouwer <deborah.brouwer@collabora.com>


             reply	other threads:[~2026-04-09 17:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-09 17:51 Deborah Brouwer [this message]
2026-04-09 17:51 ` [PATCH v5 1/6] drm/tyr: Use register! macro for GPU_CONTROL Deborah Brouwer
2026-04-12  0:45   ` Claude review: " Claude Code Review Bot
2026-04-09 17:51 ` [PATCH v5 2/6] drm/tyr: Print GPU_ID without filtering Deborah Brouwer
2026-04-12  0:45   ` Claude review: " Claude Code Review Bot
2026-04-09 17:51 ` [PATCH v5 3/6] drm/tyr: Use register! macro for JOB_CONTROL Deborah Brouwer
2026-04-12  0:45   ` Claude review: " Claude Code Review Bot
2026-04-09 17:51 ` [PATCH v5 4/6] drm/tyr: Use register! macro for MMU_CONTROL Deborah Brouwer
2026-04-12  0:45   ` Claude review: " Claude Code Review Bot
2026-04-09 17:51 ` [PATCH v5 5/6] drm/tyr: Remove custom register struct Deborah Brouwer
2026-04-12  0:45   ` Claude review: " Claude Code Review Bot
2026-04-09 17:51 ` [PATCH v5 6/6] drm/tyr: Add DOORBELL_BLOCK registers Deborah Brouwer
2026-04-12  0:45   ` Claude review: " Claude Code Review Bot
2026-04-12  0:45 ` Claude review: drm/tyr: Use register! macro Claude Code Review Bot

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=20260409-b4-tyr-use-register-macro-v5-v5-0-8abfff8a0204@collabora.com \
    --to=deborah.brouwer@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=boris.brezillon@collabora.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=dirk.behme@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gary@garyguo.net \
    --cc=lossin@kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=simona@ffwll.ch \
    --cc=steven.price@arm.com \
    --cc=tmgross@umich.edu \
    --cc=tzimmermann@suse.de \
    /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