continue;
if (hw->assigned_layer_zpos == layer_zpos &&
- (hw->validated_type == TDM_COMPOSITION_DEVICE ||
- hw->validated_type == TDM_COMPOSITION_CLIENT_CANDIDATE))
+ hw->validated_type == TDM_COMPOSITION_DEVICE)
return hw;
}
{
if (composition_type == TDM_COMPOSITION_CLIENT)
return "CLIENT";
- else if (composition_type == TDM_COMPOSITION_CLIENT_CANDIDATE)
- return "CLIENT_CANDIDATE";
else if (composition_type == TDM_COMPOSITION_DEVICE_CANDIDATE)
return "DEVICE_CANDIDATE";
else if (composition_type == TDM_COMPOSITION_DEVICE)
hw->prev_validated_type = hw->validated_type;
}
-static int
-_need_to_revalidate(struct list_head *hwc_wnds)
-{
- tdm_exynos_hwc_window_data *hw = NULL;
-
- LIST_FOR_EACH_ENTRY(hw, hwc_wnds, link) {
-
- if (hw->client_type == TDM_COMPOSITION_NONE)
- continue;
-
- if ((hw->prev_validated_type == TDM_COMPOSITION_CLIENT_CANDIDATE) &&
- (hw->validated_type != TDM_COMPOSITION_CLIENT_CANDIDATE))
- return 1;
- }
-
- return 0;
-}
-
static void
_update_windows_previous_assigned_layer_zpos(struct list_head *hwc_wnds)
{
}
}
-static void
-_restore_windows_assigned_layer_zpos(struct list_head *hwc_wnds)
-{
- tdm_exynos_hwc_window_data *hw = NULL;
-
- LIST_FOR_EACH_ENTRY(hw, hwc_wnds, link) {
- if (hw->client_type == TDM_COMPOSITION_NONE) {
- hw->assigned_layer_zpos = -1;
- continue;
- }
-
- hw->assigned_layer_zpos = hw->prev_assigned_layer_zpos;
- }
-}
-
-static void
-_reset_windows_to_client(struct list_head *hwc_wnds)
-{
- tdm_exynos_hwc_window_data *hw = NULL;
-
- LIST_FOR_EACH_ENTRY(hw, hwc_wnds, link) {
-
- if (hw->client_type == TDM_COMPOSITION_NONE)
- continue;
-
- if (hw->prev_validated_type == TDM_COMPOSITION_CLIENT)
- hw->validated_type = TDM_COMPOSITION_CLIENT;
-
- else if (hw->prev_validated_type == TDM_COMPOSITION_CLIENT_CANDIDATE)
- hw->validated_type = TDM_COMPOSITION_CLIENT_CANDIDATE;
-
- else if (hw->prev_validated_type == TDM_COMPOSITION_DEVICE)
- hw->validated_type = TDM_COMPOSITION_CLIENT_CANDIDATE;
- }
-}
-
-/* if we got at least one device -> client transition or we still have at
- * least one window at the client_candidate state we reset all windows
- * to the client/client_candidate state as it's a reference implementation
- * of the driver */
-static int
-_is_reset_to_client_needed(struct list_head *hwc_wnds)
-{
- tdm_exynos_hwc_window_data *hw = NULL;
-
- LIST_FOR_EACH_ENTRY(hw, hwc_wnds, link) {
-
- if (hw->client_type == TDM_COMPOSITION_NONE)
- continue;
-
- /* client_type is kept, as a TDM_COMPOSITION_CLIENT_CANDIDATE, by the client(e20)
- * till buffer (of this window) being composited to the fb_target */
- if (hw->prev_validated_type == TDM_COMPOSITION_DEVICE &&
- hw->validated_type == TDM_COMPOSITION_CLIENT)
- return 1;
-
- if (hw->client_type == TDM_COMPOSITION_CLIENT_CANDIDATE)
- return 1;
- }
-
- return 0;
-}
-
static void
_reset_composition_types(struct list_head *hwc_window_list)
{
if (hw->client_type == TDM_COMPOSITION_NONE)
continue;
- if (hw->validated_type == TDM_COMPOSITION_DEVICE ||
- hw->validated_type == TDM_COMPOSITION_CLIENT_CANDIDATE)
+ if (hw->validated_type == TDM_COMPOSITION_DEVICE)
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);
tdm_exynos_data *exynos_data = NULL;
RETURN_VAL_IF_FAIL(exynos_output != NULL, TDM_ERROR_INVALID_PARAMETER);
RETURN_VAL_IF_FAIL(num_types != NULL, TDM_ERROR_INVALID_PARAMETER);
- int need_reset_wnds_to_client, need_map_hwc_windows_to_layers;
- int prev_need_target_window;
+ int need_map_hwc_windows_to_layers;
exynos_data = exynos_output->exynos_data;
RETURN_VAL_IF_FAIL(exynos_data != NULL, TDM_ERROR_INVALID_PARAMETER);
_reset_composition_types(&exynos_output->hwc_window_list);
} else {
- prev_need_target_window = exynos_output->need_target_window;
-
need_map_hwc_windows_to_layers = _need_map_hwc_windows_to_layers(exynos_output);
if (need_map_hwc_windows_to_layers)
_map_hwc_windows_to_layers(exynos_output);
- need_reset_wnds_to_client =
- _is_reset_to_client_needed(&exynos_output->hwc_window_list);
-
- if (need_reset_wnds_to_client) {
- _reset_windows_to_client(&exynos_output->hwc_window_list);
- _restore_windows_assigned_layer_zpos(&exynos_output->hwc_window_list);
-
- exynos_output->need_target_window = prev_need_target_window;
- }
-
- /* while the window has a client_candidate state it waits till
- * client (e20) moves it to a client state, thus skips any attempt
- * to set a device state for it, so after the window has changed it
- * state from client_candidate to client we have to get e20 a shot
- * to set a device state if any */
- if (_need_to_revalidate(&exynos_output->hwc_window_list)) {
- TDM_INFO("need the revalidation");
- tdm_backend_trigger_need_validate_event(output);
- }
-
_update_windows_previous_type(&exynos_output->hwc_window_list);
_update_windows_previous_assigned_layer_zpos(&exynos_output->hwc_window_list);
}