HWC: Added hwc_deactive configuration to disable hwc policy 05/93805/8
authorJuyeon Lee <juyeonne.lee@samsung.com>
Wed, 26 Oct 2016 04:55:47 +0000 (13:55 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Wed, 2 Nov 2016 02:14:08 +0000 (19:14 -0700)
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 <juyeonne.lee@samsung.com>
src/bin/e_comp.c
src/bin/e_comp.h
src/bin/e_comp_cfdata.c
src/bin/e_comp_cfdata.h
src/bin/e_info_client.c
src/bin/e_info_server.c
src/bin/e_test_helper.c

index f91b5cf6d35fdf898a5235c8e806d1b03e6321d7..57b24867bc78699f8a1fe30e960699377580221a 100644 (file)
@@ -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
 
index 80398f3b8809943c0024f09ba85233f68bbd7768..e2cdf3f9ca49086969360e0a5abd131ca4f9b810 100644 (file)
@@ -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;
index 1935acddf008056eeb88250ff17d62e05ff8fbc4..68ed285ed5256b5b20ab2625cd28aea126f1d585 100644 (file)
@@ -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;
index 5b1d4db88a7582618770fe96c1ce2c0fe2166a09..31b9b33e3c87160efaab64e01014bf373a0812f4 100644 (file)
@@ -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;
index fae0d321674e1da70cf98b6f77782436029e1c27..b54010564ec9042e41754846f94c3d9e806c8170 100644 (file)
@@ -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), " - ");
index 0e30b8bf32feaf99fb5af5ea21b428c2779568c7..0c4d8fcd7234de33124cb904d5fd3a2e122b3c1a 100644 (file)
@@ -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;
index bcbdc99f1c502b71057b93007cffe3c334629c10..f2e07335b22a5aa8e17592d64801b3260af34b80 100644 (file)
@@ -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;
           }
      }