aboutsummaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorGreg Hackmann <ghackmann@google.com>2013-10-10 13:03:26 -0700
committerColin Cross <ccross@android.com>2014-03-19 13:10:30 -0700
commit764ad522ac9fa99f7a74257cd79ec46c8f23f087 (patch)
treee9e3fe62d419c821a5e9f213d4fb7a295a1bc881 /include/uapi
parent350f29220b0c646a61c8ab816d4cb43efc40aed4 (diff)
video: adf: support "simple" buffers
Simple buffers are linear RGB buffers analogous to KMS's dumb buffers. Simple buffers can be allocated and posted to a display interface without any driver-private data. Internally, ADF drivers provide the driver-private data needed (if any) to post a simple buffer to the display. Change-Id: Ib0b737622eaf343111310f6623f99d69cf3807d2 Signed-off-by: Greg Hackmann <ghackmann@google.com>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/video/adf.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/include/uapi/video/adf.h b/include/uapi/video/adf.h
index 757465b8b58..4b9e60c84e6 100644
--- a/include/uapi/video/adf.h
+++ b/include/uapi/video/adf.h
@@ -152,6 +152,50 @@ struct adf_post_config {
#define ADF_MAX_INTERFACES (PAGE_SIZE / sizeof(__u32))
/**
+ * struct adf_simple_buffer_allocate - request to allocate a "simple" buffer
+ *
+ * @w: width of buffer in pixels (input)
+ * @h: height of buffer in pixels (input)
+ * @format: DRM-style fourcc (input)
+ *
+ * @fd: dma_buf fd (output)
+ * @offset: location of first pixel, in bytes (output)
+ * @pitch: length of a scanline including padding, in bytes (output)
+ *
+ * Simple buffers are analogous to DRM's "dumb" buffers. They have a single
+ * plane of linear RGB data which can be allocated and scanned out without
+ * any driver-private ioctls or data.
+ *
+ * @format must be a standard RGB format defined in drm_fourcc.h.
+ *
+ * ADF clients must NOT assume that an interface can scan out a simple buffer
+ * allocated by a different ADF interface, even if the two interfaces belong to
+ * the same ADF device.
+ */
+struct adf_simple_buffer_alloc {
+ __u16 w;
+ __u16 h;
+ __u32 format;
+
+ __s64 fd;
+ __u32 offset;
+ __u32 pitch;
+};
+
+/**
+ * struct adf_simple_post_config - request to flip to a single buffer without
+ * driver-private data
+ *
+ * @buf: description of buffer displayed (input)
+ * @complete_fence: sync_fence fd which will clear when this buffer has left the
+ * screen (output)
+ */
+struct adf_simple_post_config {
+ struct adf_buffer_config buf;
+ __s64 complete_fence;
+};
+
+/**
* struct adf_attachment_config - description of attachment between an overlay
* engine and an interface
*
@@ -248,6 +292,8 @@ struct adf_overlay_engine_data {
#define ADF_GET_INTERFACE_DATA _IOR('D', 5, struct adf_interface_data)
#define ADF_GET_OVERLAY_ENGINE_DATA \
_IOR('D', 6, struct adf_overlay_engine_data)
+#define ADF_SIMPLE_POST_CONFIG _IOW('D', 7, struct adf_simple_post_config)
+#define ADF_SIMPLE_BUFFER_ALLOC _IOW('D', 8, struct adf_simple_buffer_alloc)
#define ADF_ATTACH _IOW('D', 9, struct adf_attachment_config)
#define ADF_DETACH _IOW('D', 10, struct adf_attachment_config)