Re: [PATCH v2 8/9] drm/tyr: add gpuvas debugfs file
"Danilo Krummrich" <[email protected]> Mon, 03 Aug 2026 19:56:30 +0200
| Newsgroups | org.kernel.vger.rust-for-linux,dev.linux.lists.driver-core,org.freedesktop.lists.dri-devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu Jul 30, 2026 at 7:05 PM CEST, Alvin Sun wrote:
> +impl drm::debugfs::DrmSeqShow<TyrDrmDriver> for GpuvasShow {
> + fn show(guard: &drm::RegistrationGuard<'_, TyrDrmDriver>, m: &seq_fi=
le::SeqFile) -> Result {
> + guard.registration_data_with(|reg_data| {
> + reg_data
> + .debugfs_data
> + .gpuvas
> + .for_each(|vm| vm.dump_gpuva_info(m))
> + })
> + }
> +}
Should simplify to:
impl SeqShow<TyrDrmRegistrationData<'_>> for GpuvasShow {
fn show(reg_data: &TyrDrmRegistrationData<'_>, m: &SeqFile) -> Result =
{
reg_data
.debugfs_data
.gpuvas
.for_each(|vm| vm.dump_gpuva_info(m))
}
}
> + fn debugfs_init<'a>(dev: &'a drm::Device<Self, drm::Normal>, dir: &S=
copedDir<'a, 'static>) {
> + dir.seq_file::<GpuvasShow, _>(c"gpuvas", dev);
> + }
Should become:
fn debugfs_init(dir: &debugfs::ScopeRef<'_, TyrDrmRegistrationData<'_>>) {
dir.seq_file::<GpuvasShow>(c"gpuvas");
}