summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChangyeon Lee <cyeon.lee@samsung.com>2021-04-22 15:30:53 +0900
committerChangyeon Lee <cyeon.lee@samsung.com>2021-04-22 15:30:53 +0900
commit42e15b5479ccdfc8717ca477b0935b0bdcef2757 (patch)
tree867052badfecd22a411dd689b65dfed1a77fd2d2
parentf041c69755cebb8ff27c43a93b40b6e0409a990f (diff)
downloadlibtdm-vc4-42e15b5479ccdfc8717ca477b0935b0bdcef2757.tar.gz
libtdm-vc4-42e15b5479ccdfc8717ca477b0935b0bdcef2757.tar.bz2
libtdm-vc4-42e15b5479ccdfc8717ca477b0935b0bdcef2757.zip
hwc: fix missing setting zpos of target_window
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
-rw-r--r--src/libhal-backend-tdm-vc4/tdm_vc4_hwc.c4
-rw-r--r--src/libtdm-vc4/tdm_vc4_hwc.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/libhal-backend-tdm-vc4/tdm_vc4_hwc.c b/src/libhal-backend-tdm-vc4/tdm_vc4_hwc.c
index c881bc0..2e9ee8f 100644
--- a/src/libhal-backend-tdm-vc4/tdm_vc4_hwc.c
+++ b/src/libhal-backend-tdm-vc4/tdm_vc4_hwc.c
@@ -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;
diff --git a/src/libtdm-vc4/tdm_vc4_hwc.c b/src/libtdm-vc4/tdm_vc4_hwc.c
index df83111..0325052 100644
--- a/src/libtdm-vc4/tdm_vc4_hwc.c
+++ b/src/libtdm-vc4/tdm_vc4_hwc.c
@@ -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;