<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 31, 2023 at 8:55 AM Gurchetan Singh <<a href="mailto:gurchetansingh@chromium.org" target="_blank">gurchetansingh@chromium.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Oct 22, 2023 at 4:50 PM Dmitry Osipenko <<a href="mailto:dmitry.osipenko@collabora.com" target="_blank">dmitry.osipenko@collabora.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 10/18/23 21:17, Gurchetan Singh wrote:<br>
> There are two problems with the current method of determining the<br>
> virtio-gpu debug name.<br>
> <br>
> 1) TASK_COMM_LEN is defined to be 16 bytes only, and this is a<br>
>    Linux kernel idiom (see PR_SET_NAME + PR_GET_NAME). Though,<br>
>    Android/FreeBSD get around this via setprogname(..)/getprogname(..)<br>
>    in libc.<br>
> <br>
>    On Android, names longer than 16 bytes are common.  For example,<br>
>    one often encounters a program like "com.android.systemui".<br>
> <br>
>    The virtio-gpu spec allows the debug name to be up to 64 bytes, so<br>
>    ideally userspace should be able to set debug names up to 64 bytes.<br>
> <br>
> 2) The current implementation determines the debug name using whatever<br>
>    task initiated virtgpu.  This is could be a "RenderThread" of a<br>
>    larger program, when we actually want to propagate the debug name<br>
>    of the program.<br>
> <br>
> To fix these issues, add a new CONTEXT_INIT param that allows userspace<br>
> to set the debug name when creating a context.<br>
> <br>
> It takes a null-terminated C-string as the param value. The length of the<br>
> string (excluding the terminator) **should** be <= 64 bytes.  Otherwise,<br>
> the debug_name will be truncated to 64 bytes.<br>
> <br>
> Link to open-source userspace:<br>
> <a href="https://android-review.googlesource.com/c/platform/hardware/google/gfxstream/+/2787176" rel="noreferrer" target="_blank">https://android-review.googlesource.com/c/platform/hardware/google/gfxstream/+/2787176</a><br>
> <br>
> Signed-off-by: Gurchetan Singh <<a href="mailto:gurchetansingh@chromium.org" target="_blank">gurchetansingh@chromium.org</a>><br>
> Reviewed-by: Josh Simonot <<a href="mailto:josh.simonot@gmail.com" target="_blank">josh.simonot@gmail.com</a>><br>
> ---<br>
> Fixes suggested by Dmitry Osipenko<br>
> v2:<br>
>     - Squash implementation and UAPI change into one commit<br>
>     - Avoid unnecessary casts<br>
>     - Use bool when necessary<br>
> v3:<br>
>     - Use DEBUG_NAME_MAX_LEN - 1 when copying string<br>
> <br>
>  drivers/gpu/drm/virtio/virtgpu_drv.h   |  5 ++++<br>
>  drivers/gpu/drm/virtio/virtgpu_ioctl.c | 39 ++++++++++++++++++++++----<br>
>  include/uapi/drm/virtgpu_drm.h         |  2 ++<br>
>  3 files changed, 40 insertions(+), 6 deletions(-)<br>
<br>
Gerd, do you have objections to this UAPI change?<br></blockquote><div><br></div><div>Bump.  I say we wait another week and see if anyone cares [I suspect nobody does].</div><div><br></div><div> <a href="https://drm.pages.freedesktop.org/maintainer-tools/committer-drm-misc.html#merge-criteria" target="_blank">https://drm.pages.freedesktop.org/maintainer-tools/committer-drm-misc.html#merge-criteria</a></div><div><br></div><div>As per DRM guidelines, if there are no open comments and the change is reviewed, it is mergeable.</div></div></div></blockquote><div><br></div><div>*hears crickets*</div><div><br></div><div>Can we merge this now?</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
-- <br>
Best regards,<br>
Dmitry<br>
<br>
</blockquote></div></div>
</blockquote></div></div>