[Intel-gfx] [PATCH 1/2] drm: Introduce plane SIZE_HINTS property

Pekka Paalanen ppaalanen at gmail.com
Tue Feb 14 09:42:27 UTC 2023


On Thu, 9 Feb 2023 13:51:05 +0200
Pekka Paalanen <pekka.paalanen at collabora.com> wrote:

> Maybe we could refine this so that userspace uses the stride and height
> implied by the caps for allocation, and then use the exact cursor image
> size for AddFB2? And have drivers pick any size between those two they
> can use. The kernel would need the userspace to promise that the
> padding is always zero-initialized, so the driver can simply scan out
> any area of the buffer it needs.
> 
> Then we don't need SIZE_HINTS.

Would there be any problem with this?

If this works, it would seem the superior solution to me, because
userspace does not need to guess or test for the exact right size.
Simply allocate at the CAP size, pad the cursor image with transparent
pixels, and let the kernel scan out the optimal area.

And if the kernel needs to do a pixel format conversion, it only needs
to do the optimal minimum amount of work.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20230214/55c51f38/attachment.sig>


More information about the dri-devel mailing list