Hi Simon,
On Thu, Oct 28, 2021 at 09:49:18PM +0000, Simon Ser wrote:
+/* 10 bpp Red */ +#define DRM_FORMAT_R10 fourcc_code('R', '1', '0', ' ') /* [15:0] x:R 6:10 little endian */
+/* 12 bpp Red */ +#define DRM_FORMAT_R12 fourcc_code('R', '1', '2', ' ') /* [15:0] x:R 4:12 little endian */
Are these codes arbitrary, or are they taken from somewhere else?
If they are arbitrary, maybe it'd be better to pick XR10 and XR12 instead of R10 and R12, to allow a future patch to add other format codes with the padding at the end if we ever need that.
They are arbitrary indeed, but modelled after DRM_FORMAT_R8 which used 'R8 '. As you've noticed, XR12 is already taken.
I don't think we'll need a format with padding at that end (with data aligned to tbe MSB) as that would essentially be DRM_FORMAT_R16.