}
}
+static int
+_can_set_hwc_window_on_hw_layer(tdm_exynos_hwc_window_data *hw)
+{
+ if (!hw->surface)
+ return 0;
+
+ if (hw->info.transform != TDM_TRANSFORM_NORMAL)
+ return 0;
+
+ if (hw->info.src_config.pos.w != hw->info.dst_pos.w)
+ return 0;
+
+ if (hw->info.src_config.pos.h != hw->info.dst_pos.h)
+ return 0;
+
+ if (!IS_RGB(hw->info.src_config.format))
+ return 0;
+
+ return 1;
+}
static void
_map_hwc_windows_to_layers(tdm_exynos_output_data *exynos_output)
{
layer_zpos--;
if (hw->client_type == TDM_COMPOSITION_DEVICE && layer_zpos != primary_layer_zpos) {
/* check format */
- if (IS_RGB(hw->info.src_config.format)) {
+ if (_can_set_hwc_window_on_hw_layer(hw)) {
hw->validated_type = TDM_COMPOSITION_DEVICE;
num_unmarked_layers--;
hw->assigned_layer_zpos = layer_zpos;
if ((hw->client_type == TDM_COMPOSITION_DEVICE)
&& layer_zpos < max_hw_layer_zpos) {
/* check format */
- if (IS_RGB(hw->info.src_config.format)) {
+ if (_can_set_hwc_window_on_hw_layer(hw)) {
hw->validated_type = TDM_COMPOSITION_DEVICE;
hw->assigned_layer_zpos = layer_zpos;
continue;