hwc: remove the unused variable 20/191820/1
authorSooChan Lim <sc1.lim@samsung.com>
Mon, 22 Oct 2018 08:45:44 +0000 (17:45 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 22 Oct 2018 08:46:23 +0000 (17:46 +0900)
remove the need_validate
Change-Id: I69fd53862b2a862715c2c6f7b002d368c3e64158

src/tdm_sprd.h
src/tdm_sprd_hwc.c
src/tdm_sprd_hwc_window.c

index f30c429..e20b527 100644 (file)
@@ -252,12 +252,10 @@ struct _tdm_sprd_layer_data {
 
 struct _tdm_sprd_hwc_data {
        tdm_sprd_hwc_window_data *target_hwc_window;
+       int target_window_zpos;
 
-       int need_validate;
        int need_target_window;
 
-       int target_window_zpos;
-
        tdm_sprd_output_data *output_data;
        struct list_head hwc_window_list;
 
index b6d2aab..ab607d3 100644 (file)
@@ -107,15 +107,17 @@ _sprd_layer_attach_window(tdm_sprd_layer_data *layer_data, tdm_sprd_hwc_window_d
                ret = sprd_layer_set_buffer(layer_data, hwc_window_data->display_buffer->buffer);
                RETURN_VAL_IF_FAIL(ret == TDM_ERROR_NONE, ret);
        }
+
        return ret;
 }
 
 tdm_sprd_layer_data *
 _sprd_output_get_layer(tdm_sprd_output_data *output_data, int index)
 {
+       tdm_sprd_layer_data *l = NULL;
+
        RETURN_VAL_IF_FAIL(output_data, NULL);
 
-       tdm_sprd_layer_data *l = NULL;
        LIST_FOR_EACH_ENTRY(l, &output_data->layer_list, link)
                if (l->zpos == index)
                        return l;
@@ -150,7 +152,6 @@ _sprd_display_prepare_commit(tdm_sprd_output_data *output_data) {
 
        hwc_data = output_data->hwc_data;
        RETURN_VAL_IF_FAIL(hwc_data, 0);
-       RETURN_VAL_IF_FAIL(hwc_data->need_validate == 0, TDM_ERROR_OPERATION_FAILED);
 
        if (!_sprd_get_number_of_visible_windows(hwc_data))
                hwc_data->need_target_window = 1;
@@ -422,8 +423,6 @@ sprd_hwc_validate(tdm_hwc *hwc, tdm_hwc_window **composited_wnds, uint32_t num_w
        }
 
        *num_types = _sprd_output_get_changed_number(hwc_data);
-       if (*num_types == 0)
-               hwc_data->need_validate = 0;
 
        return TDM_ERROR_NONE;
 }
@@ -433,6 +432,7 @@ sprd_hwc_get_changed_composition_types(tdm_hwc *hwc, uint32_t *num_elements,
                                tdm_hwc_window **hwc_window, tdm_hwc_window_composition *composition_types)
 {
        tdm_sprd_hwc_data *hwc_data = hwc;
+       tdm_sprd_hwc_window_data *hwc_window_data = NULL;
        int num = 0;
 
        RETURN_VAL_IF_FAIL(hwc_data != NULL, TDM_ERROR_INVALID_PARAMETER);
@@ -443,7 +443,6 @@ sprd_hwc_get_changed_composition_types(tdm_hwc *hwc, uint32_t *num_elements,
                return TDM_ERROR_NONE;
        }
 
-       tdm_sprd_hwc_window_data *hwc_window_data = NULL;
        LIST_FOR_EACH_ENTRY_REV(hwc_window_data, &hwc_data->hwc_window_list, link) {
                if (hwc_window_data->client_type == TDM_COMPOSITION_NONE)
                        continue;
@@ -479,8 +478,6 @@ sprd_hwc_accept_changes(tdm_hwc *hwc)
                hwc_window_data->client_type = hwc_window_data->validated_type;
        }
 
-       hwc_data->need_validate = 0;
-
        return TDM_ERROR_NONE;
 }
 
index e21384e..e7c43c3 100644 (file)
@@ -84,8 +84,6 @@ sprd_hwc_window_set_composition_type(tdm_hwc_window *hwc_window,
 
        hwc_window_data->client_type = comp_type;
 
-       hwc_data->need_validate = 1;
-
        return TDM_ERROR_NONE;
 }
 
@@ -115,7 +113,6 @@ sprd_hwc_window_set_info(tdm_hwc_window *hwc_window, tdm_hwc_window_info *info)
                return TDM_ERROR_NONE;
 
        hwc_window_data->info = *info;
-       hwc_data->need_validate = 1;
 
        return TDM_ERROR_NONE;
 }