summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSooChan Lim <sc1.lim@samsung.com>2019-03-19 10:45:46 +0900
committerSooChan Lim <sc1.lim@samsung.com>2019-03-19 10:45:46 +0900
commitceac76557b7a478b47de6c9865c56e636e3e2e7f (patch)
tree866dc5e0da9920f6467cb7dc422a8166376e7067
parentdc15c3c1de11e59186567f98ef2cd799efcefc52 (diff)
downloadlibtdm-sprd-ceac76557b7a478b47de6c9865c56e636e3e2e7f.tar.gz
libtdm-sprd-ceac76557b7a478b47de6c9865c56e636e3e2e7f.tar.bz2
libtdm-sprd-ceac76557b7a478b47de6c9865c56e636e3e2e7f.zip
hwc: fix the typo and the comments
Change-Id: Icb1d59ee5d2a6947e89a24a50fb631f409c328b9
-rw-r--r--src/tdm_sprd_hwc.c22
-rw-r--r--src/tdm_sprd_hwc_window.c1
2 files changed, 14 insertions, 9 deletions
diff --git a/src/tdm_sprd_hwc.c b/src/tdm_sprd_hwc.c
index 1175132..17d4675 100644
--- a/src/tdm_sprd_hwc.c
+++ b/src/tdm_sprd_hwc.c
@@ -111,19 +111,22 @@ _sprd_hwc_window_get_tbm_surface_queue(tdm_hwc_window *hwc_window, tdm_error *er
{
tdm_sprd_hwc_window_data *hwc_window_data = NULL;
tbm_surface_queue_h tqueue = NULL;
+ int width, height;
+ tbm_format format;
if (error)
*error = TDM_ERROR_INVALID_PARAMETER;
RETURN_VAL_IF_FAIL(hwc_window != NULL, NULL);
+
hwc_window_data = hwc_window;
- int wight = hwc_window_data->info.src_config.size.h;
- int hight = hwc_window_data->info.src_config.size.v;
- tbm_format format = hwc_window_data->info.src_config.format;
+ width = hwc_window_data->info.src_config.size.h;
+ height = hwc_window_data->info.src_config.size.v;
+ format = hwc_window_data->info.src_config.format;
if (!hwc_window_data->tqueue) {
- tqueue = tbm_surface_queue_create(NUM_BUFFERS, wight, hight, format, TBM_BO_SCANOUT);
+ tqueue = tbm_surface_queue_create(NUM_BUFFERS, width, height, format, TBM_BO_SCANOUT);
if (error)
*error = TDM_ERROR_OPERATION_FAILED;
RETURN_VAL_IF_FAIL(tqueue != NULL, NULL);
@@ -167,14 +170,14 @@ _sprd_hwc_prepare_commit(tdm_sprd_hwc_data *hwc_data)
int use_layers_zpos[NUM_LAYERS] = {0,};
int i;
- /* set target hwc window */
+ /* set target hwc window to the layer */
if (hwc_data->need_target_window) {
layer_data = tdm_sprd_output_get_layer(hwc_data->output_data, ZPOS_OSD);
_sprd_hwc_layer_attach_window(layer_data, hwc_data->target_hwc_window);
use_layers_zpos[hwc_data->target_hwc_window->lzpos] = 1;
}
- /* set hwc windows */
+ /* 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)
@@ -199,6 +202,9 @@ _sprd_hwc_prepare_commit(tdm_sprd_hwc_data *hwc_data)
return TDM_ERROR_NONE;
}
+/* assign the validated_type to the composited_wnds
+ * assign the layer_zpos to the composited_wnds
+ */
static void
_sprd_hwc_apply_policy(tdm_sprd_hwc_data *hwc_data , tdm_hwc_window **composited_wnds, uint32_t num_wnds)
{
@@ -436,6 +442,7 @@ sprd_hwc_get_client_target_buffer_queue(tdm_hwc *hwc, tdm_error *error)
if (error)
*error = TDM_ERROR_NONE;
+
return tqueue;
}
@@ -445,9 +452,6 @@ sprd_hwc_set_client_target_buffer(tdm_hwc *hwc, tbm_surface_h buffer, tdm_region
tdm_sprd_hwc_data *hwc_data = hwc;
tdm_error err;
- /* TODO: as the sprd-driver currently doesn't support DEVICE to CLIENT transition.
- * we silence skip 'composited_wnds' */
-
RETURN_VAL_IF_FAIL(hwc_data != NULL, TDM_ERROR_INVALID_PARAMETER);
RETURN_VAL_IF_FAIL(hwc_data->target_hwc_window != NULL, TDM_ERROR_OPERATION_FAILED);
diff --git a/src/tdm_sprd_hwc_window.c b/src/tdm_sprd_hwc_window.c
index 52c5c0c..dd13f1b 100644
--- a/src/tdm_sprd_hwc_window.c
+++ b/src/tdm_sprd_hwc_window.c
@@ -59,6 +59,7 @@ 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);
+ /* change the client_type when it is different from one which has before */
if (hwc_window_data->client_type == comp_type)
return TDM_ERROR_NONE;