output: add debug logs 55/162155/1
authorBoram Park <boram1288.park@samsung.com>
Tue, 28 Nov 2017 08:13:27 +0000 (17:13 +0900)
committerBoram Park <boram1288.park@samsung.com>
Wed, 29 Nov 2017 09:42:08 +0000 (18:42 +0900)
Change-Id: I70c3bce41875176fb01c741e3b8b470dafb128c3

src/tdm_vblank.c

index 39eeca6..2701456 100644 (file)
@@ -1142,12 +1142,20 @@ tdm_vblank_wait(tdm_vblank *vblank, unsigned int req_sec, unsigned int req_usec,
        else
                wait_info->type = VBLANK_TYPE_HW_SW;
 
-       if (wait_info->type == VBLANK_TYPE_SW || wait_info->type == VBLANK_TYPE_SW_FAKE)
+       if (wait_info->type == VBLANK_TYPE_SW || wait_info->type == VBLANK_TYPE_SW_FAKE) {
                ret = _tdm_vblank_wait_SW(wait_info);
-       else {
+               if (ret != TDM_ERROR_NONE)
+                       TDM_ERR("_tdm_vblank_wait_SW failed: ret(%d)", ret);
+       } else {
                ret = _tdm_vblank_wait_HW(wait_info);
-               if (ret == TDM_ERROR_OUTPUT_DISCONNECTED || ret == TDM_ERROR_DPMS_OFF)
+               if (ret != TDM_ERROR_NONE)
+                       TDM_ERR("_tdm_vblank_wait_HW failed: ret(%d)", ret);
+
+               if (ret == TDM_ERROR_OUTPUT_DISCONNECTED || ret == TDM_ERROR_DPMS_OFF) {
                        ret = _tdm_vblank_wait_SW(wait_info);
+                       if (ret != TDM_ERROR_NONE)
+                               TDM_ERR("_tdm_vblank_wait_SW failed: ret(%d)", ret);
+               }
        }
 
        if (ret != TDM_ERROR_NONE) {