summaryrefslogtreecommitdiff
path: root/lib/igt_fb.h
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-01-19 12:47:11 +0100
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-02-01 14:19:48 +0100
commit918ea427d0255b5bc74da3dcccec8cc3fe65631f (patch)
tree9c1666395655252d3ac8e2eaaf46af202a0d286d /lib/igt_fb.h
parent48bdef4f5754e38bdcc5c4510fdcaf0796f0b50c (diff)
lib/fb: Add support for creating planar framebuffers, v3.
Add support to create planar framebuffers, but don't add formats that support them yet. This first requires conversion to the RGB24 format. Changes since v1: - Don't crash in igt_create_bo_with_dimensions(). Changes since v2: - Zero offsets for dumb fb too. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com> [mlankhorst: Change memset(4 * ..) to memset(ARRAY_SIZE(format->plane_bpp) * ..)]
Diffstat (limited to 'lib/igt_fb.h')
-rw-r--r--lib/igt_fb.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/igt_fb.h b/lib/igt_fb.h
index 152798e9..77fd88bb 100644
--- a/lib/igt_fb.h
+++ b/lib/igt_fb.h
@@ -50,6 +50,11 @@
* @size: size in bytes of the underlying backing storage
* @cairo_surface: optionally attached cairo drawing surface
* @domain: current domain for cache flushing tracking on i915.ko
+ * @num_planes: Amount of planes on this fb. >1 for planar formats.
+ * @offsets: Offset for each plane in bytes.
+ * @plane_bpp: The bpp for each plane.
+ * @plane_width: The width for each plane.
+ * @plane_height: The height for each plane.
*
* Tracking structure for KMS framebuffer objects.
*/
@@ -66,6 +71,11 @@ typedef struct igt_fb {
unsigned int size;
cairo_surface_t *cairo_surface;
unsigned int domain;
+ unsigned int num_planes;
+ uint32_t offsets[4];
+ unsigned int plane_bpp[4];
+ unsigned int plane_width[4];
+ unsigned int plane_height[4];
} igt_fb_t;
/**