summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-11-13 14:22:07 -0700
committerSimon Glass <sjg@chromium.org>2016-11-25 17:59:31 -0700
commit1b68283b64a7a1847410eff20886bd7bbfd8f9a6 (patch)
tree223069f02f6b0612d54217498c596c8e1bc3f1ce /include
parent7981394e550094bbbb2eb5e62065fa14c2ca77b0 (diff)
video: Track whether a display is in use
Mark a display as in use when display_enable() is called. This can avoid a display being used by multiple video-output devices. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/display.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/display.h b/include/display.h
index b1c476628b..d0a08d4aaa 100644
--- a/include/display.h
+++ b/include/display.h
@@ -16,10 +16,12 @@ struct display_timing;
* @source_id: ID for the source of the display data, typically a video
* controller
* @src_dev: Source device providing the video
+ * @in_use: Display is being used
*/
struct display_plat {
int source_id;
struct udevice *src_dev;
+ bool in_use;
};
/**
@@ -41,6 +43,14 @@ int display_read_timing(struct udevice *dev, struct display_timing *timing);
int display_enable(struct udevice *dev, int panel_bpp,
const struct display_timing *timing);
+/**
+ * display_in_use() - Check if a display is in use by any device
+ *
+ * @return true if the device is in use (display_enable() has been called
+ * successfully), else false
+ */
+bool display_in_use(struct udevice *dev);
+
struct dm_display_ops {
/**
* read_timing() - Read information directly