From: Alvin Sun <alvin.sun@linux.dev>
To: Danilo Krummrich <dakr@kernel.org>
Cc: "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>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Sumit Semwal" <sumit.semwal@linaro.org>,
"Christian König" <christian.koenig@amd.com>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
rust-for-linux@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 11/13] drm/tyr: add debugfs infrastructure
Date: Mon, 25 May 2026 11:08:53 +0800 [thread overview]
Message-ID: <dd9e2238-5c65-48e5-914a-8b8eb3b02fc5@linux.dev> (raw)
In-Reply-To: <DILPYDI01YFS.2NPFG6ZG085PP@kernel.org>
On 5/18/26 18:09, Danilo Krummrich wrote:
> On Thu Mar 26, 2026 at 7:53 AM CET, Alvin Sun wrote:
>> +#[pin_data]
>> +struct TyrModule {
>> + _debugfs_root: HazPtrRevokeHandle<'static, kernel::debugfs::Dir>,
>> + #[pin]
>> + _driver: Registration<platform::Adapter<TyrPlatformDriverData>>,
>> +}
>> +
>> +impl InPlaceModule for TyrModule {
>> + fn init(module: &'static kernel::ThisModule) -> impl PinInit<Self, error::Error> {
>> + let dir = kernel::debugfs::Dir::new(kernel::c_str!("tyr"));
> Why does Tyr need its own debugfs directory to expose DRM data structures? DRM
> already has a common debugfs directory per DRM device in /sys/kernel/debug/dri/,
> which you should attach to instead if you want to expose driver specific files.
Hi Danilo,
Sorry for the late reply, I was busy with the fops owner patch series
last week.
Thank you for the detailed review and suggestions. I've reworked the
implementation based on your feedback:
- Instead of creating a separate tyr debugfs directory, the code
now hooks into the DRM core's per-device debugfs root under
/sys/kernel/debug/dri/ via a debugfs_init callback.
- The duplicated show_vm() code is eliminated — the gpuvas file now
reuses the existing drm_debugfs_gpuva_info() through a safe Rust
wrapper, rather than re-implementing the VA space dump.
Note that the GEM debugfs interface is not yet implemented — I'd like
to get your feedback on the overall approach first before continuing
with that part.
Please review the updated series [1] and let me know your thoughts.
[1]
https://gitlab.freedesktop.org/alvinsun039/linux/-/commits/tyr-debugfs-v2
Best regards,
Alvin
next prev parent reply other threads:[~2026-05-25 3:09 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 6:52 [PATCH 00/13] drm/tyr: add debugfs support Alvin Sun
2026-03-26 6:52 ` [PATCH 01/13] rust: sync: support [pin_]init for `SetOnce` Alvin Sun
2026-05-13 22:45 ` [01/13] " lyude
2026-03-26 6:52 ` [PATCH 02/13] rust: revocable: add lazily instantiated revocable variant Alvin Sun
2026-03-26 6:52 ` [PATCH 03/13] rust: sync: set_once: Rename InitError variants to fix clippy warning Alvin Sun
2026-03-26 14:40 ` Gary Guo
2026-03-27 6:07 ` Alvin Sun
2026-03-26 16:35 ` Miguel Ojeda
2026-03-27 6:13 ` Alvin Sun
2026-03-26 6:52 ` [PATCH 04/13] rust: sync: add hazard pointer abstraction Alvin Sun
2026-03-26 6:52 ` [PATCH 05/13] rust: revocable: add HazPtrRevocable Alvin Sun
2026-03-26 6:52 ` [PATCH 06/13] rust: revocable: make LazyRevocable use HazPtrRevocable Alvin Sun
2026-03-26 6:53 ` [PATCH 07/13] rust: drm: add Device::primary_index() Alvin Sun
2026-03-26 6:53 ` [PATCH 08/13] rust: drm/gem: add GEM object query helpers for debugfs Alvin Sun
2026-05-13 23:20 ` Danilo Krummrich
2026-05-18 7:39 ` Alvin Sun
2026-05-18 10:06 ` Danilo Krummrich
2026-03-26 6:53 ` [PATCH 09/13] rust: drm/gem/shmem: add resident_size() and madv() " Alvin Sun
2026-03-26 6:53 ` [PATCH 10/13] drm/tyr: expose Vm gpuvm_core, gpuvm and va_range as pub(crate) Alvin Sun
2026-03-26 6:53 ` [PATCH 11/13] drm/tyr: add debugfs infrastructure Alvin Sun
2026-05-18 10:09 ` Danilo Krummrich
2026-05-25 3:08 ` Alvin Sun [this message]
2026-03-26 6:53 ` [PATCH 12/13] drm/tyr: add vms and gpuvas debugfs interface Alvin Sun
2026-05-18 10:10 ` Danilo Krummrich
2026-03-26 6:53 ` [PATCH 13/13] drm/tyr: add gems field and gems " Alvin Sun
2026-03-26 14:32 ` [PATCH 00/13] drm/tyr: add debugfs support Boqun Feng
2026-03-27 6:18 ` Alvin Sun
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=dd9e2238-5c65-48e5-914a-8b8eb3b02fc5@linux.dev \
--to=alvin.sun@linux.dev \
--cc=a.hindborg@kernel.org \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=christian.koenig@amd.com \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=sumit.semwal@linaro.org \
--cc=tmgross@umich.edu \
/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