remove the old implementation of 'smooth transition' mechanism. 71/163471/2
authorSergey Sizonov <s.sizonov@samsung.com>
Mon, 11 Dec 2017 09:52:18 +0000 (12:52 +0300)
committerSergey Sizonov <s.sizonov@samsung.com>
Mon, 11 Dec 2017 10:01:05 +0000 (13:01 +0300)
Change-Id: Iaf5f1c46e09dfe7f9ad0dcd2ec10835481bdb831
Signed-off-by: Sergey Sizonov <s.sizonov@samsung.com>
src/tdm_exynos_output.c
src/tdm_exynos_window.c

index c80284ff0f5daedafe3e8fb895de6f5ad6f30be7..561e203ef934d333a86c289dbc06ab1e3dd38e6e 100644 (file)
@@ -882,8 +882,7 @@ _find_maped_hwc_window_to_layer(struct list_head *hwc_wnds, int layer_zpos)
                        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;
        }
 
@@ -1276,8 +1275,6 @@ _comp_to_str(tdm_hwc_window_composition composition_type)
 {
        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)
@@ -1322,24 +1319,6 @@ _update_windows_previous_type(struct list_head *hwc_wnds)
                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)
 {
@@ -1355,69 +1334,6 @@ _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)
 {
@@ -1574,8 +1490,7 @@ _print_validate_result(tdm_exynos_output_data *exynos_output)
                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);
@@ -1629,8 +1544,7 @@ exynos_output_hwc_validate(tdm_output *output, uint32_t *num_types)
        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);
@@ -1640,33 +1554,11 @@ exynos_output_hwc_validate(tdm_output *output, uint32_t *num_types)
 
                _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);
        }
index f8d9cac6d08dc3340f46f453f98f6b16d0759992..7b30eb2353bb8fbcc9ed4c2e41d3719479a40fb4 100644 (file)
@@ -80,13 +80,6 @@ exynos_hwc_window_set_composition_type(tdm_hwc_window *hwc_window,
        RETURN_VAL_IF_FAIL(exynos_output != NULL, TDM_ERROR_INVALID_PARAMETER);
        RETURN_VAL_IF_FAIL(exynos_output->video_hwc_window != exynos_hwc_window, TDM_ERROR_INVALID_PARAMETER);
 
-       /* TODO: allow set TDM_COMPOSITION_NONE type to hwc_widnow with
-        * TDM_COMPOSITION_CLIENT_CANDIDATE type.
-        */
-       if (exynos_hwc_window->client_type == TDM_COMPOSITION_CLIENT_CANDIDATE &&
-               comp_type != TDM_COMPOSITION_CLIENT)
-               return TDM_ERROR_INVALID_PARAMETER;
-
        if (exynos_hwc_window->client_type == comp_type)
                return TDM_ERROR_NONE;
 
@@ -256,4 +249,4 @@ exynos_hwc_window_video_set_property(tdm_hwc_window *hwc_window, unsigned int id
        layer_data = _exynos_output_get_layer(output_data, exynos_hwc_window->assigned_layer_zpos);
 
        return exynos_layer_set_property(layer_data, id, value);
-}
\ No newline at end of file
+}