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

Change-Id: Ibee5a68b866c828445f6057cd8f30f2b938cf82a

src/tdm_vc4.c
src/tdm_vc4.h
src/tdm_vc4_display.c

index 90dc0f1..1a6a034 100644 (file)
@@ -302,7 +302,7 @@ tdm_vc4_init(tdm_display *dpy, tdm_error *error)
                vc4_func_hwc.hwc_set_client_target_buffer = vc4_hwc_set_client_target_buffer;
                vc4_func_hwc.hwc_validate = vc4_hwc_validate;
                vc4_func_hwc.hwc_get_changed_composition_types = vc4_hwc_get_changed_composition_types;
-               vc4_func_hwc.hwc_accept_changes = vc4_hwc_accept_changes;
+               vc4_func_hwc.hwc_accept_validation = vc4_hwc_accept_validation;
                vc4_func_hwc.hwc_commit = vc4_hwc_commit;
                vc4_func_hwc.hwc_set_commit_handler = vc4_hwc_set_commit_handler;
 
index 309fb4a..78f0444 100644 (file)
@@ -58,7 +58,7 @@ tbm_surface_queue_h  vc4_hwc_get_client_target_buffer_queue(tdm_hwc *hwc, tdm_er
 tdm_error            vc4_hwc_set_client_target_buffer(tdm_hwc *hwc, tbm_surface_h buffer, tdm_region damage);
 tdm_error            vc4_hwc_validate(tdm_hwc *hwc, tdm_hwc_window **composited_wnds, uint32_t num_wnds, uint32_t *num_types);
 tdm_error            vc4_hwc_get_changed_composition_types(tdm_hwc *hwc, uint32_t *num_elements, tdm_hwc_window **hwc_window, tdm_hwc_window_composition *composition_types);
-tdm_error            vc4_hwc_accept_changes(tdm_hwc *hwc);
+tdm_error            vc4_hwc_accept_validation(tdm_hwc *hwc);
 tdm_error            vc4_hwc_commit(tdm_hwc *hwc, int sync, void *user_data);
 tdm_error            vc4_hwc_set_commit_handler(tdm_hwc *hwc, tdm_hwc_commit_handler func);
 
index 79b4fc2..c8b08d8 100644 (file)
@@ -139,11 +139,11 @@ struct _tdm_vc4_hwc_window_data {
 static 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";
 
        return "unknown";
@@ -1023,7 +1023,7 @@ _tdm_vc4_display_prepare_commit(tdm_vc4_output_data *output_data) {
                if (output_data->need_target_buffer && i == fb_idx) {
                        i--;
                }
-               if (hw->client_type != TDM_COMPOSITION_DEVICE)
+               if (hw->client_type != TDM_HWC_WIN_COMPOSITION_DEVICE)
                        continue;
                RETURN_VAL_IF_FAIL(i >= 0, TDM_ERROR_OPERATION_FAILED);
                layer = _vc4_output_get_layer(output_data, i--);
@@ -2223,14 +2223,14 @@ vc4_hwc_validate(tdm_hwc *hwc, tdm_hwc_window **composited_wnds,
                need_target_buffer = 1;
 
                LIST_FOR_EACH_ENTRY(hw, &hwc_data->hwc_window_list, link) {
-                       hw->validated_type = TDM_COMPOSITION_CLIENT;
+                       hw->validated_type = TDM_HWC_WIN_COMPOSITION_CLIENT;
                }
        } else {
                int layer_idx;
                int num_hwc_windows = LIST_LENGTH(&hwc_data->hwc_window_list);
 
                LIST_FOR_EACH_ENTRY(hw, &hwc_data->hwc_window_list, link) {
-                       hw->validated_type = TDM_COMPOSITION_CLIENT;
+                       hw->validated_type = TDM_HWC_WIN_COMPOSITION_CLIENT;
                }
 
                /* mark the top window */
@@ -2238,10 +2238,10 @@ vc4_hwc_validate(tdm_hwc *hwc, tdm_hwc_window **composited_wnds,
                        layer_idx = max_hw_layer;
                        LIST_FOR_EACH_ENTRY_REV(hw, &hwc_data->hwc_window_list, link) {
                                layer_idx--;
-                               if (hw->client_type == TDM_COMPOSITION_DEVICE && layer_idx != fb_index) {
+                               if (hw->client_type == TDM_HWC_WIN_COMPOSITION_DEVICE && layer_idx != fb_index) {
                                        //check format
                                        if (IS_RGB(hw->info.src_config.format)) {
-                                               hw->validated_type = TDM_COMPOSITION_DEVICE;
+                                               hw->validated_type = TDM_HWC_WIN_COMPOSITION_DEVICE;
                                                hw_layer_count++;
                                                top_layer_idx++;
                                                continue;
@@ -2263,12 +2263,12 @@ vc4_hwc_validate(tdm_hwc *hwc, tdm_hwc_window **composited_wnds,
                LIST_FOR_EACH_ENTRY(hw, &hwc_data->hwc_window_list, link) {
                        layer_idx++;
                        /* break if the remaining windows are already marked */
-                       if (hw->validated_type == TDM_COMPOSITION_DEVICE)
+                       if (hw->validated_type == TDM_HWC_WIN_COMPOSITION_DEVICE)
                                break;
-                       if (hw->client_type == TDM_COMPOSITION_DEVICE && layer_idx < max_hw_layer) {
+                       if (hw->client_type == TDM_HWC_WIN_COMPOSITION_DEVICE && layer_idx < max_hw_layer) {
                                //check format
                                if (IS_RGB(hw->info.src_config.format)) {
-                                       hw->validated_type = TDM_COMPOSITION_DEVICE;
+                                       hw->validated_type = TDM_HWC_WIN_COMPOSITION_DEVICE;
                                        hw_layer_count++;
                                        continue;
                                }
@@ -2339,7 +2339,7 @@ vc4_hwc_get_changed_composition_types(tdm_hwc *hwc,
 }
 
 tdm_error
-vc4_hwc_accept_changes(tdm_hwc *hwc)
+vc4_hwc_accept_validation(tdm_hwc *hwc)
 {
        tdm_vc4_hwc_data *hwc_data = hwc;