summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSooChan Lim <sc1.lim@samsung.com>2019-03-19 10:46:17 +0900
committerSooChan Lim <sc1.lim@samsung.com>2019-03-19 11:20:19 +0900
commit80e44df3d9ce9635c2708cbfa35054510cbcde97 (patch)
treeb7ce11469ecb35bb30bc9818f65b9d5a004a8dbb
parentceac76557b7a478b47de6c9865c56e636e3e2e7f (diff)
downloadlibtdm-sprd-80e44df3d9ce9635c2708cbfa35054510cbcde97.tar.gz
libtdm-sprd-80e44df3d9ce9635c2708cbfa35054510cbcde97.tar.bz2
libtdm-sprd-80e44df3d9ce9635c2708cbfa35054510cbcde97.zip
hwc: change the variable from i to lzpos
Change-Id: Id9fb11c3c01e57205611be663aef4c24bd7b34fb
-rw-r--r--src/tdm_sprd_hwc.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/tdm_sprd_hwc.c b/src/tdm_sprd_hwc.c
index 17d4675..0bdf783 100644
--- a/src/tdm_sprd_hwc.c
+++ b/src/tdm_sprd_hwc.c
@@ -168,7 +168,7 @@ _sprd_hwc_prepare_commit(tdm_sprd_hwc_data *hwc_data)
tdm_sprd_hwc_window_data *hwc_window_data = NULL;
tdm_sprd_layer_data *layer_data = NULL;
int use_layers_zpos[NUM_LAYERS] = {0,};
- int i;
+ int lzpos = 0;
/* set target hwc window to the layer */
if (hwc_data->need_target_window) {
@@ -180,8 +180,9 @@ _sprd_hwc_prepare_commit(tdm_sprd_hwc_data *hwc_data)
/* set the hwc_windows to the layers */
LIST_FOR_EACH_ENTRY_REV(hwc_window_data, &hwc_data->hwc_window_list, link) {
if (hwc_window_data->validated_type == TDM_HWC_WIN_COMPOSITION_NONE ||
- hwc_window_data->validated_type == TDM_HWC_WIN_COMPOSITION_CLIENT)
+ hwc_window_data->validated_type == TDM_HWC_WIN_COMPOSITION_CLIENT)
continue;
+
if (hwc_window_data == hwc_data->target_hwc_window)
continue;
@@ -191,14 +192,20 @@ _sprd_hwc_prepare_commit(tdm_sprd_hwc_data *hwc_data)
}
/* unset the unused layers */
- for (i = 0; i < NUM_LAYERS; i++) {
- if (use_layers_zpos[i])
+ for (lzpos = 0; lzpos < NUM_LAYERS; lzpos++) {
+ if (use_layers_zpos[lzpos])
continue;
- layer_data = tdm_sprd_output_get_layer(hwc_data->output_data, use_layers_zpos[i]);
+ layer_data = tdm_sprd_output_get_layer(hwc_data->output_data, use_layers_zpos[lzpos]);
_sprd_hwc_layer_attach_window(layer_data, NULL);
}
+ /* for debug */
+ for (lzpos = NUM_LAYERS -1 ; lzpos >= 0; lzpos--) {
+ if (use_layers_zpos[lzpos])
+ TDM_DBG(" lzpos(%d) : %s", lzpos, use_layers_zpos[lzpos] ? "SET" : "UNSET");
+ }
+
return TDM_ERROR_NONE;
}