[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240501185047.3126832-1-adrian.larumbe@collabora.com>
Date: Wed, 1 May 2024 19:50:42 +0100
From: Adrián Larumbe <adrian.larumbe@...labora.com>
To: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>
Cc: kernel@...labora.com,
Adrian Larumbe <adrian.larumbe@...labora.com>,
dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v2 0/1] drm: Add ioctl for querying a DRM device's list of open client PIDs
This is v2 of the patch being discussed at
https://lore.kernel.org/dri-devel/20240403182951.724488-1-adrian.larumbe@collabora.com/
In the original patch, a DRM device sysfs attribute file was chosen as the
interface for fetching the list of active client PIDs.
That came with a hosts of problems:
- Normal device attributes can only send back up to a page worth of data, which might
be not enough if many clients are opening the DRM device.
- The binary attribute interface is meant for immutable virtual files, but the list of
active PIDs can grow and shrink between successive calls of show().
This led me to believe sysfs is not the right tool for the job, so switched over
to a custom DRM ioctl that does the same thing.
In order to test this patch, one can use WIP branches for both libdrm and igt at:
https://gitlab.freedesktop.org/larumbe/igt-gpu-tools/-/tree/drm-clients-ioctl?ref_type=heads
https://gitlab.freedesktop.org/larumbe/drm/-/tree/drm-clients-ioctl?ref_type=heads
I've only tested it with gputop, but intel-gputop should work also.
Adrián Larumbe (1):
drm: Add ioctl for querying a DRM device's list of open client PIDs
drivers/gpu/drm/drm_internal.h | 1 +
drivers/gpu/drm/drm_ioctl.c | 89 ++++++++++++++++++++++++++++++++++
include/uapi/drm/drm.h | 7 +++
3 files changed, 97 insertions(+)
--
2.44.0
Powered by blists - more mailing lists