History

drm/fourcc: Add definitions for Allwinner vendor and VPU tiled format

This introduces specific definitions for vendor Allwinner and its associated tiled format modifier. This modifier is used for the output format of the VPU, that can be imported directly with the display engine hardware supported by the sun4i-drm driver.

Paul Kocialkowski committed 7 years ago

Commit 08cba011 parent 8c8152b1 file · +16 −0Browse files

Showing the changes to include/uapi/drm (1 of 1 file). Show all

Unified · Split

include/uapi/drm/drm_fourcc.h+16−0
@@ -238,6 +238,8 @@ extern "C" { · 237 unmodified lines
238238 #define DRM_FORMAT_MOD_VENDOR_VIVANTE 0x06
239239 #define DRM_FORMAT_MOD_VENDOR_BROADCOM 0x07
240240 #define DRM_FORMAT_MOD_VENDOR_ARM 0x08
241+#define DRM_FORMAT_MOD_VENDOR_ALLWINNER 0x09
242+
241243 /* add more to the end as needed */
242244
243245 #define DRM_FORMAT_RESERVED ((1ULL << 56) - 1)
@@ -667,6 +669,20 @@ extern "C" { · 423 unmodified lines
667669 */
668670 #define AFBC_FORMAT_MOD_BCH (1ULL << 11)
669671
672+/*
673+ * Allwinner tiled modifier
674+ *
675+ * This tiling mode is implemented by the VPU found on all Allwinner platforms,
676+ * codenamed sunxi. It is associated with a YUV format that uses either 2 or 3
677+ * planes.
678+ *
679+ * With this tiling, the luminance samples are disposed in tiles representing
680+ * 32x32 pixels and the chrominance samples in tiles representing 32x64 pixels.
681+ * The pixel order in each tile is linear and the tiles are disposed linearly,
682+ * both in row-major order.
683+ */
684+#define DRM_FORMAT_MOD_ALLWINNER_TILED fourcc_mod_code(ALLWINNER, 1)
685+
670686 #if defined(__cplusplus)
671687 }
672688 #endif