add a restirction of setting hw layer. 69/240269/1
authorSooChan Lim <sc1.lim@samsung.com>
Wed, 5 Aug 2020 02:44:43 +0000 (11:44 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Wed, 5 Aug 2020 02:44:43 +0000 (11:44 +0900)
do not allow hw layer when the size of window is over the one of output mode resolution

Change-Id: Ib486366000b99853ef1a875a1cc6d18865fc37f1

src/tdm_exynos_hwc.c

index 33790e7545b19840c8376cf1c4f9356f28f09268..3124bf461668a83f04e5d36715a6e0f1fbe221f2 100644 (file)
@@ -95,6 +95,11 @@ _exynos_hwc_window_can_set_on_hw_layer(tdm_exynos_hwc_window_data *hwc_window_da
                hwc_window_data->info.dst_pos.y > hwc_window_data->hwc_data->output_data->current_mode->vdisplay)
                return 0;
 
+       /* do not allow hw layer when the size of window is over the one of output mode resolution */
+       if (hwc_window_data->info.dst_pos.w > hwc_window_data->hwc_data->output_data->current_mode->hdisplay ||
+               hwc_window_data->info.dst_pos.h > hwc_window_data->hwc_data->output_data->current_mode->vdisplay)
+               return 0;
+
        if (hwc_window_data->info.src_config.pos.w < MIN_WIDTH || hwc_window_data->info.src_config.pos.w % 2)
                return 0;