hwc: fix missing setting zpos of target_window 97/257297/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Thu, 22 Apr 2021 06:30:53 +0000 (15:30 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Thu, 22 Apr 2021 06:30:53 +0000 (15:30 +0900)
if video is shown and all ui layers are used by device type,
zpos of target_window is not set.
target_window should be displayed in this case
because vc4 using zpos 0 ui layer by video and ui

Change-Id: I0ff851c7967157947ef063a3d46f90ad84a64e97

src/libhal-backend-tdm-vc4/tdm_vc4_hwc.c
src/libtdm-vc4/tdm_vc4_hwc.c

index c881bc0..2e9ee8f 100644 (file)
@@ -539,6 +539,7 @@ _vc4_hwc_apply_policy(tdm_vc4_hwc *hwc_data , hal_tdm_hwc_window **composited_wn
                case HAL_TDM_HWC_WIN_COMPOSITION_VIDEO:
                        composited_list[i]->validated_type = HAL_TDM_HWC_WIN_COMPOSITION_VIDEO;
                        video_count++;
+                       num_ui_layers--;
                        continue;
                case HAL_TDM_HWC_WIN_COMPOSITION_CURSOR:
                        if (set_clients_below) break;
@@ -573,7 +574,8 @@ _vc4_hwc_apply_policy(tdm_vc4_hwc *hwc_data , hal_tdm_hwc_window **composited_wn
                num_ui_layers--;
        }
 
-       if (client_count > 0) {
+       if ((client_count > 0) ||
+               ((video_count > 0) && (device_count == NUM_UI_LAYERS))) {
                ui_lzpos_bottom++;
                num_ui_layers--;
                hwc_data->need_target_window = 1;
index df83111..0325052 100644 (file)
@@ -540,6 +540,7 @@ _vc4_hwc_apply_policy(tdm_vc4_hwc_data *hwc_data , tdm_hwc_window **composited_w
                case TDM_HWC_WIN_COMPOSITION_VIDEO:
                        composited_list[i]->validated_type = TDM_HWC_WIN_COMPOSITION_VIDEO;
                        video_count++;
+                       num_ui_layers--;
                        continue;
                case TDM_HWC_WIN_COMPOSITION_CURSOR:
                        if (set_clients_below) break;
@@ -574,7 +575,8 @@ _vc4_hwc_apply_policy(tdm_vc4_hwc_data *hwc_data , tdm_hwc_window **composited_w
                num_ui_layers--;
        }
 
-       if (client_count > 0) {
+       if ((client_count > 0) ||
+               ((video_count > 0) && (device_count == NUM_UI_LAYERS))) {
                ui_lzpos_bottom++;
                num_ui_layers--;
                hwc_data->need_target_window = 1;