Skip to contentSkip to conversation

lib/igt_fb: Added XYUV format support for testing

PATCH Superseded Stanislav Lisovskiy 1 participant 1 message Oct 8, 2018 Library code

v10 of 13 Superseded Latest is v13 →

lore
Share & tools
lore
#0 lore raw

PATCH v10 1/1 lib/igt_fb: Added XYUV format support for testing

XYUV format support has been added to DRM, modified IGT to reflect those changes.

v2: Fixed merge conflict, started to use new yuv<=>rgb
conversion functions.

v3: Fixed kms_available_modes_crc test to support new XYUV
format. Fixed a problem, where test complains that two outputs might use same pipe at the same time.

v4: Fixed convertion procedure in igt_fb to support XYUV
properly.

v5: Fixed a coding typo.

v6: Set depth equal to -1 for XYUV format in order to prevent
it to be used by igt_bpp_depth_to_drm_format, as we do not want YUV formats to be used in that case.

v7: Fix "black" color initialization for create_bo_for_fb with
proper value. Changed naming "planar_stride" to "xyuv_stride".

v8: Change naming from DRM_FORMAT_XYUV to DRM_FORMAT_XYUV8888

v9: Fixed compilation errors by rebasing to recent master.

v10: Adding reference to correspondent kernel commit with the new format
in include/drm-uapi

drm-tip:

	commit f75df2cad986f40e190ee97fe3b49dd17174f1af
	Author: Stanislav Lisovskiy <[email protected]>
	Date:   Fri Jul 6 11:57:27 2018 +0300

	    drm: Introduce new DRM_FORMAT_XYUV
---
 include/drm-uapi/drm_fourcc.h |  1 +
 lib/igt_fb.c                  | 89 +++++++++++++++++++++++++++++++++++
 tests/kms_plane.c             |  3 ++
 3 files changed, 93 insertions(+)
include/drm-uapi/drm_fourcc.h +1 -0
index e04613d3..03e5466c 100644
@@ -112,6 +112,7 @@ extern "C" {
 #define DRM_FORMAT_VYUY		fourcc_code('V', 'Y', 'U', 'Y') /* [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */
 
 #define DRM_FORMAT_AYUV		fourcc_code('A', 'Y', 'U', 'V') /* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */
+#define DRM_FORMAT_XYUV8888	fourcc_code('X', 'Y', 'U', 'V') /* [31:0] X:Y:Cb:Cr 8:8:8:8 little endian */
 
 /*
  * 2 plane RGB + A
lib/igt_fb.c +89 -0

131 lines not on this page · raw message

tests/kms_plane.c +3 -0
index 5a0bc05b..a40f10ad 100644
@@ -483,6 +483,9 @@ static void test_format_plane(data_t *data, enum pipe pipe,
 
 		format = plane->drm_plane->formats[i];
 
+		if (format != DRM_FORMAT_XYUV8888)
+			continue;
+
 		if (format == ref_format)
 			continue;
 
Signature · 6 lines
2.17.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev