summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorGurchetan Singh <gurchetansingh@chromium.org>2023-10-18 21:17:27 +0300
committerDmitry Osipenko <dmitry.osipenko@collabora.com>2023-11-11 21:31:00 +0300
commit7add80126bcedddd157ddc09988b032c93ed56c7 (patch)
tree96df319acd21110da1d93d61c8108c013f14e793 /include/drm
parente4178256094a76cc36d9b9aabe7482615959b26f (diff)
downloadlinux-7add80126bcedddd157ddc09988b032c93ed56c7.tar.xz
drm/uapi: add explicit virtgpu context debug name
There are two problems with the current method of determining the virtio-gpu debug name. 1) TASK_COMM_LEN is defined to be 16 bytes only, and this is a Linux kernel idiom (see PR_SET_NAME + PR_GET_NAME). Though, Android/FreeBSD get around this via setprogname(..)/getprogname(..) in libc. On Android, names longer than 16 bytes are common. For example, one often encounters a program like "com.android.systemui". The virtio-gpu spec allows the debug name to be up to 64 bytes, so ideally userspace should be able to set debug names up to 64 bytes. 2) The current implementation determines the debug name using whatever task initiated virtgpu. This is could be a "RenderThread" of a larger program, when we actually want to propagate the debug name of the program. To fix these issues, add a new CONTEXT_INIT param that allows userspace to set the debug name when creating a context. It takes a null-terminated C-string as the param value. The length of the string (excluding the terminator) **should** be <= 64 bytes. Otherwise, the debug_name will be truncated to 64 bytes. Link to open-source userspace: https://android-review.googlesource.com/c/platform/hardware/google/gfxstream/+/2787176 Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Josh Simonot <josh.simonot@gmail.com> Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231018181727.772-2-gurchetansingh@chromium.org
Diffstat (limited to 'include/drm')
0 files changed, 0 insertions, 0 deletions