continue;
if (hw->assigned_layer_zpos == layer_zpos &&
- (hw->validated_type == TDM_COMPOSITION_DEVICE || hw->is_device_to_client_transition))
+ (hw->validated_type == TDM_COMPOSITION_DEVICE ||
+ hw->validated_type == TDM_COMPOSITION_CURSOR ||
+ hw->is_device_to_client_transition))
return hw;
}
if (!IS_RGB(hw->info.src_config.format))
return 0;
+ if (hw->info.dst_pos.x > hw->output_data->current_mode->hdisplay ||
+ hw->info.dst_pos.y > hw->output_data->current_mode->vdisplay)
+ return 0;
+
+ if (hw->info.src_config.pos.w < MIN_WIDTH || hw->info.src_config.pos.w % 2)
+ return 0;
+
return 1;
}
* will be mapped in the next iteration) or the composition type of
* current hwc_window is not TDM_COMPOSITION_DEVICE or hwc_window cannot
* be set on hw layer*/
- if (hw->client_type == TDM_COMPOSITION_DEVICE && layer_zpos != primary_layer_zpos) {
+ if ((hw->client_type == TDM_COMPOSITION_DEVICE || hw->client_type == TDM_COMPOSITION_CURSOR) &&
+ layer_zpos != primary_layer_zpos) {
if (_can_set_hwc_window_on_hw_layer(hw)) {
- hw->validated_type = TDM_COMPOSITION_DEVICE;
+ hw->validated_type = hw->client_type;
num_unmarked_layers--;
hw->assigned_layer_zpos = layer_zpos;
continue;
layer_zpos++;
/* break if the remaining windows are already marked in the
* previous iteration */
- if (hw->validated_type == TDM_COMPOSITION_DEVICE)
+ if (hw->validated_type == TDM_COMPOSITION_DEVICE || hw->validated_type == TDM_COMPOSITION_CURSOR)
break;
/* break if we have reached max hw layer or the composition type of
* current hwc_window is not TDM_COMPOSITION_DEVICE or hwc_window cannot
if (hw->client_type == TDM_COMPOSITION_NONE)
continue;
- if (hw->validated_type == TDM_COMPOSITION_DEVICE)
+ if (hw->validated_type == TDM_COMPOSITION_DEVICE || hw->validated_type == TDM_COMPOSITION_CURSOR)
TDM_DBG(" window(%p) type: %s -> %s : is mapped to layer with %d zpos", hw,
_comp_to_str(hw->client_type), _comp_to_str(hw->validated_type),
hw->assigned_layer_zpos);