OSDN Git Service

Add fourcc defines.
authorKalyan Kondapally <kalyan.kondapally@intel.com>
Thu, 17 May 2018 07:06:06 +0000 (00:06 -0700)
committerKalyan Kondapally <kalyan.kondapally@intel.com>
Thu, 17 May 2018 07:07:01 +0000 (00:07 -0700)
This removes need to carry extra patches in libdrm side.

Jira: None.
Test: Build passes on Android and Linux.

Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
cros_gralloc/i915_private_android.h
i915_private.h

index f9cecba..b30985d 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <stdint.h>
 
-#include "i915_private_types.h"
+#include "i915_private.h"
 
 uint32_t i915_private_convert_format(int format);
 
index 5644008..3b90334 100644 (file)
 
 struct driver;
 
+/*
+ * 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_P010                fourcc_code('P', '0', '1', '0') /* 2x2 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_P012                fourcc_code('P', '0', '1', '2') /* 2x2 subsampled Cr:Cb plane 12 bits per channel */
+
+/*
+ * 2 plane YCbCr MSB aligned
+ * index 0 = Y plane, [15:0] Y little endian
+ * index 1 = Cr:Cb plane, [31:0] Cr:Cb [16:16] little endian
+ */
+#define DRM_FORMAT_P016                fourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cr:Cb plane 16 bits per channel */
+
+/* 64 bpp RGB */
+#define DRM_FORMAT_XRGB161616  fourcc_code('X', 'R', '4', '8') /* [63:0] x:R:G:B 16:16:16:16 little endian */
+#define DRM_FORMAT_XBGR161616  fourcc_code('X', 'B', '4', '8') /* [63:0] x:B:G:R 16:16:16:16 little endian */
+
 int i915_private_init(struct driver *drv, uint64_t *cursor_width, uint64_t *cursor_height);
 
 int i915_private_add_combinations(struct driver *drv);