Re: [PATCH] rust: drm: enable standard fdinfo for Rust drivers

From: Gary Guo

Date: Tue Nov 24 2026 - 09:28:56 EST


On Thu Nov 19, 2026 at 9:48 AM GMT, Peder Bergan via B4 Relay wrote:
> From: Peder Bergan <peder.bergan@xxxxxxxxx>
>
> DRM monitoring tools use drm-driver and drm-client-id in procfs fdinfo
> to identify DRM clients. The common Rust DRM file operations leave
> show_fdinfo unset, so these entries are missing for those clients.
>
> Set show_fdinfo to drm_show_fdinfo. The DRM core helper emits the
> standard client information and calls the separate driver statistics
> hook if the driver provides one.
>
> Fixes: c284d3e42338 ("rust: drm: gem: Add GEM object abstraction")
> Closes: https://github.com/Rust-for-Linux/linux/issues/1266
> Signed-off-by: Peder Bergan <peder.bergan@xxxxxxxxx>

Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>

I agree with Janne that the "Fixes" tag is not warranted.

Best,
Gary

> ---
> Matt Mireles reported the missing fdinfo fields on an Asahi kernel and
> suggested using this helper.
>
> The x86-64 LLVM=1 CLIPPY=1 build adds the drm_show_fdinfo callback to
> nova-drm.ko's file operations table.
>
> The pending move of the file operations into drm::device [1] should
> carry this assignment into UnregisteredDevice::FOPS.
>
> [1] https://lore.kernel.org/dri-devel/20261118163203.2483856-4-dakr@xxxxxxxxxx/
>
> OpenAI Codex assisted with coding and testing.
> ---
> rust/kernel/drm/gem/mod.rs | 1 +
> 1 file changed, 1 insertion(+)