Re: [PATCH v8 02/11] drm/fourcc: Add DRM_FORMAT_XV15/XV20

From: Simon Ser

Date: Thu Mar 26 2026 - 11:02:39 EST


On Friday, March 20th, 2026 at 11:37, Tomi Valkeinen <tomi.valkeinen@xxxxxxxxxxxxxxxx> wrote:

> On 19/03/2026 17:15, Simon Ser wrote:
> > What is the difference between DRM_FORMAT_XV15 and DRM_FORMAT_P030?
>
> Good question. I thought the Cr & Cb are swapped between those formats.
>
> The VC4 driver uses HVS_PIXEL_ORDER_XYCBCR define, and the comment in
> drm_fourcc.h starts with "YCbCr420". So, CbCr. But then the comments
> then continue with CrCb.
>
> XV15/20 isn't super clear either, starting with "YCrCb" but then "Cb:Cr
> plane".
>
> The components in the plane descriptions look identical though, hinting
> they are the same. So to be sure, I tested it:
>
> I had test pattern support for XV15/20 in pykms, which I can test on a
> Xilinx board. P030 is a bit more difficult, as on RPi5 it requires
> DRM_FORMAT_MOD_BROADCOM_SAND128. But with a linear -> SAND128 converter,
> I was able to test linear NV12 converted to NV12+SAND128 and shown on
> the screen (just for reference), and similarly linear XV15 ->
> P030+SAND128. And, indeed, the linear XV15 test pattern shows correctly
> on screen when converted to SAND128. So afaics XV15 is indeed identical
> to P030, and I can drop XV15.
>
> This then brings up the question about XV20. That format doesn't exist
> yet, but should it then be named similarly to P030? However, I have no
> idea what P030 means, so I don't know what a 2x1 subsampled P030 would
> be called...
>
> Thoughts/ideas? Or just keep XV20?

I've replied with some ideas on the new version's thread :)