[PATCH 3/3] drm: fourcc: Update DRM Framework with new fourcc codes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jeffrey Mouroux <jmouroux@xxxxxxxxxx>

New fourcc codes have been added to support new YUV semi-planar
and packed formats (including greyscale) needed by new Xilinx
Video IP.  This patch includes recognition of these new formats
in the DRM framework library functions.

Signed-off-by: Jeffrey Mouroux <jmouroux@xxxxxxxxxx>
Signed-off-by: Hyun Kwon <hyun.kwon@xxxxxxxxxx>
---
 drivers/gpu/drm/drm_fourcc.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c
index 52afb5e..70342b3 100644
--- a/drivers/gpu/drm/drm_fourcc.c
+++ b/drivers/gpu/drm/drm_fourcc.c
@@ -168,11 +168,18 @@ const struct drm_format_info *__drm_format_info(u32 format)
 		{ .format = DRM_FORMAT_NV61,		.depth = 0,  .num_planes = 2, .cpp = { 1, 2, 0 }, .cpp_scale = { 1, 1 }, .hsub = 2, .vsub = 1, .padding_scale = { 1, 1 } },
 		{ .format = DRM_FORMAT_NV24,		.depth = 0,  .num_planes = 2, .cpp = { 1, 2, 0 }, .cpp_scale = { 1, 1 }, .hsub = 1, .vsub = 1, .padding_scale = { 1, 1 } },
 		{ .format = DRM_FORMAT_NV42,		.depth = 0,  .num_planes = 2, .cpp = { 1, 2, 0 }, .cpp_scale = { 1, 1 }, .hsub = 1, .vsub = 1, .padding_scale = { 1, 1 } },
+		{ .format = DRM_FORMAT_XV15,		.depth = 0,  .num_planes = 2, .cpp = { 1, 2, 0 }, .cpp_scale = { 10, 8 }, .hsub = 2, .vsub = 2,  .padding_scale = { 32, 30 } },
+		{ .format = DRM_FORMAT_XV20,		.depth = 0,  .num_planes = 2, .cpp = { 1, 2, 0 }, .cpp_scale = { 10, 8 }, .hsub = 2, .vsub = 1,  .padding_scale = { 32, 30 } },
 		{ .format = DRM_FORMAT_YUYV,		.depth = 0,  .num_planes = 1, .cpp = { 2, 0, 0 }, .cpp_scale = { 1, 1 }, .hsub = 2, .vsub = 1, .padding_scale = { 1, 1 } },
 		{ .format = DRM_FORMAT_YVYU,		.depth = 0,  .num_planes = 1, .cpp = { 2, 0, 0 }, .cpp_scale = { 1, 1 }, .hsub = 2, .vsub = 1, .padding_scale = { 1, 1 } },
 		{ .format = DRM_FORMAT_UYVY,		.depth = 0,  .num_planes = 1, .cpp = { 2, 0, 0 }, .cpp_scale = { 1, 1 }, .hsub = 2, .vsub = 1, .padding_scale = { 1, 1 } },
 		{ .format = DRM_FORMAT_VYUY,		.depth = 0,  .num_planes = 1, .cpp = { 2, 0, 0 }, .cpp_scale = { 1, 1 }, .hsub = 2, .vsub = 1, .padding_scale = { 1, 1 } },
 		{ .format = DRM_FORMAT_AYUV,		.depth = 0,  .num_planes = 1, .cpp = { 4, 0, 0 }, .cpp_scale = { 1, 1 }, .hsub = 1, .vsub = 1, .padding_scale = { 1, 1 } },
+		{ .format = DRM_FORMAT_VUY888,		.depth = 0,  .num_planes = 1, .cpp = { 3, 0, 0 }, .cpp_scale = { 1, 1 }, .hsub = 1, .vsub = 1,  .padding_scale = { 1, 1 } },
+		{ .format = DRM_FORMAT_XVUY8888,	.depth = 0,  .num_planes = 1, .cpp = { 4, 0, 0 }, .cpp_scale = { 1, 1 }, .hsub = 1, .vsub = 1,  .padding_scale = { 1, 1 } },
+		{ .format = DRM_FORMAT_XVUY2101010,	.depth = 0,  .num_planes = 1, .cpp = { 4, 0, 0 }, .cpp_scale = { 1, 1 }, .hsub = 1, .vsub = 1,  .padding_scale = { 1, 1 } },
+		{ .format = DRM_FORMAT_Y8,		.depth = 0,  .num_planes = 1, .cpp = { 1, 0, 0 }, .cpp_scale = { 1, 1 }, .hsub = 1, .vsub = 1,  .padding_scale = { 1, 1 } },
+		{ .format = DRM_FORMAT_Y10,		.depth = 0,  .num_planes = 1, .cpp = { 1, 0, 0 }, .cpp_scale = { 10, 8 }, .hsub = 1, .vsub = 1,  .padding_scale = { 32, 30 } },
 	};
 
 	unsigned int i;
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux