summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGreg Hackmann <ghackmann@google.com>2013-09-13 11:23:05 -0700
committerNitin Garg <nitin.garg@freescale.com>2014-04-21 22:35:23 -0500
commite1f700a90f559e989e56196710068d6689c833aa (patch)
treeddb37f1346afaae86aa1256caaa422c7f9011bb1 /include
parent24643b4bba33b3e545945da0fdda19acae125be1 (diff)
video: adf: add informational flags to interfaces
Informational flags don't affect ADF directly but may be useful to clients. Currently used to indicate primary and external displays. Change-Id: I343c7f0148da0869244c8e818350e9855525df85 Signed-off-by: Greg Hackmann <ghackmann@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/video/adf.h5
-rw-r--r--include/video/adf.h6
2 files changed, 9 insertions, 2 deletions
diff --git a/include/uapi/video/adf.h b/include/uapi/video/adf.h
index 108064626e0b..2ba345ca458b 100644
--- a/include/uapi/video/adf.h
+++ b/include/uapi/video/adf.h
@@ -36,6 +36,9 @@ enum adf_interface_type {
ADF_INTF_TYPE_MAX = (~(__u32)0),
};
+#define ADF_INTF_FLAG_PRIMARY (1 << 0)
+#define ADF_INTF_FLAG_EXTERNAL (1 << 1)
+
enum adf_event_type {
ADF_EVENT_VSYNC = 0,
ADF_EVENT_HOTPLUG = 1,
@@ -239,6 +242,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
@@ -255,6 +259,7 @@ struct adf_interface_data {
__u32 type;
__u32 id;
/* e.g. type=ADF_INTF_TYPE_DSI, id=1 => DSI.1 */
+ __u32 flags;
__u8 dpms_state;
__u8 hotplug_detect;
diff --git a/include/video/adf.h b/include/video/adf.h
index eb7b9be19c7e..82d49fcf00cf 100644
--- a/include/video/adf.h
+++ b/include/video/adf.h
@@ -355,6 +355,7 @@ struct adf_interface {
enum adf_interface_type type;
u32 idx;
+ u32 flags;
wait_queue_head_t vsync_wait;
ktime_t vsync_timestamp;
@@ -405,9 +406,10 @@ int __printf(4, 5) adf_device_init(struct adf_device *dev,
struct device *parent, const struct adf_device_ops *ops,
const char *fmt, ...);
void adf_device_destroy(struct adf_device *dev);
-int __printf(6, 7) adf_interface_init(struct adf_interface *intf,
+int __printf(7, 8) adf_interface_init(struct adf_interface *intf,
struct adf_device *dev, enum adf_interface_type type, u32 idx,
- const struct adf_interface_ops *ops, const char *fmt, ...);
+ u32 flags, const struct adf_interface_ops *ops, const char *fmt,
+ ...);
void adf_interface_destroy(struct adf_interface *intf);
static inline struct adf_device *adf_interface_parent(
struct adf_interface *intf)