[RFC] Allowing user-space alignment for dumb-buffers

Emil Velikov emil.l.velikov at gmail.com
Fri Jun 14 12:13:32 UTC 2019


Hi all,

Currently, DRM drivers implementing dumb-buffers apply alignment to the
requested width, passing the resulting pitch back to user-space. The
specifics of the alignment can be various - from CPU/GPU architecture
or bus/interconnect, to no alignment at all.

By using dumb-buffers the CPU reads/writes the data itself - a somewhat
slow task. To maximise performance, user-space may opt for CPU specific
optimisations, be that use SIMD, align data to cache lines or otherwise.

So even when user-space requests width they can optimally use, the DRM
driver is free to effectively invalidate it.

This RFC proposes user space alignment to the dumb-buffer ioctl. Hence
the resulting pitch returned by the DRM driver will be subject to both
user space and HW/DRM specific requirements.

What do you guys think?

Regards,
Emil


More information about the dri-devel mailing list