summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorGreg Hackmann <ghackmann@google.com>2013-10-10 13:03:26 -0700
committerJohn Stultz <john.stultz@linaro.org>2016-02-16 13:53:10 -0800
commit68ff076002b28bbc34dff95048aa815062996b74 (patch)
tree360b92f028a33992fa408b97cbcef02998b9cf31 /include/uapi
parent3300bf432959c7177f35d3cbe4c58ff782f6e22c (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.h48
1 files changed, 47 insertions, 1 deletions
diff --git a/include/uapi/video/adf.h b/include/uapi/video/adf.h
index ec6508a5d372..bd046c6c3409 100644
--- a/include/uapi/video/adf.h
+++ b/include/uapi/video/adf.h
@@ -147,12 +147,55 @@ struct adf_post_config {
size_t custom_data_size;
void __user *custom_data;
-
__s64 complete_fence;
};
#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
*
@@ -196,6 +239,7 @@ struct adf_device_data {
* @type: interface type (see enum @adf_interface_type)
* @id: which interface of type @type;
* e.g. interface DSI.1 -> @type=@ADF_INTF_TYPE_DSI, @id=1
+ * @flags: informational flags (bitmask of %ADF_INTF_FLAG_* values)
* @dpms_state: DPMS state (one of @DRM_MODE_DPMS_* defined in drm_mode.h)
* @hotplug_detect: whether a display is plugged in
* @width_mm: screen width in millimeters, or 0 if unknown
@@ -249,6 +293,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)