vblank: return TDM_ERROR_TIMEOUT when timeout occurs
[platform/core/uifw/libtdm.git] / include / tdm_common.h
index dfb3f8e..cfc031c 100644 (file)
@@ -67,6 +67,8 @@ typedef enum {
        TDM_ERROR_NOT_IMPLEMENTED       = -8, /**< not implemented */
        TDM_ERROR_NO_CAPABILITY         = -9, /**< no capability */
        TDM_ERROR_DPMS_OFF              = -10, /**< dpms off */
+       TDM_ERROR_OUTPUT_DISCONNECTED   = -11, /**< output disconnected */
+       TDM_ERROR_TIMEOUT               = -12, /**< timeout */
 } tdm_error;
 
 /**
@@ -86,10 +88,15 @@ typedef enum {
 /**
  * @brief The output capability enumeration
  * @details
- * @remark
+ * If a backend module provides #TDM_OUTPUT_CAPABILITY_EXTENDED_DPMS, we can set
+ * an extended DPMS mode to an output which a backend module supports.
+ * Don't use the low-4bit for an extended DPMS mode value. It's used for default
+ * DPMS modes.
  */
 typedef enum {
        TDM_OUTPUT_CAPABILITY_ASYNC_DPMS         = (1 << 0), /**< if a outupt supports asynchronous DPMS operation */
+       TDM_OUTPUT_CAPABILITY_HWC                = (1 << 1), /**< if a outupt supports hwc operation @since 2.0.0*/
+       TDM_OUTPUT_CAPABILITY_EXTENDED_DPMS      = (1 << 2), /**< if a outupt supports extended DPMS operation @since 2.0.0 */
 } tdm_output_capability;
 
 /**
@@ -129,6 +136,16 @@ typedef enum {
 } tdm_layer_capability;
 
 /**
+ * @brief The hwc window capability enumeration
+ * @since 2.0.0
+ */
+typedef enum {
+       TDM_HWC_WINDOW_VIDEO_CAPABILITY_SCALE          = (1 << 1), /**< if a hwc window video has scale capability  */
+       TDM_HWC_WINDOW_VIDEO_CAPABILITY_TRANSFORM      = (1 << 2), /**< if a hwc window video has transform capability  */
+       TDM_HWC_WINDOW_VIDEO_CAPABILITY_SCANOUT        = (1 << 3), /**< if a hwc_window video allows a scanout buffer only */
+} tdm_hwc_window_video_capability;
+
+/**
  * @brief The pp capability enumeration
  */
 typedef enum {
@@ -202,10 +219,11 @@ typedef enum {
  * @details bit compatible with the libdrm definitions.
  */
 typedef enum {
-       TDM_OUTPUT_DPMS_ON,         /**< On */
-       TDM_OUTPUT_DPMS_STANDBY,    /**< StandBy */
-       TDM_OUTPUT_DPMS_SUSPEND,    /**< Suspend */
-       TDM_OUTPUT_DPMS_OFF,        /**< Off */
+       TDM_OUTPUT_DPMS_ON,         /**< On, Vsync On */
+       TDM_OUTPUT_DPMS_STANDBY,    /**< StandBy, Vsync On */
+       TDM_OUTPUT_DPMS_SUSPEND,    /**< Suspend, Vsync Off */
+       TDM_OUTPUT_DPMS_OFF,        /**< Off, Vsync Off */
+       TDM_OUTPUT_DPMS_AOD = 0x10, /**< AOD, Vsync On, extended DPMS mode */
 } tdm_output_dpms;
 
 /**
@@ -261,6 +279,11 @@ typedef struct _tdm_pos {
        unsigned int h;
 } tdm_pos;
 
+typedef struct _tdm_hwc_region {
+       unsigned int num_rects;
+       tdm_pos const *rects;
+} tdm_hwc_region;
+
 /**
  * @brief The tdm value type enumeration
  */
@@ -284,6 +307,14 @@ typedef union {
        uint64_t u64;
 } tdm_value;
 
+/**
+ * @brief The hwc window flag enumeration
+ * @since 2.0.0
+ */
+typedef enum {
+       TDM_HWC_WINDOW_FLAG_NONE     = 0,
+} tdm_hwc_window_flag;
+
 #ifdef __cplusplus
 }
 #endif