hwc: modify the tdm symbols 23/192823/1
authorSooChan Lim <sc1.lim@samsung.com>
Fri, 9 Nov 2018 10:25:34 +0000 (19:25 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Fri, 9 Nov 2018 10:25:34 +0000 (19:25 +0900)
tdm api and some enumeration vaules change

Change-Id: I47d92db3bab08f1b48d1fe0e09eccf834fd41e24

src/tdm_exynos.c
src/tdm_exynos.h
src/tdm_exynos_hwc.c
src/tdm_exynos_hwc_window.c

index 289a4d732a4ef4fd1a5e6e3ef60abf1980a8809d..89e8baaf4c7c617ec8d3d1406c3a961429003317 100644 (file)
@@ -380,7 +380,7 @@ tdm_exynos_init(tdm_display *dpy, tdm_error *error)
                exynos_func_hwc.hwc_set_client_target_buffer = exynos_hwc_set_client_target_buffer;
                exynos_func_hwc.hwc_validate = exynos_hwc_validate;
                exynos_func_hwc.hwc_get_changed_composition_types = exynos_hwc_get_changed_composition_types;
-               exynos_func_hwc.hwc_accept_changes  = exynos_hwc_accept_changes;
+               exynos_func_hwc.hwc_accept_validation  = exynos_hwc_accept_validation;
                exynos_func_hwc.hwc_commit = exynos_hwc_commit;
                exynos_func_hwc.hwc_set_commit_handler = exynos_hwc_set_commit_handler;
 
index b480984db1699e13b8ea8eb9885c04edc2f0de96..6a347eb35f0f903c30c4b04b2e1842e750042ff4 100644 (file)
@@ -77,7 +77,7 @@ tbm_surface_queue_h  exynos_hwc_get_client_target_buffer_queue(tdm_hwc *hwc, tdm
 tdm_error            exynos_hwc_set_client_target_buffer(tdm_hwc *hwc, tbm_surface_h buffer, tdm_region damage);
 tdm_error            exynos_hwc_validate(tdm_hwc *hwc, tdm_hwc_window **composited_wnds, uint32_t num_wnds, uint32_t *num_types);
 tdm_error            exynos_hwc_get_changed_composition_types(tdm_hwc *hwc, uint32_t *num_elements, tdm_hwc_window **hwc_wnds, tdm_hwc_window_composition *composition_types);
-tdm_error            exynos_hwc_accept_changes(tdm_hwc *hwc);
+tdm_error            exynos_hwc_accept_validation(tdm_hwc *hwc);
 tdm_error            exynos_hwc_commit(tdm_hwc *hwc, int sync, void *user_data);
 tdm_error            exynos_hwc_set_commit_handler(tdm_hwc *hwc, tdm_hwc_commit_handler func);
 
index 77ebe10c2f6df15e88285ff43eb863fa8f3964dc..a250987d4f3ef508296f26b578baf4f372dca137 100644 (file)
@@ -14,15 +14,15 @@ _exynos_hwc_create_window(tdm_hwc *hwc, tdm_hwc_window_info *info,
 const char *
 _comp_to_str(tdm_hwc_window_composition composition_type)
 {
-       if (composition_type == TDM_COMPOSITION_CLIENT)
+       if (composition_type == TDM_HWC_WIN_COMPOSITION_CLIENT)
                return "CLIENT";
-       else if (composition_type == TDM_COMPOSITION_DEVICE)
+       else if (composition_type == TDM_HWC_WIN_COMPOSITION_DEVICE)
                return "DEVICE";
-       else if (composition_type == TDM_COMPOSITION_CURSOR)
+       else if (composition_type == TDM_HWC_WIN_COMPOSITION_CURSOR)
                return "CURSOR";
-       else if (composition_type == TDM_COMPOSITION_VIDEO)
+       else if (composition_type == TDM_HWC_WIN_COMPOSITION_VIDEO)
                return "VIDEO";
-       else if (composition_type == TDM_COMPOSITION_NONE)
+       else if (composition_type == TDM_HWC_WIN_COMPOSITION_NONE)
                return "SKIP";
 
        return "unknown";
@@ -92,13 +92,13 @@ _find_maped_hwc_window_to_layer(struct list_head *hwc_wnds, int layer_zpos)
        tdm_exynos_hwc_window_data *hwc_window_data = NULL;
 
        LIST_FOR_EACH_ENTRY(hwc_window_data, hwc_wnds, link) {
-               if (hwc_window_data->client_type == TDM_COMPOSITION_NONE)
+               if (hwc_window_data->client_type == TDM_HWC_WIN_COMPOSITION_NONE)
                        continue;
 
                if (hwc_window_data->assigned_layer_zpos == layer_zpos &&
-                       (hwc_window_data->validated_type == TDM_COMPOSITION_DEVICE ||
-                        hwc_window_data->validated_type == TDM_COMPOSITION_CURSOR ||
-                        hwc_window_data->validated_type == TDM_COMPOSITION_VIDEO)) {
+                       (hwc_window_data->validated_type == TDM_HWC_WIN_COMPOSITION_DEVICE ||
+                        hwc_window_data->validated_type == TDM_HWC_WIN_COMPOSITION_CURSOR ||
+                        hwc_window_data->validated_type == TDM_HWC_WIN_COMPOSITION_VIDEO)) {
                                TDM_DBG(" window(%p) type: %s -> %s : candidate_zpos:%d assigned_zpos:%d", hwc_window_data,
                                                _comp_to_str(hwc_window_data->client_type), _comp_to_str(hwc_window_data->validated_type),
                                                hwc_window_data->candidate_layer_zpos, hwc_window_data->assigned_layer_zpos);
@@ -137,7 +137,7 @@ _exynos_hwc_find_assigned_hwc_window(struct list_head *hwc_wnds, int layer_zpos)
        tdm_exynos_hwc_window_data *hwc_window_data = NULL;
 
        LIST_FOR_EACH_ENTRY(hwc_window_data, hwc_wnds, link) {
-               if (hwc_window_data->client_type == TDM_COMPOSITION_NONE)
+               if (hwc_window_data->client_type == TDM_HWC_WIN_COMPOSITION_NONE)
                        continue;
 
                if (hwc_window_data->assigned_layer_zpos == layer_zpos) {
@@ -228,7 +228,7 @@ _exynos_hwc_adapt_policy(tdm_exynos_hwc_data *hwc_data , tdm_hwc_window **compos
 
        /* reset the validated_type and hw layer policy */
        for (i = 0; i < num_wnds; i++) {
-               if (composited_list[i]->client_type == TDM_COMPOSITION_VIDEO) {
+               if (composited_list[i]->client_type == TDM_HWC_WIN_COMPOSITION_VIDEO) {
                        composited_list[i]->validated_type = composited_list[i]->client_type;
                        composited_list[i]->candidate_layer_zpos = 0;
                        ++num_videos;
@@ -238,10 +238,10 @@ _exynos_hwc_adapt_policy(tdm_exynos_hwc_data *hwc_data , tdm_hwc_window **compos
                        continue;
                }
 
-               composited_list[i]->validated_type = TDM_COMPOSITION_CLIENT;
+               composited_list[i]->validated_type = TDM_HWC_WIN_COMPOSITION_CLIENT;
                composited_list[i]->candidate_layer_zpos = -1;
 
-               /* The validate type of all windows below this window are TDM_COMPOSITION_CLIENT
+               /* The validate type of all windows below this window are TDM_HWC_WIN_COMPOSITION_CLIENT
                 * if the upper window is TDM_COMPSITION_CLIENT type.
                 */
                if (num_clients > 0) {
@@ -250,7 +250,7 @@ _exynos_hwc_adapt_policy(tdm_exynos_hwc_data *hwc_data , tdm_hwc_window **compos
                }
 
                /* increase the num_clients when the type of the window is TDM_COMPOSITE_CLIENT. */
-               if (composited_list[i]->client_type == TDM_COMPOSITION_CLIENT) {
+               if (composited_list[i]->client_type == TDM_HWC_WIN_COMPOSITION_CLIENT) {
                        ++num_clients;
                        /* need target_window to composite */
                        ++min_zpos;
@@ -285,13 +285,13 @@ _exynos_hwc_adapt_policy(tdm_exynos_hwc_data *hwc_data , tdm_hwc_window **compos
 
        /* assgin the hw layers to the ui windows from the top to the bottom */
        for (i = 0; i < num_wnds; i++) {
-               if (composited_list[i]->client_type == TDM_COMPOSITION_VIDEO)
+               if (composited_list[i]->client_type == TDM_HWC_WIN_COMPOSITION_VIDEO)
                        continue;
                if (available_layers == 0)
                        break;
 
-               if (composited_list[i]->client_type == TDM_COMPOSITION_DEVICE ||
-                   composited_list[i]->client_type == TDM_COMPOSITION_CURSOR) {
+               if (composited_list[i]->client_type == TDM_HWC_WIN_COMPOSITION_DEVICE ||
+                   composited_list[i]->client_type == TDM_HWC_WIN_COMPOSITION_CURSOR) {
                        if (_can_set_hwc_window_on_hw_layer(composited_list[i])) {
                                composited_list[i]->validated_type = composited_list[i]->client_type;
                                composited_list[i]->candidate_layer_zpos = max_zpos;
@@ -308,10 +308,10 @@ set_all_client_types:
        TDM_DBG("Set all windows to be CLIENT type due to hw restriction.!!");
 
        for (i = 0; i < num_wnds; i++) {
-               if (composited_list[i]->client_type == TDM_COMPOSITION_VIDEO)
+               if (composited_list[i]->client_type == TDM_HWC_WIN_COMPOSITION_VIDEO)
                        continue;
 
-               composited_list[i]->validated_type = TDM_COMPOSITION_CLIENT;
+               composited_list[i]->validated_type = TDM_HWC_WIN_COMPOSITION_CLIENT;
                composited_list[i]->candidate_layer_zpos = -1;
        }
 
@@ -326,12 +326,12 @@ _print_validate_result(tdm_exynos_hwc_data *hwc_data)
        int primary_layer_zpos = _exynos_hwc_get_primary_layer_zpos(hwc_data);
 
        LIST_FOR_EACH_ENTRY(hwc_window_data, &hwc_data->hwc_window_list, link) {
-               if (hwc_window_data->client_type == TDM_COMPOSITION_NONE)
+               if (hwc_window_data->client_type == TDM_HWC_WIN_COMPOSITION_NONE)
                        continue;
 
-               if (hwc_window_data->validated_type == TDM_COMPOSITION_DEVICE ||
-                   hwc_window_data->validated_type == TDM_COMPOSITION_CURSOR ||
-                       hwc_window_data->validated_type == TDM_COMPOSITION_VIDEO)
+               if (hwc_window_data->validated_type == TDM_HWC_WIN_COMPOSITION_DEVICE ||
+                   hwc_window_data->validated_type == TDM_HWC_WIN_COMPOSITION_CURSOR ||
+                       hwc_window_data->validated_type == TDM_HWC_WIN_COMPOSITION_VIDEO)
                        TDM_DBG(" window(%p) type: %s -> %s : is mapped to layer with %d zpos", hwc_window_data,
                                        _comp_to_str(hwc_window_data->client_type), _comp_to_str(hwc_window_data->validated_type),
                                        hwc_window_data->candidate_layer_zpos);
@@ -348,7 +348,7 @@ _exynos_hwc_assigned_layer_zpos_update(tdm_exynos_hwc_data *hwc_data)
        tdm_exynos_hwc_window_data *hwc_window_data = NULL;
 
        LIST_FOR_EACH_ENTRY(hwc_window_data, &hwc_data->hwc_window_list, link) {
-               if (hwc_window_data->client_type == TDM_COMPOSITION_NONE)
+               if (hwc_window_data->client_type == TDM_HWC_WIN_COMPOSITION_NONE)
                        continue;
 
                if (hwc_window_data->candidate_layer_zpos == -1) {
@@ -371,7 +371,7 @@ _exynos_hwc_get_changed_number(tdm_exynos_hwc_data *hwc_data)
        tdm_exynos_hwc_window_data *hwc_window_data = NULL;
 
        LIST_FOR_EACH_ENTRY(hwc_window_data, &hwc_data->hwc_window_list, link) {
-               if (hwc_window_data->client_type == TDM_COMPOSITION_NONE)
+               if (hwc_window_data->client_type == TDM_HWC_WIN_COMPOSITION_NONE)
                        continue;
                if (hwc_window_data->client_type != hwc_window_data->validated_type)
                        num++;
@@ -451,7 +451,7 @@ _exynos_hwc_create_window(tdm_hwc *hwc, tdm_hwc_window_info *info, tdm_error *er
                return NULL;
        }
 
-       hwc_window_data->client_type = TDM_COMPOSITION_NONE;
+       hwc_window_data->client_type = TDM_HWC_WIN_COMPOSITION_NONE;
        hwc_window_data->validated_type = -1;
        hwc_window_data->assigned_layer_zpos = -1;
 
@@ -646,7 +646,7 @@ exynos_hwc_get_changed_composition_types(tdm_hwc *hwc, uint32_t *num_elements, t
        }
 
        LIST_FOR_EACH_ENTRY_REV(hwc_window_data, &hwc_data->hwc_window_list, link) {
-               if (hwc_window_data->client_type == TDM_COMPOSITION_NONE)
+               if (hwc_window_data->client_type == TDM_HWC_WIN_COMPOSITION_NONE)
                        continue;
 
                if (num >= *num_elements)
@@ -666,7 +666,7 @@ exynos_hwc_get_changed_composition_types(tdm_hwc *hwc, uint32_t *num_elements, t
 }
 
 tdm_error
-exynos_hwc_accept_changes(tdm_hwc *hwc)
+exynos_hwc_accept_validation(tdm_hwc *hwc)
 {
        tdm_exynos_hwc_data *hwc_data = hwc;
 
index 79485b6f8e8c25ced413efa4b26a324bc308f082..23b352a7481bd45ec38440afc539e9be6648cb9e 100644 (file)
@@ -36,8 +36,8 @@ exynos_hwc_window_set_composition_type(tdm_hwc_window *hwc_window,
        hwc_window_data->client_type = comp_type;
 
        /* if the type is none, reset all status */
-       if (hwc_window_data->client_type == TDM_COMPOSITION_NONE) {
-               hwc_window_data->client_type = TDM_COMPOSITION_NONE;
+       if (hwc_window_data->client_type == TDM_HWC_WIN_COMPOSITION_NONE) {
+               hwc_window_data->client_type = TDM_HWC_WIN_COMPOSITION_NONE;
                hwc_window_data->validated_type = -1;
                hwc_window_data->candidate_layer_zpos = -1;
                hwc_window_data->assigned_layer_zpos = -1;