hwc: initialize the constraints at the Validation. 21/191821/1
authorSooChan Lim <sc1.lim@samsung.com>
Tue, 23 Oct 2018 08:06:44 +0000 (17:06 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Tue, 23 Oct 2018 08:07:27 +0000 (17:07 +0900)
Change-Id: If0ef08228f2641ec3e326651ddac98ef6d003d7d

src/tdm_sprd_hwc.c
src/tdm_sprd_hwc_window.c

index ab607d313c7c140d6db01951f453d3868ec43030..d9fc84d2a2019ef188ec27322abeb19de7cd0855 100644 (file)
@@ -356,6 +356,7 @@ sprd_hwc_validate(tdm_hwc *hwc, tdm_hwc_window **composited_wnds, uint32_t num_w
        if (num_wnds == 0) {
                hwc_data->need_target_window = 1;
        } else if (num_wnds == 1) {
+               composited_list[0]->constraints = TDM_CONSTRAINT_NONE;
                if (composited_list[0]->client_type == TDM_COMPOSITION_DEVICE) {
                        if (_sprd_can_set_hwc_window_on_hw_layer(composited_list[0])) {
                                hwc_data->need_target_window = 0;
@@ -387,6 +388,7 @@ sprd_hwc_validate(tdm_hwc *hwc, tdm_hwc_window **composited_wnds, uint32_t num_w
                }
 
                for (i = 0 ; i < num_wnds; i++) {
+                       composited_list[i]->constraints = TDM_CONSTRAINT_NONE;
                    if (num_wnds == 2 && has_video == 1) {
                                if (composited_list[i]->client_type == TDM_COMPOSITION_DEVICE) {
                                        if (_sprd_can_set_hwc_window_on_hw_layer(composited_list[i])) {
index e7c43c31a023383cfec4ac845b2f8b99ef0c22f1..2607be7a5d540a1a5603978f80790adcf21d0c33 100644 (file)
@@ -77,8 +77,6 @@ sprd_hwc_window_set_composition_type(tdm_hwc_window *hwc_window,
        RETURN_VAL_IF_FAIL(hwc_window_data != NULL, TDM_ERROR_INVALID_PARAMETER);
        RETURN_VAL_IF_FAIL(hwc_data != NULL, TDM_ERROR_INVALID_PARAMETER);
 
-       hwc_window_data->constraints = TDM_CONSTRAINT_NONE;
-
        if (hwc_window_data->client_type == comp_type)
                return TDM_ERROR_NONE;