Re: [PATCH] rust: drm: enable standard fdinfo for Rust drivers
From: Janne Grunau
Date: Tue Nov 24 2026 - 08:39:59 EST
On Thu, Nov 19, 2026 at 10:48:47AM +0100, 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.
None of the drivers (upstream and out of tree) set
drm_driver.show_fdinfo though as they can't yet so only drm-driver and
drm-client-id will be printed.
I guess this is ok and if a driver wants or needs opt-out of
`show_fdinfo` it can be made optional then. Note that most C drivers
don't set this either only the main GPU drivers and a few npu drivers.
Tested on Apple silicon system with the Asahi downstream driver.
Tested-by: Janne Grunau <j@xxxxxxxxxx>
Reviewed-by: Janne Grunau <j@xxxxxxxxxx>
> Fixes: c284d3e42338 ("rust: drm: gem: Add GEM object abstraction")
I don't think the Fixes: tag is justified. This is an optional callback
and the majority of C drivers (in numbers) don't set it. Even if it sets
it won't provide much useful information for any existing Rust driver.
thanks,
Janne