e_hwc_windows: execute commit if there is no pp commit data
authorJunkyeong Kim <jk0430.kim@samsung.com>
Thu, 12 Dec 2019 09:12:29 +0000 (18:12 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 17 Dec 2019 12:38:22 +0000 (21:38 +0900)
Change-Id: I63ff36ebf56c51f6dd514bf5b4a4a7fc8825de74
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/bin/e_hwc_windows.c

index 38635c5..4b51463 100644 (file)
@@ -1321,7 +1321,7 @@ _e_hwc_windows_pp_output_commit_handler(tdm_output *toutput, unsigned int sequen
 
    hwc->pp_output_commit = EINA_FALSE;
 
-    _e_hwc_windows_commit_data_release(hwc, sequence, tv_sec, tv_usec);
+   _e_hwc_windows_commit_data_release(hwc, sequence, tv_sec, tv_usec);
    hwc->wait_commit = EINA_FALSE;
    hwc->pp_commit = EINA_FALSE;
 
@@ -1718,6 +1718,7 @@ _e_hwc_windows_pp_commit(E_Hwc *hwc)
 {
    E_Hwc_Window_Commit_Data *commit_data = NULL;
    E_Hwc_Window *hwc_window = NULL;
+   tdm_error terror = TDM_ERROR_NONE;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(hwc, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(hwc->pp_tqueue, EINA_FALSE);
@@ -1728,7 +1729,24 @@ _e_hwc_windows_pp_commit(E_Hwc *hwc)
    commit_data = hwc_window->commit_data;
    if (!commit_data || !commit_data->buffer.tsurface)
      {
-        EHWSERR("no commit_data", hwc);
+        EHWSINF("no commit_data for pp. execute commit", hwc);
+        EHWSTRACE("======= HWC Accept Validation no pp commit data =======");
+        terror = tdm_hwc_accept_validation(hwc->thwc);
+        if (terror != TDM_ERROR_NONE)
+          {
+             EHWSERR("fail to tdm_hwc_accept_validation", hwc);
+             return EINA_FALSE;
+          }
+
+        terror = tdm_hwc_commit(hwc->thwc, 0, _e_hwc_windows_commit_handler, hwc);
+        if (terror != TDM_ERROR_NONE)
+          {
+             EHWSERR("fail to tdm_hwc_commit", hwc);
+             return EINA_FALSE;
+          }
+
+        hwc->wait_commit = EINA_TRUE;
+
         return EINA_TRUE;
      }