video: Add video_is_active function

Add the helper function video_is_active() to test if one video device
is active.

This function can be used in board code to execute operation
only when the display is probed / really used.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
This commit is contained in:
Patrick Delaunay
2021-11-15 16:32:20 +01:00
committed by Patrice Chotard
parent fded97adce
commit 2e2e6d8cac
2 changed files with 21 additions and 0 deletions

View File

@@ -276,6 +276,13 @@ static inline int video_sync_copy_all(struct udevice *dev)
#endif
/**
* video_is_active() - Test if one video device it active
*
* @return true if at least one video device is active, else false.
*/
bool video_is_active(void);
#ifndef CONFIG_DM_VIDEO
/* Video functions */