From: Juyeon Lee Date: Wed, 26 Oct 2016 04:55:47 +0000 (+0900) Subject: HWC: Added hwc_deactive configuration to disable hwc policy X-Git-Tag: submit/tizen/20161102.024749~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F05%2F93805%2F8;p=platform%2Fupstream%2Fenlightenment.git HWC: Added hwc_deactive configuration to disable hwc policy hwc_deactive is a condition whether hwc policy to run or not. 'hwc_fs' is removed because, 'hwc_deactive' condition replaces it exclusively default value is 0, it may be deactevated by plane init failure even success, it could be deactivated by e_comp.cfg or by enlightenment_info command Change-Id: Ic3009e664989b0fa2c50ac0ee282b7221f56889b Signed-off-by: Juyeon Lee --- diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c index f91b5cf6d3..57b24867bc 100644 --- a/src/bin/e_comp.c +++ b/src/bin/e_comp.c @@ -794,7 +794,7 @@ setup_hwcompose: // query if HWC can be used if (!e_comp_gl_get() || // TODO: e_comp_gl_get can be removed out if evas sw backend is TBM !e_comp->hwc || - !e_comp->hwc_fs) + e_comp->hwc_deactive) { goto end; } @@ -1321,15 +1321,18 @@ e_comp_init(void) e_comp_canvas_fake_layers_init(); + if (conf->hwc_deactive) e_comp->hwc_deactive = EINA_TRUE; // deactive hwc policy + #ifdef HAVE_HWC if (conf->hwc && e_comp_gl_get()) // TODO: it can be removed out if evas sw backend is TBM { e_comp->hwc = _e_comp_hwc_init(); if (!e_comp->hwc) - WRN("fail to init hwc."); - else - e_comp->hwc_fs = EINA_TRUE; // 1: active hwc policy + { + WRN("fail to init hwc."); + e_comp->hwc_deactive = EINA_TRUE; + } } #endif diff --git a/src/bin/e_comp.h b/src/bin/e_comp.h index 80398f3b88..e2cdf3f9ca 100644 --- a/src/bin/e_comp.h +++ b/src/bin/e_comp.h @@ -140,7 +140,7 @@ struct _E_Comp Eina_Bool nocomp_want : 1; int hwc_mode; Eina_Bool hwc : 1; - Eina_Bool hwc_fs : 1; // active hwc policy + Eina_Bool hwc_deactive : 1; // deactive hwc policy int depth; unsigned int input_key_grabs; diff --git a/src/bin/e_comp_cfdata.c b/src/bin/e_comp_cfdata.c index 1935acddf0..68ed285ed5 100644 --- a/src/bin/e_comp_cfdata.c +++ b/src/bin/e_comp_cfdata.c @@ -54,6 +54,7 @@ e_comp_cfdata_edd_init(E_Config_DD **conf_edd, E_Config_DD **match_edd) E_CONFIG_VAL(D, T, nocomp_begin_timeout, DOUBLE); E_CONFIG_VAL(D, T, hwc, UCHAR); E_CONFIG_VAL(D, T, hwc_use_multi_plane, UCHAR); + E_CONFIG_VAL(D, T, hwc_deactive, UCHAR); E_CONFIG_VAL(D, T, nofade, UCHAR); E_CONFIG_VAL(D, T, smooth_windows, UCHAR); E_CONFIG_VAL(D, T, first_draw_delay, DOUBLE); @@ -114,6 +115,7 @@ e_comp_cfdata_config_new(void) cfg->nocomp_begin_timeout = 2.0; cfg->hwc = 0; cfg->hwc_use_multi_plane = 0; + cfg->hwc_deactive = 0; cfg->nofade = 0; cfg->smooth_windows = 0; // 1 if gl, 0 if not cfg->first_draw_delay = 0.15; diff --git a/src/bin/e_comp_cfdata.h b/src/bin/e_comp_cfdata.h index 5b1d4db88a..31b9b33e3c 100644 --- a/src/bin/e_comp_cfdata.h +++ b/src/bin/e_comp_cfdata.h @@ -31,6 +31,7 @@ struct _E_Comp_Config double nocomp_begin_timeout; unsigned char hwc; unsigned char hwc_use_multi_plane; + unsigned char hwc_deactive; unsigned char smooth_windows; unsigned char nofade; double first_draw_delay; diff --git a/src/bin/e_info_client.c b/src/bin/e_info_client.c index fae0d32167..b54010564e 100644 --- a/src/bin/e_info_client.c +++ b/src/bin/e_info_client.c @@ -455,7 +455,7 @@ _e_info_client_proc_topvwins_info(int argc, char **argv) else snprintf(tmp, sizeof(tmp), " - "); } - else // hwc is not initialized or hwc_fs deactivated + else // hwc is not initialized or hwc_deactive 1 { hwc_off = 1; snprintf(tmp, sizeof(tmp), " - "); diff --git a/src/bin/e_info_server.c b/src/bin/e_info_server.c index 0e30b8bf32..0c4d8fcd72 100644 --- a/src/bin/e_info_server.c +++ b/src/bin/e_info_server.c @@ -120,7 +120,7 @@ _msg_clients_append(Eldbus_Message_Iter *iter) #ifdef ENABLE_HWC_MULTI - if (e_comp->hwc && e_comp->hwc_fs) + if ((e_comp->hwc) && (!e_comp->hwc_deactive)) { Eina_List *l; E_Plane *ep; @@ -2096,12 +2096,12 @@ e_info_server_cb_hwc(const Eldbus_Service_Interface *iface EINA_UNUSED, const El if (onoff == 1) { - e_comp->hwc_fs = EINA_TRUE; + e_comp->hwc_deactive = EINA_FALSE; } else if (onoff == 0) { e_comp_hwc_end("in runtime by e_info.."); - e_comp->hwc_fs = EINA_FALSE; + e_comp->hwc_deactive = EINA_TRUE; } return reply; diff --git a/src/bin/e_test_helper.c b/src/bin/e_test_helper.c index bcbdc99f1c..f2e07335b2 100644 --- a/src/bin/e_test_helper.c +++ b/src/bin/e_test_helper.c @@ -453,8 +453,8 @@ _e_test_helper_cb_hwc(const Eldbus_Service_Interface *iface, const Eldbus_Messag { switch (on) { - case 0: accept = EINA_TRUE; e_comp->hwc_fs = EINA_FALSE; break; - case 1: accept = EINA_TRUE; e_comp->hwc_fs = EINA_TRUE; break; + case 0: accept = EINA_TRUE; e_comp->hwc_deactive = EINA_TRUE; break; + case 1: accept = EINA_TRUE; e_comp->hwc_deactive = EINA_FALSE; break; default: break; } }