drm/fourcc: Add P212, P410 and P412 formats
Subsystems (3)
PATCH 1/1 drm/fourcc: Add P212, P410 and P412 formats
Add P212, P410 and P412 formats, including their FourCC codes and drm_format_info entries.
- P212 is a two-plane, 12-bit, 4:2:2 YCbCr format
- P410 is a two-plane, 10-bit, 4:4:4 YCbCr format
- P412 is a two-plane, 12-bit, 4:4:4 YCbCr format
Assisted-by Cursor:GPT-5.5
Signed-off-by Jonah Walker <[email protected]>
--- drivers/gpu/drm/drm_fourcc.c | 12 ++++++++++++ include/uapi/drm/drm_fourcc.h | 21 +++++++++++++++++++++ 2 files changed, 33 insertions(+)
drivers/gpu/drm/drm_fourcc.c +12 -0
@@ -324,6 +324,18 @@ const struct drm_format_info *__drm_format_info(u32 format) .num_planes = 2, .char_per_block = { 2, 4, 0 }, .block_w = { 1, 1, 0 }, .block_h = { 1, 1, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true }, + { .format = DRM_FORMAT_P212, .depth = 0, + .num_planes = 2, .char_per_block = { 2, 4, 0 }, + .block_w = { 1, 1, 0 }, .block_h = { 1, 1, 0 }, .hsub = 2, + .vsub = 1, .is_yuv = true }, + { .format = DRM_FORMAT_P410, .depth = 0, + .num_planes = 2, .char_per_block = { 2, 4, 0 }, + .block_w = { 1, 1, 0 }, .block_h = { 1, 1, 0 }, .hsub = 1, + .vsub = 1, .is_yuv = true }, + { .format = DRM_FORMAT_P412, .depth = 0, + .num_planes = 2, .char_per_block = { 2, 4, 0 }, + .block_w = { 1, 1, 0 }, .block_h = { 1, 1, 0 }, .hsub = 1, + .vsub = 1, .is_yuv = true }, { .format = DRM_FORMAT_VUY101010, .depth = 0, .num_planes = 1, .cpp = { 0, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
include/uapi/drm/drm_fourcc.h +21 -0
@@ -334,6 +334,27 @@ extern "C" {*/ #define DRM_FORMAT_P210 fourcc_code('P', '2', '1', '0')/* 2x1 subsampled Cr:Cb plane, 10 bit per channel */ +/* +* 2 plane YCbCr MSB aligned +* index 0 = Y plane, [15:0] Y:x [12:4] little endian +* index 1 = Cr:Cb plane, [31:0] Cr:x:Cb:x [12:4:12:4] little endian +*/ +#define DRM_FORMAT_P212 fourcc_code('P', '2', '1', '2')/* 2x1 subsampled Cr:Cb plane 12 bits per channel */ + +/* +* 2 plane YCbCr MSB aligned +* index 0 = Y plane, [15:0] Y:x [10:6] little endian +* index 1 = Cr:Cb plane, [31:0] Cr:x:Cb:x [10:6:10:6] little endian +*/ +#define DRM_FORMAT_P410 fourcc_code('P', '4', '1', '0')/* non-subsampled Cr:Cb plane 10 bits per channel */ + +/* +* 2 plane YCbCr MSB aligned +* index 0 = Y plane, [15:0] Y:x [12:4] little endian +* index 1 = Cr:Cb plane, [31:0] Cr:x:Cb:x [12:4:12:4] little endian +*/ +#define DRM_FORMAT_P412 fourcc_code('P', '4', '1', '2')/* non-subsampled Cr:Cb plane 12 bits per channel */ +/* * 2 plane YCbCr MSB aligned * index 0 = Y plane, [15:0] Y:x [10:6] little endian
base-commit: cff96362794a5c1f3adb013b4a46c7233149a629
Signature · 1 line
2.43.0
Hello,
Friendly ping -- any comments for this patch?
https://lore.kernel.org/all/[email protected]/
Thanks,
Jonah