hwc: change use_vblank flag set position 69/245969/1
authorJunkyeong Kim <jk0430.kim@samsung.com>
Wed, 21 Oct 2020 02:27:30 +0000 (11:27 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Wed, 21 Oct 2020 02:27:36 +0000 (11:27 +0900)
Change-Id: I4d7aeb5d879429a1380bccaffb7259f8feb2f3ec
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/tdm_hwc.c

index 47b6abb..a0109bf 100644 (file)
@@ -268,7 +268,6 @@ _tdm_hwc_vblank(tdm_private_hwc *private_hwc, tdm_private_hwc_commit_handler *hw
                if (ret != TDM_ERROR_NONE)
                        goto done;
 
-               hwc_commit_handler->use_vblank = 1;
                private_output->layer_waiting_vblank = 1;
 
                /* tdm_vblank APIs is for server. it should be called in unlock status*/
@@ -277,7 +276,6 @@ _tdm_hwc_vblank(tdm_private_hwc *private_hwc, tdm_private_hwc_commit_handler *hw
                _pthread_mutex_lock(&private_display->lock);
                if (ret != TDM_ERROR_NONE) {
                        if (!TDM_OUTPUT_DPMS_VSYNC_IS_OFF(private_output->current_dpms_value)) {
-                               hwc_commit_handler->use_vblank = 0;
                                private_output->layer_waiting_vblank = 0;
                        }
                }
@@ -779,6 +777,8 @@ tdm_hwc_commit(tdm_hwc *hwc, int sync, tdm_hwc_commit_handler func, void *user_d
        hwc_commit_handler->func = func;
        hwc_commit_handler->user_data = user_data;
        hwc_commit_handler->owner_tid = syscall(SYS_gettid);
+       if (hwc_use_vblank)
+               hwc_commit_handler->use_vblank = 1;
 
        if (private_module == private_display->virtual_module) {
                private_voutput = private_output->private_voutput;