Re: [PATCH v4 3/3] drm/tyr: allow userspace buffers to be mismatched

From: Alice Ryhl

Date: Wed Oct 21 2026 - 04:55:47 EST


On Tue, Oct 20, 2026 at 05:06:47PM -0700, Deborah Brouwer wrote:
> Allow userspace to provide a buffer that is smaller or larger than the
> object that the kernel expects to write into it.
>
> Set a minimum buffer size to match those in PANTHOR_UOBJ_MIN_SIZE. If
> userspace provides at least the minimum buffer size, then simply write
> until the buffer is full.
>
> If userspace provides a larger buffer than necessary, then zero out the
> remaining buffer.
>
> This ensures UAPI compatibility with Panthor.
>
> Signed-off-by: Deborah Brouwer <deborah.brouwer@xxxxxxxxxxxxx>

Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>