On Wed, Feb 12, 2025 at 04:56:06PM +0200, Tomi Valkeinen wrote:
Add two new pixel formats:
DRM_FORMAT_XV15 ("XV15")
DRM_FORMAT_XV20 ("XV20")
The formats are 2 plane 10 bit per component YCbCr, with the XV15 2x2
subsampled whereas XV20 is 2x1 subsampled.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@xxxxxxxxxxxxxxxx>
---
drivers/gpu/drm/drm_fourcc.c | 8 ++++++++
include/uapi/drm/drm_fourcc.h | 8 ++++++++
2 files changed, 16 insertions(+)
diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c
index 1e9afbf6ef99..bb0a2294573b 100644
--- a/drivers/gpu/drm/drm_fourcc.c
+++ b/drivers/gpu/drm/drm_fourcc.c
@@ -346,6 +346,14 @@ const struct drm_format_info *__drm_format_info(u32 format)
{ .format = DRM_FORMAT_P030, .depth = 0, .num_planes = 2,
.char_per_block = { 4, 8, 0 }, .block_w = { 3, 3, 0 }, .block_h = { 1, 1, 0 },
.hsub = 2, .vsub = 2, .is_yuv = true},
+ { .format = DRM_FORMAT_XV15, .depth = 0,
+ .num_planes = 2, .char_per_block = { 4, 8, 0 },
+ .block_w = { 3, 3, 0 }, .block_h = { 1, 1, 0 }, .hsub = 2,
+ .vsub = 2, .is_yuv = true },
+ { .format = DRM_FORMAT_XV20, .depth = 0,
+ .num_planes = 2, .char_per_block = { 4, 8, 0 },
+ .block_w = { 3, 3, 0 }, .block_h = { 1, 1, 0 }, .hsub = 2,
+ .vsub = 1, .is_yuv = true },
It might be beneficial to use the same formatting as previous entries,
it simplifies reviewing. If the patchset is resent, it would be nice to
get that fixed..