e_display: remove E_DISPLAY feature 63/315563/1
authorSooChan Lim <sc1.lim@samsung.com>
Wed, 31 Jul 2024 07:25:43 +0000 (16:25 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Fri, 2 Aug 2024 09:13:42 +0000 (18:13 +0900)
The functionalities for tdm_display move to e_display files.

Change-Id: I06060e9670ebbe96a6d90f3f946229bc3c93ad67

19 files changed:
src/bin/compmgr/e_comp.c
src/bin/compmgr/e_comp_canvas.c
src/bin/core/e_desk.c
src/bin/core/e_intern.h
src/bin/debug/e_info_server.c
src/bin/debug/e_info_server_input.c
src/bin/displaymgr/e_display.c
src/bin/displaymgr/e_hwc.c
src/bin/displaymgr/e_hwc_windows.c
src/bin/displaymgr/e_output.c
src/bin/displaymgr/e_output_intern.h
src/bin/e_comp_screen.c
src/bin/e_comp_screen_intern.h
src/bin/inputmgr/e_input_device.c
src/bin/inputmgr/e_input_evdev.c
src/bin/server/e_comp_wl.c
src/bin/server/e_eom.c
src/bin/server/e_explicit_sync.c
src/bin/server/e_tbm_gbm_server.c

index f106e83..9ab84ee 100644 (file)
@@ -2,10 +2,6 @@
 #include "e_utils_intern.h"
 #include "e_comp_canvas_intern.h"
 #include "e_comp_cfdata_intern.h"
-#ifdef E_DISPLAY
-#else
-#include "e_comp_screen_intern.h"
-#endif
 #include "e_comp_wl_intern.h"
 #include "e_client_intern.h"
 #include "e_hwc_intern.h"
@@ -527,19 +523,8 @@ _e_comp_hwc_comp_override_set(Eina_Bool set)
    E_Output *primary_output;
    E_Hwc *hwc;
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
    EINA_SAFETY_ON_NULL_RETURN(primary_output);
-#else
-   E_Comp_Screen *e_comp_screen;
-
-   EINA_SAFETY_ON_NULL_RETURN(e_comp);
-   EINA_SAFETY_ON_NULL_RETURN(e_comp->e_comp_screen);
-
-   e_comp_screen = e_comp->e_comp_screen;
-   primary_output = e_comp_screen_primary_output_get(e_comp_screen);
-   EINA_SAFETY_ON_NULL_RETURN(primary_output);
-#endif
 
    hwc = primary_output->hwc;
    EINA_SAFETY_ON_NULL_RETURN(hwc);
@@ -1266,19 +1251,8 @@ e_comp_hwc_deactive_set(Eina_Bool set)
 {
    E_Output *primary_output;
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
    EINA_SAFETY_ON_NULL_RETURN(primary_output);
-#else
-   E_Comp_Screen *e_comp_screen;
-
-   EINA_SAFETY_ON_NULL_RETURN(e_comp);
-   EINA_SAFETY_ON_NULL_RETURN(e_comp->e_comp_screen);
-
-   e_comp_screen = e_comp->e_comp_screen;
-   primary_output = e_comp_screen_primary_output_get(e_comp_screen);
-   EINA_SAFETY_ON_NULL_RETURN(primary_output);
-#endif
 
    e_hwc_deactive_set(primary_output->hwc, set);
 }
@@ -1289,17 +1263,7 @@ e_comp_hwc_deactive_get(void)
 {
    E_Output *primary_output = NULL;
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   E_Comp_Screen *e_comp_screen;
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp->e_comp_screen, EINA_FALSE);
-
-   e_comp_screen = e_comp->e_comp_screen;
-   primary_output = e_comp_screen_primary_output_get(e_comp_screen);
-#endif
    EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
 
    return e_hwc_deactive_get(primary_output->hwc);
@@ -1311,17 +1275,7 @@ e_comp_hwc_multi_plane_set(Eina_Bool set)
 {
    E_Output *primary_output = NULL;
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   E_Comp_Screen *e_comp_screen;
-
-   EINA_SAFETY_ON_NULL_RETURN(e_comp);
-   EINA_SAFETY_ON_NULL_RETURN(e_comp->e_comp_screen);
-
-   e_comp_screen = e_comp->e_comp_screen;
-   primary_output = e_comp_screen_primary_output_get(e_comp_screen);
-#endif
    EINA_SAFETY_ON_NULL_RETURN(primary_output);
 
    e_hwc_planes_multi_plane_set(primary_output->hwc, EINA_TRUE);
@@ -1333,17 +1287,7 @@ e_comp_hwc_multi_plane_get(void)
 {
    E_Output *primary_output = NULL;
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   E_Comp_Screen *e_comp_screen;
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp->e_comp_screen, EINA_FALSE);
-
-   e_comp_screen = e_comp->e_comp_screen;
-   primary_output = e_comp_screen_primary_output_get(e_comp_screen);
-#endif
    EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
 
    return e_hwc_planes_multi_plane_get(primary_output->hwc);
@@ -1356,17 +1300,7 @@ e_comp_hwc_end(const char *location)
    E_Output *primary_output = NULL;
    E_Hwc *hwc = NULL;
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   E_Comp_Screen *e_comp_screen;
-
-   EINA_SAFETY_ON_NULL_RETURN(e_comp);
-   EINA_SAFETY_ON_NULL_RETURN(e_comp->e_comp_screen);
-
-   e_comp_screen = e_comp->e_comp_screen;
-   primary_output = e_comp_screen_primary_output_get(e_comp_screen);
-#endif
    EINA_SAFETY_ON_NULL_RETURN(primary_output);
 
    hwc = primary_output->hwc;
index 38968cb..ac28a36 100644 (file)
@@ -585,13 +585,7 @@ e_comp_canvas_norender_push(void)
 {
    E_Output *primary_output;
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   E_Comp_Screen *e_comp_screen;
-   e_comp_screen = e_comp->e_comp_screen;
-   primary_output = e_comp_screen_primary_output_get(e_comp_screen);
-#endif
 
    TRACE_DS_BEGIN(Canvas NoRenderPush:%d, e_comp->norender + 1);
    e_output_norender_push(primary_output);
@@ -606,13 +600,7 @@ e_comp_canvas_norender_pop(void)
 
    if (e_comp->norender <= 0) return;
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   E_Comp_Screen *e_comp_screen;
-   e_comp_screen = e_comp->e_comp_screen;
-   primary_output = e_comp_screen_primary_output_get(e_comp_screen);
-#endif
 
    TRACE_DS_BEGIN(Canvas NoRenderPop:%d, e_comp->norender - 1);
    e_output_norender_pop(primary_output);
@@ -625,13 +613,7 @@ e_comp_canvas_norender_get(void)
 {
    E_Output *primary_output;
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   E_Comp_Screen *e_comp_screen;
-   e_comp_screen = e_comp->e_comp_screen;
-   primary_output = e_comp_screen_primary_output_get(e_comp_screen);
-#endif
 
    return e_output_norender_get(primary_output);
 }
index 02b2b99..d43923a 100644 (file)
 #include "e_display_intern.h"
 #include "e_view_intern.h"
 #include "e_view_client_intern.h"
-#ifdef E_DISPLAY
-#else
-#include "e_comp_screen_intern.h"
-#endif
 
 #include <libds-tizen/screen.h>
 
@@ -1028,11 +1024,7 @@ e_desk_zoom_set(E_Desk *desk, double zoomx, double zoomy, int cx, int cy)
 
    if (e_config->use_pp_zoom)
      {
-#ifdef E_DISPLAY
         if (e_display_pp_support())
-#else
-        if (e_comp_screen_pp_support())
-#endif
           {
              zone = desk->zone;
              eout = e_output_find(zone->output_id);
@@ -1121,11 +1113,7 @@ e_desk_zoom_get(E_Desk *desk, double *zoomx, double *zoomy, int *cx, int *cy)
 
    if (e_config->use_pp_zoom)
      {
-#ifdef E_DISPLAY
         if (e_display_pp_support())
-#else
-        if (e_comp_screen_pp_support())
-#endif
           {
              zone = desk->zone;
              eout = e_output_find(zone->output_id);
@@ -1212,11 +1200,7 @@ e_desk_zoom_unset(E_Desk *desk)
 
    if (e_config->use_pp_zoom)
      {
-#ifdef E_DISPLAY
         if (e_display_pp_support())
-#else
-        if (e_comp_screen_pp_support())
-#endif
           {
              zone = desk->zone;
              eout = e_output_find(zone->output_id);
index 456bd23..0f65154 100644 (file)
@@ -20,8 +20,6 @@
 #include <Ecore.h>
 #include <Eina.h>
 
-#define E_DISPLAY
-
 #define CHECKING_PRIMARY_ZPOS
 
 #ifdef ENABLE_TTRACE
index a6ab7c6..0da13fa 100644 (file)
@@ -525,17 +525,7 @@ _e_info_server_is_hwc_windows()
 {
    E_Output *primary_output;
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   E_Comp_Screen *e_comp_screen;
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp->e_comp_screen, EINA_FALSE);
-
-   e_comp_screen = e_comp->e_comp_screen;
-   primary_output = e_comp_screen_primary_output_get(e_comp_screen);
-#endif
    if (!primary_output)
       return 0;
 
@@ -2914,14 +2904,7 @@ static void _e_info_server_cb_wins_dump_hwc_wins(const char *dir)
    Eina_List *o = NULL, *oo = NULL;
    Eina_List *l = NULL, *ll = NULL;
 
-#ifdef E_DISPLAY
    EINA_LIST_FOREACH_SAFE(e_display_outputs_get(), o, oo, output)
-#else
-   E_Comp_Screen *e_comp_screen = NULL;
-   e_comp_screen = e_comp->e_comp_screen;
-   if (!e_comp_screen) return;
-   EINA_LIST_FOREACH_SAFE(e_comp_screen->outputs, o, oo, output)
-#endif
      {
         if (!output) continue;
         if (!output->config.enabled) continue;
@@ -4386,11 +4369,7 @@ _output_mode_set(E_Comp_Screen *e_comp_screen, int output_idx, int mode_count)
 
    EINA_SAFETY_ON_TRUE_RETURN(output_idx > e_comp_screen->num_outputs);
 
-#ifdef E_DISPLAY
    output = eina_list_nth(e_display_outputs_get(), output_idx);
-#else
-   output = eina_list_nth(e_comp_screen->outputs, output_idx);
-#endif
    EINA_SAFETY_ON_NULL_RETURN(output);
 
    mode_list = e_output_mode_list_get(output);
@@ -4540,11 +4519,7 @@ e_info_server_cb_hwc_trace_message(const Eldbus_Service_Interface *iface EINA_UN
      }
 
    if (onoff == 2)
-#ifdef E_DISPLAY
      e_display_hwc_info_debug();
-#else
-     e_comp_screen_hwc_info_debug();
-#endif
 
    return reply;
 }
@@ -4629,30 +4604,18 @@ e_info_server_cb_hwc(const Eldbus_Service_Interface *iface EINA_UNUSED, const El
    switch (info)
      {
       case 0:
-#ifdef E_DISPLAY
         EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
-#else
-        EINA_LIST_FOREACH(e_comp->e_comp_screen->outputs, l, output)
-#endif
           e_hwc_deactive_set(output->hwc, EINA_TRUE);
         break;
 
       case 1:
-#ifdef E_DISPLAY
         EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
-#else
-        EINA_LIST_FOREACH(e_comp->e_comp_screen->outputs, l, output)
-#endif
           e_hwc_deactive_set(output->hwc, EINA_FALSE);
         break;
 
       default:
       case 2:
-#ifdef E_DISPLAY
        e_display_hwc_info_debug();
-#else
-       e_comp_screen_hwc_info_debug();
-#endif
        break;
      }
 
@@ -4685,13 +4648,7 @@ e_info_server_cb_show_plane_state(const Eldbus_Service_Interface *iface EINA_UNU
    E_Plane *plane = NULL;
    Eldbus_Message *reply = eldbus_message_method_return_new(msg);
 
-#ifdef E_DISPLAY
    EINA_LIST_FOREACH(e_display_outputs_get(), output_l, output)
-#else
-   E_Comp_Screen *e_comp_screen = NULL;
-   e_comp_screen = e_comp->e_comp_screen;
-   EINA_LIST_FOREACH(e_comp_screen->outputs, output_l, output)
-#endif
      {
         if (!output) continue;
 
@@ -4717,13 +4674,7 @@ _msg_show_pending_commit_append(Eldbus_Message_Iter *iter)
 
    eldbus_message_iter_arguments_append(iter, "a("VALUE_TYPE_FOR_PENDING_COMMIT")", &array_of_pending_commit);
 
-#ifdef E_DISPLAY
    EINA_LIST_FOREACH(e_display_outputs_get(), output_l, output)
-#else
-   E_Comp_Screen *e_comp_screen = NULL;
-   e_comp_screen = e_comp->e_comp_screen;
-   EINA_LIST_FOREACH(e_comp_screen->outputs, output_l, output)
-#endif
      {
         if (!output) continue;
 
@@ -4821,13 +4772,7 @@ _msg_output_fps_append(Eldbus_Message_Iter *iter)
 
    eldbus_message_iter_arguments_append(iter, "a("VALUE_TYPE_FOR_FPS")", &array_of_fps);
 
-#ifdef E_DISPLAY
    EINA_LIST_FOREACH(e_display_outputs_get(), output_l, output)
-#else
-   E_Comp_Screen *e_comp_screen = NULL;
-   e_comp_screen = e_comp->e_comp_screen;
-   EINA_LIST_FOREACH(e_comp_screen->outputs, output_l, output)
-#endif
      {
         if (!output) continue;
 
@@ -6555,11 +6500,9 @@ _e_info_server_cb_screen_info_get(const Eldbus_Service_Interface *iface EINA_UNU
      }
 
    reply = eldbus_message_method_return_new(msg);
-#ifdef E_DISPLAY
+
    e_display_debug_info_get(eldbus_message_iter_get(reply));
-#else
-   e_comp_screen_debug_info_get(eldbus_message_iter_get(reply));
-#endif
+
    return reply;
 }
 
index 8a5120e..606d481 100644 (file)
@@ -60,17 +60,7 @@ _e_info_input_set_touch(struct uinput_user_dev *uinput_dev, int uinput_fd)
    int w = 0, h = 0;
    int max_mt_slot = 9;//set touch max count 10 by default
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   E_Comp_Screen *e_comp_screen;
-
-   EINA_SAFETY_ON_NULL_RETURN(e_comp);
-   EINA_SAFETY_ON_NULL_RETURN(e_comp->e_comp_screen);
-
-   e_comp_screen = e_comp->e_comp_screen;
-   primary_output = e_comp_screen_primary_output_get(e_comp_screen);
-#endif
 
    e_output_size_get(primary_output, &w, &h);
 
index 4db450a..e407844 100644 (file)
@@ -1,5 +1,4 @@
 #include "e_display_intern.h"
-#ifdef E_DISPLAY
 #include "e_hwc_intern.h"
 #include "e_hwc_windows_intern.h"
 #include "e_hwc_planes_intern.h"
@@ -888,13 +887,7 @@ e_display_debug_info_get(Eldbus_Message_Iter *iter)
    "===========================================================================================");
 
 
-#ifdef E_DISPLAY
    EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
-#else
-   E_Comp_Screen *e_comp_screen = NULL;
-   e_comp_screen = e_comp->e_comp_screen;
-   EINA_LIST_FOREACH(e_comp_screen->outputs, l, output)
-#endif
      {
         if (!output) continue;
         hwc = output->hwc;
@@ -916,5 +909,3 @@ e_display_debug_info_get(Eldbus_Message_Iter *iter)
 
    eldbus_message_iter_container_close(iter, line_array);
 }
-
-#endif
index 3f0b8cb..e60bddf 100644 (file)
@@ -241,11 +241,8 @@ _e_hwc_gbm_surface_alloc(void *data, int w, int h)
    if (output->tdm_hwc)
      {
         EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, NULL);
-#ifdef E_DISPLAY
+
         gdevice = e_display_gbm_device_get();
-#else
-        gdevice = e_comp_screen_gbm_device_get(e_comp->e_comp_screen);
-#endif
         EINA_SAFETY_ON_NULL_RETURN_VAL(gdevice, NULL);
 
         gsurface = gbm_surface_create(gdevice, w, h,
@@ -313,11 +310,7 @@ _e_hwc_ecore_evas_gbm_alloc(E_Hwc *hwc, int src_w, int src_h)
    int gbm_formats[2] = {GBM_FORMAT_ABGR8888, GBM_FORMAT_ARGB8888};
    int i, format_count;
 
-#ifdef E_DISPLAY
    gdevice = e_display_gbm_device_get();
-#else
-   gdevice = e_comp_screen_gbm_device_get(e_comp->e_comp_screen);
-#endif
    if (!gdevice) return NULL;
 
    format_count = sizeof(gbm_formats) / sizeof(int);
@@ -354,11 +347,7 @@ e_hwc_ecore_evas_deinit(void)
    E_Output *primary_output = NULL;
    E_Hwc *hwc = NULL;
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif
    if (!primary_output) return;
 
    hwc = primary_output->hwc;
@@ -378,11 +367,7 @@ _e_hwc_prefer_gbm_check(void)
    if (e_comp->hwc_prefer_gbm)
       return EINA_TRUE;
 
-#ifdef E_DISPLAY
    gdevice = e_display_gbm_device_get();
-#else
-   gdevice = e_comp_screen_gbm_device_get(e_comp->e_comp_screen);
-#endif
    if (!gdevice) return EINA_FALSE;
 
    backend_name = gbm_device_get_backend_name(gdevice);
@@ -402,11 +387,7 @@ e_hwc_ecore_evas_init(void)
    int screen_rotation;
    char buf[1024];
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif
    EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
 
    hwc = primary_output->hwc;
index 7205d42..266e43a 100644 (file)
@@ -1,7 +1,6 @@
 #include "e_hwc_windows_intern.h"
 #include "e_hwc_intern.h"
 #include "e_hwc_window_queue_intern.h"
-#include "e_comp_screen_intern.h"
 #include "e_explicit_sync_intern.h"
 #include "e_comp_wl_tbm_intern.h"
 #include "e_comp_wl_tizen_hwc_intern.h"
@@ -148,14 +147,7 @@ _e_hwc_windows_root_target_hwc_window_get(E_Hwc *hwc)
      }
    else
      {
-#ifdef E_DISPLAY
         primary_output = e_display_primary_output_get();
-#else
-        EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, NULL);
-        EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp->e_comp_screen, NULL);
-
-        primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif
         EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, NULL);
         EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output->hwc, NULL);
 
@@ -1101,11 +1093,7 @@ _e_hwc_windows_pending_update_data_dequeue(E_Hwc_Window_Target *root_target_hwc_
 
    e_comp_wl_tizen_hwc_feedback_list_enqueue(&comp_info->feedback_list);
 
-#ifdef E_DISPLAY
    EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
-#else
-   EINA_LIST_FOREACH(e_comp->e_comp_screen->outputs, l, output)
-#endif
      {
         if (!output->hwc) continue;
 
@@ -1150,11 +1138,7 @@ _e_hwc_windows_pending_update_data_clear(E_Hwc_Window_Target *root_target_hwc_wi
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(root_target_hwc_window, EINA_FALSE);
 
-#ifdef E_DISPLAY
    EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
-#else
-   EINA_LIST_FOREACH(e_comp->e_comp_screen->outputs, l, output)
-#endif
      {
         if (!output->hwc) continue;
 
@@ -1437,11 +1421,7 @@ _e_hwc_windows_presentation_callback_comp_take_over(E_Hwc_Window_Target *root_ta
    EINA_SAFETY_ON_NULL_RETURN_VAL(root_target_hwc_window, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(comp_info, EINA_FALSE);
 
-#ifdef E_DISPLAY
    EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
-#else
-   EINA_LIST_FOREACH(e_comp->e_comp_screen->outputs, l, output)
-#endif
      {
         if (!output->hwc) continue;
 
@@ -2856,13 +2836,7 @@ _e_hwc_windows_root_target_window_state_update(E_Hwc_Window_Target *root_target_
    E_Hwc_Window_State state;
    E_Hwc_Window_State root_state = E_HWC_WINDOW_STATE_NONE;
 
-#ifdef E_DISPLAY
    EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
-#else
-   EINA_SAFETY_ON_NULL_RETURN(e_comp);
-   EINA_SAFETY_ON_NULL_RETURN(e_comp->e_comp_screen);
-   EINA_LIST_FOREACH(e_comp->e_comp_screen->outputs, l, output)
-#endif
      {
         if (!e_output_connected(output)) continue;
         if (!output->hwc) continue;
@@ -3439,7 +3413,7 @@ e_hwc_windows_pp_set(E_Hwc *hwc, Eina_Rectangle *src_rect, Eina_Rectangle *dst_r
 {
    E_Hwc_Window_Target *root_target_hwc_window;
    E_Hwc_Window *hwc_window;
-   E_Comp_Screen *e_comp_screen;
+   tdm_display   *tdisplay;
    tdm_error ret = TDM_ERROR_NONE;
    int w, h;
 
@@ -3447,8 +3421,8 @@ e_hwc_windows_pp_set(E_Hwc *hwc, Eina_Rectangle *src_rect, Eina_Rectangle *dst_r
    EINA_SAFETY_ON_NULL_RETURN_VAL(src_rect, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(dst_rect, EINA_FALSE);
 
-   e_comp_screen = e_comp->e_comp_screen;
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, EINA_FALSE);
+   tdisplay = (tdm_display *)e_display_tdm_display_get();
+   EINA_SAFETY_ON_NULL_RETURN_VAL(tdisplay, EINA_FALSE);
 
    if ((hwc->pp_src_rect.x == src_rect->x) && (hwc->pp_src_rect.y == src_rect->y) &&
        (hwc->pp_src_rect.w == src_rect->w) && (hwc->pp_src_rect.h == src_rect->h) &&
@@ -3456,25 +3430,21 @@ e_hwc_windows_pp_set(E_Hwc *hwc, Eina_Rectangle *src_rect, Eina_Rectangle *dst_r
        (hwc->pp_dst_rect.w == dst_rect->w) && (hwc->pp_dst_rect.h == dst_rect->h))
      return EINA_TRUE;
 
-#ifdef E_DISPLAY
    if (e_display_pp_support())
-#else
-   if (e_comp_screen_pp_support())
-#endif
      {
         if (!hwc->tpp)
           {
-             hwc->tpp = tdm_display_create_pp(e_comp_screen->tdisplay, &ret);
+             hwc->tpp = tdm_display_create_pp(tdisplay, &ret);
              EINA_SAFETY_ON_NULL_GOTO(hwc->tpp, fail);
 
              ret = tdm_pp_set_done_handler(hwc->tpp, _e_hwc_windows_pp_commit_handler, hwc);
              EINA_SAFETY_ON_FALSE_GOTO(ret == TDM_ERROR_NONE, fail);
 
-             tdm_display_get_pp_available_size(e_comp_screen->tdisplay,
+             tdm_display_get_pp_available_size(tdisplay,
                                                &hwc->pp_minw, &hwc->pp_minh,
                                                &hwc->pp_maxw, &hwc->pp_maxh,
                                                &hwc->pp_align);
-             tdm_display_get_pp_preferred_align_vertical(e_comp_screen->tdisplay, &hwc->pp_align_vertical);
+             tdm_display_get_pp_preferred_align_vertical(tdisplay, &hwc->pp_align_vertical);
 
              EHWSINF("PP Create tdm_pp:%p", NULL, hwc, hwc->tpp);
           }
@@ -3488,11 +3458,7 @@ e_hwc_windows_pp_set(E_Hwc *hwc, Eina_Rectangle *src_rect, Eina_Rectangle *dst_r
 
         e_output_size_get(hwc->output, &w, &h);
 
-#ifdef E_DISPLAY
         if (e_display_pp_support())
-#else
-        if (e_comp_screen_pp_support())
-#endif
           _e_hwc_windows_pp_aligned_value_get(hwc, &w, &h);
 
         //TODO: Does e20 get the buffer flags from the tdm backend?
@@ -3631,7 +3597,6 @@ e_hwc_windows_rendered_window_add(E_Hwc_Window *hwc_window)
 
    EINA_SAFETY_ON_NULL_RETURN(hwc_window);
    EINA_SAFETY_ON_NULL_RETURN(e_comp);
-   EINA_SAFETY_ON_NULL_RETURN(e_comp->e_comp_screen);
 
    if (hwc_window->on_rendered_target) return;
 
@@ -3769,13 +3734,7 @@ _e_hwc_windows_window_debug_info_get(Eldbus_Message_Iter *iter, E_Hwc_Wins_Debug
 
    eldbus_message_iter_arguments_append(iter, "as", &line_array);
 
-#ifdef E_DISPLAY
    EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
-#else
-   E_Comp_Screen *e_comp_screen;
-   e_comp_screen = e_comp->e_comp_screen;
-   EINA_LIST_FOREACH(e_comp_screen->outputs, l, output)
-#endif
      {
         if (!output) continue;
         if (!output->config.enabled) continue;
@@ -3931,13 +3890,7 @@ _e_hwc_windows_window_debug_commit_info_get(Eldbus_Message_Iter *iter, E_Hwc_Win
 
    eldbus_message_iter_arguments_append(iter, "as", &line_array);
 
-#ifdef E_DISPLAY
    EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
-#else
-   E_Comp_Screen *e_comp_screen;
-   e_comp_screen = e_comp->e_comp_screen;
-   EINA_LIST_FOREACH(e_comp_screen->outputs, l, output)
-#endif
      {
         if (!output) continue;
         if (!output->config.enabled) continue;
index c48f413..e2a1b6b 100644 (file)
@@ -359,11 +359,7 @@ _e_output_zoom_touch_transform(E_Output *output, Eina_Bool set)
 
    EINA_LIST_FOREACH(e_input_devices_get(), l, dev)
      {
-#ifdef E_DISPLAY
         primary_output = e_display_primary_output_get();
-#else
-        primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif
         if (primary_output != NULL)
           break;
      }
@@ -774,16 +770,7 @@ _e_output_external_update(E_Output *output)
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   E_Comp_Screen *e_comp_screen = NULL;
-
-   e_comp_screen = e_comp->e_comp_screen;
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, EINA_FALSE);
-
-   primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif
    if (!primary_output)
      {
         e_error_message_show(_("Fail to get the primary output!\n"));
@@ -874,11 +861,7 @@ _e_output_cb_output_change(tdm_output *toutput,
 
    output = (E_Output *)user_data;
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif
    EINA_SAFETY_ON_NULL_RETURN(primary_output);
 
    switch (type)
@@ -1040,14 +1023,14 @@ static tdm_capture *
 _e_output_tdm_capture_create(E_Output *output, tdm_capture_capability cap)
 {
    tdm_error error = TDM_ERROR_NONE;
+   tdm_display *tdisplay;
    tdm_capture *tcapture = NULL;
    tdm_capture_capability capabilities;
-   E_Comp_Screen *e_comp_screen = NULL;
 
-   e_comp_screen = e_comp->e_comp_screen;
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, NULL);
+   tdisplay = (tdm_display *)e_display_tdm_display_get();
+   EINA_SAFETY_ON_NULL_RETURN_VAL(tdisplay, NULL);
 
-   error = tdm_display_get_capture_capabilities(e_comp_screen->tdisplay, &capabilities);
+   error = tdm_display_get_capture_capabilities(tdisplay, &capabilities);
    EINA_SAFETY_ON_FALSE_RETURN_VAL(error == TDM_ERROR_NONE, NULL);
 
    if (!(capabilities & cap))
@@ -2215,13 +2198,13 @@ static void
 _e_output_tdm_stream_capture_support(E_Output *output)
 {
    tdm_error error = TDM_ERROR_NONE;
+   tdm_display *tdisplay;
    tdm_capture_capability capabilities;
-   E_Comp_Screen *e_comp_screen = NULL;
 
-   e_comp_screen = e_comp->e_comp_screen;
-   EINA_SAFETY_ON_NULL_RETURN(e_comp_screen);
+   tdisplay = (tdm_display *)e_display_tdm_display_get();
+   EINA_SAFETY_ON_NULL_RETURN(tdisplay);
 
-   error = tdm_display_get_capture_capabilities(e_comp_screen->tdisplay, &capabilities);
+   error = tdm_display_get_capture_capabilities(tdisplay, &capabilities);
    if (error != TDM_ERROR_NONE)
      {
         EOINF("TDM Display has no capture capability.", output);
@@ -2403,13 +2386,8 @@ fail:
    return EINA_FALSE;
 }
 
-#ifdef E_DISPLAY
 EINTERN E_Output *
 e_output_new1(int index)
-#else
-EINTERN E_Output *
-e_output_new(E_Comp_Screen *e_comp_screen, int index)
-#endif
 {
    E_Output *output = NULL;
    tdm_output *toutput = NULL;
@@ -2421,20 +2399,11 @@ e_output_new(E_Comp_Screen *e_comp_screen, int index)
    int min_w, min_h, max_w, max_h, preferred_align;
    tdm_output_capability output_caps = 0;
 
-#ifdef E_DISPLAY
-#else
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, NULL);
-#endif
-
    output = E_NEW(E_Output, 1);
    EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL);
    output->index = index;
 
-#ifdef E_DISPLAY
    toutput = tdm_display_get_output(e_display_tdm_display_get(), index, NULL);
-#else
-   toutput = tdm_display_get_output(e_comp_screen->tdisplay, index, NULL);
-#endif
    if (!toutput) goto fail;
    output->toutput = toutput;
 
@@ -2858,11 +2827,7 @@ e_output_hwc_setup(E_Output *output)
         return EINA_TRUE;
      }
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif   
    if (output == primary_output) is_primary_output = EINA_TRUE;
 
    hwc = e_hwc_new(output, is_primary_output);
@@ -2967,11 +2932,7 @@ e_output_dpms_set(E_Output *output, E_OUTPUT_DPMS val)
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif   
    if (primary_output == output)
      {
         /* FIXME: The zone controlling should be moved to e_zone */
@@ -3122,13 +3083,9 @@ e_output_render(E_Output *output)
    else
      {
         /* render the only primary output */
-#ifdef E_DISPLAY
         if (output != e_display_primary_output_get())
           return EINA_TRUE;
-#else
-        if (output != e_comp_screen_primary_output_get(e_comp->e_comp_screen))
-          return EINA_TRUE;
-#endif
+
         if (!e_hwc_windows_render(output->hwc))
           {
              EOERR("fail to e_hwc_windows_render.", output);
@@ -3153,11 +3110,7 @@ e_output_commit(E_Output *output)
         return EINA_FALSE;
      }
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif   
    EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
 
    if (e_hwc_policy_get(output->hwc) == E_HWC_POLICY_PLANES)
@@ -3231,15 +3184,7 @@ e_output_find(const char *id)
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(id, NULL);
 
-#ifdef E_DISPLAY
    EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
-#else
-   E_Comp_Screen *e_comp_screen;
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, NULL);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp->e_comp_screen, NULL);
-   e_comp_screen = e_comp->e_comp_screen;
-   EINA_LIST_FOREACH(e_comp_screen->outputs, l, output)
-#endif
      {
         if (!strcmp(output->id, id)) return output;
      }
@@ -3261,15 +3206,7 @@ e_output_util_planes_print(void)
    Eina_List *l, *ll, *p_l;
    E_Output * output = NULL;
 
-#ifdef E_DISPLAY
    EINA_LIST_FOREACH_SAFE(e_display_outputs_get(), l, ll, output)
-#else
-   E_Comp_Screen *e_comp_screen = NULL;
-   EINA_SAFETY_ON_NULL_RETURN(e_comp);
-   EINA_SAFETY_ON_NULL_RETURN(e_comp->e_comp_screen);
-   e_comp_screen = e_comp->e_comp_screen;
-   EINA_LIST_FOREACH_SAFE(e_comp_screen->outputs, l, ll, output)
-#endif
      {
         E_Plane *plane;
         E_Client *ec;
@@ -3409,15 +3346,7 @@ e_output_find_by_index(int index)
    E_Output *output;
    Eina_List *l;
 
-#ifdef E_DISPLAY
    EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
-#else
-   E_Comp_Screen *e_comp_screen;
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, NULL);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp->e_comp_screen, NULL);
-   e_comp_screen = e_comp->e_comp_screen;
-   EINA_LIST_FOREACH(e_comp_screen->outputs, l, output)
-#endif
      {
         if (output->index == index)
           return output;
@@ -3452,11 +3381,7 @@ e_output_zoom_set(E_Output *output, double zoomx, double zoomy, int cx, int cy)
    int angle = 0;
    E_Output *primary_output = NULL;
 
-#ifdef E_DISPLAY
    if (!e_display_pp_support())
-#else
-   if (!e_comp_screen_pp_support())
-#endif
      {
         EOINF("Comp Screen does not support the Zoom.", output);
         return EINA_FALSE;
@@ -3467,11 +3392,7 @@ e_output_zoom_set(E_Output *output, double zoomx, double zoomy, int cx, int cy)
    if (cx < 0 || cy < 0) return EINA_FALSE;
    if (zoomx <= 0 || zoomy <= 0) return EINA_FALSE;
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif
    EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
 
    if (output != primary_output)
@@ -3562,11 +3483,7 @@ e_output_zoom_get(E_Output *output, double *zoomx, double *zoomy, int *cx, int *
 {
    E_Output *primary_output = NULL;
 
-#ifdef E_DISPLAY
    if (!e_display_pp_support())
-#else
-   if (!e_comp_screen_pp_support())
-#endif
      {
         EOINF("Comp Screen does not support the Zoom.", output);
         return EINA_FALSE;
@@ -3574,11 +3491,7 @@ e_output_zoom_get(E_Output *output, double *zoomx, double *zoomy, int *cx, int *
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif   
    EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
 
    if (output != primary_output)
@@ -3966,11 +3879,7 @@ e_output_external_mode_change(E_Output *output, E_Output_Mode *mode)
      }
    EINA_SAFETY_ON_FALSE_RETURN_VAL(found == EINA_TRUE, EINA_FALSE);
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif   
    EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
    EINA_SAFETY_ON_TRUE_RETURN_VAL(primary_output == output, EINA_FALSE);
 
@@ -4164,11 +4073,7 @@ e_output_presentation_unset(E_Output *output)
      {
         if (output->presentation_ec)
           {
-#ifdef E_DISPLAY
              primary_output = e_display_primary_output_get();
-#else
-             primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif   
              EINA_SAFETY_ON_NULL_GOTO(primary_output, done);
 
              zone = e_comp_zone_find(e_output_output_id_get(primary_output));
@@ -4374,11 +4279,7 @@ e_output_available_size_get(E_Output *output, int *minw, int *minh, int *maxw, i
 
    tdm_output_get_available_size(output->toutput, &ominw, &ominh, &omaxw, &omaxh, &oalign);
 
-#ifdef E_DISPLAY
    if (!e_display_pp_support())
-#else
-   if (!e_comp_screen_pp_support())
-#endif
      {
         rminw = ominw;
         rminh = ominh;
@@ -4390,13 +4291,7 @@ e_output_available_size_get(E_Output *output, int *minw, int *minh, int *maxw, i
      }
    else
      {
-#ifdef E_DISPLAY
         e_display_pp_available_size_get(&pminw, &pminh, &pmaxw, &pmaxh, &palign);
-#else
-        tdm_display_get_pp_available_size(e_comp->e_comp_screen->tdisplay,
-                                          &pminw, &pminh, &pmaxw, &pmaxh,
-                                          &palign);
-#endif
         rminw = MAX(ominw, pminw);
         rminh = MAX(ominh, pminh);
 
index b2b13f6..31161c6 100644 (file)
@@ -54,11 +54,7 @@ struct _E_Output_Intercept_Hook
 
 EINTERN Eina_Bool         e_output_init(void);
 EINTERN void              e_output_shutdown(void);
-//#ifdef E_DISPLAY
 EINTERN E_Output        * e_output_new1(int index);
-//#else
-EINTERN E_Output        * e_output_new(E_Comp_Screen *e_comp_screen, int index);
-//#endif
 EINTERN void              e_output_del(E_Output *output);
 EINTERN Eina_Bool         e_output_rotate(E_Output *output, int rotate);
 EINTERN Eina_Bool         e_output_update(E_Output *output);
index 82a7806..5ea44e7 100644 (file)
 #include "e_display_intern.h"
 
 #include <tizen-extension-server-protocol.h>
-#ifdef E_DISPLAY
-#else
-#include <device/board-internal.h>
-#include <tbm_drm_helper.h>
-#include <gbm.h>
-#endif
 
 #define PATH "/org/enlightenment/wm"
 #define IFACE "org.enlightenment.wm.screen_rotation"
@@ -111,27 +105,6 @@ err:
    return;
 }
 
-#ifdef E_DISPLAY
-#else
-static char *
-_layer_cap_to_str(tdm_layer_capability caps, tdm_layer_capability cap)
-{
-   if (caps & cap)
-     {
-        if (cap == TDM_LAYER_CAPABILITY_CURSOR) return "cursor ";
-        else if (cap == TDM_LAYER_CAPABILITY_PRIMARY) return "primary ";
-        else if (cap == TDM_LAYER_CAPABILITY_OVERLAY) return "overlay ";
-        else if (cap == TDM_LAYER_CAPABILITY_GRAPHIC) return "graphics ";
-        else if (cap == TDM_LAYER_CAPABILITY_VIDEO) return "video ";
-        else if (cap == TDM_LAYER_CAPABILITY_TRANSFORM) return "transform ";
-        else if (cap == TDM_LAYER_CAPABILITY_RESEVED_MEMORY) return "reserved_memory ";
-        else if (cap == TDM_LAYER_CAPABILITY_NO_CROP) return "no_crop ";
-        else return "unknown";
-     }
-   return "";
-}
-#endif
-
 static Eina_Bool
 _e_comp_screen_commit_idle_cb(void *data EINA_UNUSED)
 {
@@ -143,13 +116,7 @@ _e_comp_screen_commit_idle_cb(void *data EINA_UNUSED)
 
    if (e_comp->canvas_render_delayed) goto end;
 
-#ifdef E_DISPLAY
    EINA_LIST_FOREACH_SAFE(e_display_outputs_get(), l, ll, output)
-#else
-   E_Comp_Screen *e_comp_screen = NULL;
-   e_comp_screen = e_comp->e_comp_screen;
-   EINA_LIST_FOREACH_SAFE(e_comp_screen->outputs, l, ll, output)
-#endif
      {
         if (!output) continue;
         if (!output->config.enabled) continue;
@@ -294,12 +261,7 @@ e_comp_screen_size_update(E_Comp_Screen *e_comp_screen)
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, EINA_FALSE);
 
-#ifdef E_DISPLAY
    EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
-#else
-   /* we place external output to the right of primary output */
-   EINA_LIST_FOREACH(e_comp_screen->outputs, l, output)
-#endif
      {
         if (!e_output_connected(output)) continue;
 
@@ -331,39 +293,12 @@ e_comp_screen_size_update(E_Comp_Screen *e_comp_screen)
    return EINA_TRUE;
 }
 
-#ifdef E_DISPLAY
-#else
-static Eina_Bool
-_e_comp_screen_cb_event(void *data, Ecore_Fd_Handler *hdlr EINA_UNUSED)
-{
-   E_Comp_Screen *e_comp_screen;
-   tdm_error ret;
-
-   if (!(e_comp_screen = data)) return ECORE_CALLBACK_RENEW;
-
-   ret = tdm_display_handle_events(e_comp_screen->tdisplay);
-   if (ret != TDM_ERROR_NONE)
-     ERR("tdm_display_handle_events failed");
-
-   return ECORE_CALLBACK_RENEW;
-}
-#endif
-
 static E_Comp_Screen *
 _e_comp_screen_new(E_Comp *comp)
 {
    E_Comp_Screen *e_comp_screen = NULL;
    int screen_rotation;
 
-#ifdef E_DISPLAY
-#else
-   tdm_error error = TDM_ERROR_NONE;
-   tdm_display_capability capabilities;
-   const tbm_format *pp_formats;
-   int count, i;
-   int fd;
-#endif
-
    e_comp_screen = E_NEW(E_Comp_Screen, 1);
    if (!e_comp_screen) return NULL;
 
@@ -379,7 +314,6 @@ _e_comp_screen_new(E_Comp *comp)
    e_comp_screen->rotation_setting = e_config->screen_rotation_setting;
    e_comp_screen->rotation = screen_rotation;
 
-#ifdef E_DISPLAY
    e_main_ts_begin("\te_display_init");
 
    if (!e_display_init())
@@ -398,37 +332,6 @@ _e_comp_screen_new(E_Comp *comp)
 
    if (e_comp->hwc && e_comp_conf_hwc_deactive_get())
      e_comp_hwc_deactive_set(EINA_TRUE);
-#else
-   /* tdm display init */
-   e_main_ts_begin("\tTDM Display Init");
-
-   e_comp_screen->tdisplay = tdm_display_init(&error);
-   if (!e_comp_screen->tdisplay)
-     {
-        e_main_ts_end("\tTDM Display Init Failed");
-        ERR("fail to get tdm_display\n");
-        free(e_comp_screen);
-        e_comp->e_comp_screen = NULL;
-        return NULL;
-     }
-
-   e_main_ts_end("\tTDM Display Init Done");
-
-   e_comp_screen->gdevice_fd = -1;
-   e_comp_screen->fd = -1;
-   tdm_display_get_fd(e_comp_screen->tdisplay, &fd);
-   if (fd < 0)
-     {
-        ERR("fail to get tdm_display fd\n");
-        goto fail;
-     }
-
-   e_comp_screen->fd = dup(fd);
-
-   e_comp_screen->hdlr =
-     ecore_main_fd_handler_add(e_comp_screen->fd, ECORE_FD_READ,
-                               _e_comp_screen_cb_event, e_comp_screen, NULL, NULL);
-#endif
 
    /* tbm bufmgr init */
    e_main_ts_begin("\tTBM Bufmgr Server Init");
@@ -441,45 +344,10 @@ _e_comp_screen_new(E_Comp *comp)
      }
    e_main_ts_end("\tTBM Bufmgr Server Init Done");
 
-#ifdef E_DISPLAY
-#else
-   error = tdm_display_get_capabilities(e_comp_screen->tdisplay, &capabilities);
-   if (error != TDM_ERROR_NONE)
-     {
-        ERR("tdm get_capabilities failed");
-        goto fail;
-     }
-
-   /* check the pp_support */
-   if (capabilities & TDM_DISPLAY_CAPABILITY_PP)
-     {
-        error = tdm_display_get_pp_available_formats(e_comp_screen->tdisplay, &pp_formats, &count);
-        if (error != TDM_ERROR_NONE)
-          ERR("fail to get available pp formats");
-        else
-          {
-             e_comp_screen->pp_enabled = EINA_TRUE;
-             for (i = 0 ; i < count ; i++)
-               e_comp_screen->available_pp_formats = eina_list_append(e_comp_screen->available_pp_formats, &pp_formats[i]);
-          }
-     }
-
-   e_main_ts_begin("\ttdm-socket Init");
-   if (e_comp_socket_init("tdm-socket"))
-     PRCTL("[Winsys] change permission and create sym link for %s", "tdm-socket");
-   e_main_ts_end("\ttdm-socket Init Done");
-#endif
-
    return e_comp_screen;
 
 fail:
    if (e_comp_screen->bufmgr) tbm_bufmgr_deinit(e_comp_screen->bufmgr);
-#ifdef E_DISPLAY
-#else
-   if (e_comp_screen->fd >= 0) close(e_comp_screen->fd);
-   if (e_comp_screen->hdlr) ecore_main_fd_handler_del(e_comp_screen->hdlr);
-   if (e_comp_screen->tdisplay) tdm_display_deinit(e_comp_screen->tdisplay);
-#endif
 
    free(e_comp_screen);
    e_comp->e_comp_screen = NULL;
@@ -491,382 +359,11 @@ fail:
 static void
 _e_comp_screen_del(E_Comp_Screen *e_comp_screen)
 {
-#ifdef E_DISPLAY
-#else
-   Eina_List *l = NULL, *ll = NULL;
-   tbm_format *formats;
-
-   if (!e_comp_screen) return;
-
-   if (e_comp_screen->pp_enabled)
-     {
-        EINA_LIST_FOREACH_SAFE(e_comp_screen->available_pp_formats, l, ll, formats)
-          {
-             if (!formats) continue;
-             e_comp_screen->available_pp_formats = eina_list_remove(e_comp_screen->available_pp_formats, l);
-          }
-     }
-
-   if (e_comp_screen->gdevice) gbm_device_destroy(e_comp_screen->gdevice);
-   if (e_comp_screen->gdevice_fd >= 0) close(e_comp_screen->gdevice_fd);
-#endif
-
    if (e_comp_screen->bufmgr) tbm_bufmgr_deinit(e_comp_screen->bufmgr);
 
-#ifdef E_DISPLAY
-#else
-   if (e_comp_screen->fd >= 0) close(e_comp_screen->fd);
-   if (e_comp_screen->hdlr) ecore_main_fd_handler_del(e_comp_screen->hdlr);
-   if (e_comp_screen->tdisplay) tdm_display_deinit(e_comp_screen->tdisplay);
-#endif
-
    free(e_comp_screen);
 }
 
-#ifdef E_DISPLAY
-#else
-static void
-_e_comp_screen_output_mode_change_cb(tdm_output *toutput, unsigned int index, void *user_data)
-{
-   E_Comp_Screen *e_comp_screen = user_data;
-   E_Output *output = NULL;
-   Eina_Bool find = EINA_FALSE;
-   int count, num;
-   E_Output_Mode *set_emode = NULL, *current_emode = NULL;
-   E_Output_Mode *emode = NULL;
-   Eina_List *modelist = NULL, *l, *ll;
-
-   EINA_SAFETY_ON_NULL_RETURN(e_comp_screen);
-
-   EINA_LIST_FOREACH_SAFE(e_comp_screen->outputs, l, ll, output)
-     {
-        if (output->toutput == toutput)
-          {
-             find = EINA_TRUE;
-             break;
-          }
-     }
-   EINA_SAFETY_ON_FALSE_RETURN(find == EINA_TRUE);
-
-   current_emode = e_output_current_mode_get(output);
-   EINA_SAFETY_ON_NULL_RETURN(current_emode);
-
-   modelist = e_output_mode_list_get(output);
-   if (modelist)
-     {
-        num = eina_list_count(modelist);
-        EINA_SAFETY_ON_FALSE_RETURN(index < num);
-
-        count = 0;
-        EINA_LIST_FOREACH(modelist, l, emode)
-          {
-             if (count == index)
-               {
-                  set_emode = emode;
-                  break;
-               }
-             count++;
-          }
-
-        if (set_emode)
-          {
-             EINA_SAFETY_ON_TRUE_RETURN(current_emode == set_emode);
-
-             ELOGF("COMP_SCREEN","request mode change(%d) (%dx%d, %lf) -> (%dx%d, %lf)\n",
-                   NULL, index, current_emode->w, current_emode->h, current_emode->refresh,
-                   set_emode->w, set_emode->h, set_emode->refresh);
-
-             e_output_external_mode_change(output, set_emode);
-          }
-     }
-}
-
-static void
-_e_comp_screen_output_destroy_cb(tdm_output *toutput, void *user_data)
-{
-   E_Comp_Screen *e_comp_screen = user_data;
-   E_Output *output = NULL;
-   Eina_List *l, *ll;
-
-   EINA_SAFETY_ON_NULL_RETURN(e_comp_screen);
-
-   tdm_output_remove_destroy_handler(toutput, _e_comp_screen_output_destroy_cb, e_comp_screen);
-
-   EINA_LIST_FOREACH_SAFE(e_comp_screen->outputs, l, ll, output)
-     {
-        if (output->toutput == toutput)
-          {
-             e_comp_screen->num_outputs--;
-             e_comp_screen->outputs = eina_list_remove_list(e_comp_screen->outputs, l);
-             e_output_del(output);
-          }
-     }
-}
-
-static void
-_e_comp_screen_output_create_cb(tdm_display *dpy, tdm_output *toutput, void *user_data)
-{
-   E_Comp_Screen *e_comp_screen = user_data;
-   E_Output *output = NULL;
-   tdm_error ret = TDM_ERROR_NONE;
-
-   EINA_SAFETY_ON_NULL_RETURN(e_comp_screen);
-
-   TRACE_DS_BEGIN(OUTPUT:NEW);
-   output = e_output_new(e_comp_screen, e_comp_screen->num_outputs);
-   EINA_SAFETY_ON_NULL_GOTO(output, fail);
-   if (output->toutput != toutput) goto fail;
-   TRACE_DS_END();
-
-   TRACE_DS_BEGIN(OUTPUT:UPDATE);
-   if (!e_output_update(output))
-     {
-        ERR("fail to e_output_update.");
-        e_output_del(output);
-        goto fail;
-     }
-   TRACE_DS_END();
-
-   /* todo : add tdm_output_add_mode_change_request_handler()*/
-   ret = tdm_output_add_mode_change_request_handler(toutput, _e_comp_screen_output_mode_change_cb, e_comp_screen);
-   if (ret != TDM_ERROR_NONE)
-     {
-        ERR("fail to add output mode change handler.");
-        e_output_del(output);
-        return;
-     }
-
-   ret = tdm_output_add_destroy_handler(toutput, _e_comp_screen_output_destroy_cb, e_comp_screen);
-   if (ret != TDM_ERROR_NONE)
-     {
-        ERR("fail to add output destroy handler.");
-        e_output_del(output);
-        return;
-     }
-
-   e_comp_screen->outputs = eina_list_append(e_comp_screen->outputs, output);
-   e_comp_screen->num_outputs++;
-
-   return;
-
-fail:
-   TRACE_DS_END();
-}
-
-static void
-_e_comp_screen_deinit_outputs(E_Comp_Screen *e_comp_screen)
-{
-   E_Output *output;
-   Eina_List *l, *ll;
-
-   tdm_display_remove_output_create_handler(e_comp_screen->tdisplay, _e_comp_screen_output_create_cb, e_comp_screen);
-
-   e_hwc_ecore_evas_deinit();
-
-   // free up e_outputs
-   EINA_LIST_FOREACH_SAFE(e_comp_screen->outputs, l, ll, output)
-     {
-        e_comp_screen->outputs = eina_list_remove_list(e_comp_screen->outputs, l);
-        e_output_del(output);
-     }
-
-   e_hwc_deinit();
-   e_hwc_windows_deinit();
-   e_hwc_planes_deinit();
-   e_output_shutdown();
-}
-
-static Eina_Bool
-_e_comp_screen_fake_output_set(E_Comp_Screen *e_comp_screen)
-{
-   E_Output *primary_output = NULL;
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, EINA_FALSE);
-
-   primary_output = e_comp_screen_primary_output_get(e_comp_screen);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
-
-   if (!e_output_hwc_setup(primary_output))
-     {
-        ERR("fail to e_output_hwc_setup.");
-        return EINA_FALSE;
-     }
-
-   if (!e_output_fake_config_set(primary_output, 2, 1))
-     {
-        e_error_message_show(_("Fail to set the fake output config!\n"));
-        e_hwc_ecore_evas_deinit();
-        return EINA_FALSE;
-     }
-
-   return EINA_TRUE;
-}
-
-static Eina_Bool
-_e_comp_screen_init_outputs(E_Comp_Screen *e_comp_screen)
-{
-   E_Output *output = NULL;
-   E_Output_Mode *mode = NULL;
-   tdm_display *tdisplay = e_comp_screen->tdisplay;
-   int num_outputs;
-   int i;
-   Eina_Bool scale_updated = EINA_FALSE;
-   Eina_Bool connection_check = EINA_FALSE;
-   tdm_error err = TDM_ERROR_NONE;
-   char bootmode[32];
-   int ret;
-
-   /* init e_output */
-   if (!e_output_init())
-     {
-        ERR("fail to e_output_init.");
-        return EINA_FALSE;
-     }
-
-   /* get the num of outputs */
-   err = tdm_display_get_output_count(tdisplay, &num_outputs);
-   if ((err != TDM_ERROR_NONE) ||
-       (num_outputs < 1))
-     {
-        ERR("fail to get tdm_display_get_output_count\n");
-        return EINA_FALSE;
-     }
-   e_comp_screen->num_outputs = num_outputs;
-
-   ELOGF("COMP_SCREEN","num_outputs = %i", NULL, e_comp_screen->num_outputs);
-
-   if (!e_hwc_init())
-     {
-        ERR("e_hwc_init failed");
-        goto fail;
-     }
-
-   if (!e_hwc_planes_init())
-     {
-        ERR("e_hwc_planes_init failed");
-        goto fail;
-     }
-
-   if (!e_hwc_windows_init())
-     {
-        ERR("e_hwc_windows_init failed");
-        goto fail;
-     }
-
-   for (i = 0; i < num_outputs; i++)
-     {
-        e_main_ts_begin("\tE_Output New");
-        output = e_output_new(e_comp_screen, i);
-        if (!output)
-          {
-             e_main_ts_end("\tE_Output New Failed");
-             goto fail;
-          }
-
-        e_main_ts_begin("\tE_Output Update");
-        if (!e_output_update(output))
-          {
-            e_main_ts_end("\tE_Output Update Failed");
-            ERR("fail to e_output_update.");
-            goto fail;
-          }
-        e_main_ts_end("\tE_Output Update Done");
-
-        e_comp_screen->outputs = eina_list_append(e_comp_screen->outputs, output);
-
-        if (!e_output_connected(output)) continue;
-
-        connection_check = EINA_TRUE;
-
-        /* setting with the best mode and enable the output */
-        e_main_ts_begin("\tE_Output Find Best Mode");
-        mode = e_output_best_mode_find(output);
-        if (!mode)
-          {
-             e_main_ts_end("\tE_Output Find Best Mode Failed");
-             ERR("fail to get best mode.");
-             goto fail;
-          }
-        e_main_ts_end("\tE_Output Find Best Mode Done");
-
-        e_main_ts_begin("\tE_Output Mode Apply");
-        if (!e_output_mode_apply(output, mode))
-          {
-             e_main_ts_end("\tE_Output Mode Apply Failed");
-             ERR("fail to e_output_mode_apply.");
-             goto fail;
-          }
-        e_main_ts_end("\tE_Output Mode Apply Done");
-
-        e_main_ts_begin("\tE_Output Set DPMS ON");
-        ret = device_board_get_boot_mode(bootmode, sizeof(bootmode));
-        if (!ret && !e_util_strcmp(bootmode, "silent"))
-          {
-             INF("silent reboot. do not set dpms");
-          }
-        else
-          {
-             if (!e_output_dpms_set(output, E_OUTPUT_DPMS_ON))
-               {
-                  e_main_ts_end("\tE_Output Set DPMS ON Failed");
-                  ERR("fail to e_output_dpms.");
-                  goto fail;
-               }
-          }
-
-        e_main_ts_end("\tE_Output Set DPMS ON Done");
-
-        e_main_ts_begin("\tE_Output Hwc Setup");
-        if (!e_output_hwc_setup(output))
-          {
-             e_main_ts_end("\tE_Output Hwc Setup Failed");
-             ERR("fail to e_output_hwc_setup.");
-             goto fail;
-          }
-        e_main_ts_end("\tE_Output Hwc Setup Done");
-
-        /* update e_scale with first available output size */
-        if ((e_config->scale.for_tdm) && (!scale_updated))
-          {
-             double target_inch;
-             int dpi;
-
-             target_inch = (round((sqrt(output->info.size.w * output->info.size.w + output->info.size.h * output->info.size.h) / 25.4) * 10) / 10);
-             dpi = (round((sqrt(mode->w * mode->w + mode->h * mode->h) / target_inch) * 10) / 10);
-
-             e_scale_manual_update(dpi);
-             scale_updated = EINA_TRUE;
-          }
-     }
-
-   //TODO: if there is no output connected, make the fake output which is connected.
-   if (!connection_check)
-     {
-        if (!_e_comp_screen_fake_output_set(e_comp_screen))
-          goto fail;
-     }
-
-   e_comp_screen_size_update(e_comp_screen);
-
-   e_main_ts_begin("\tE_Hwc Ecore_Evas Init");
-   if (!e_hwc_ecore_evas_init())
-     {
-        e_main_ts_end("\ttE_Hwc Ecore_Evas Init Failed");
-        ERR("fail to e_hwc_ecore_evas_init");
-        goto fail;
-     }
-   e_main_ts_end("\tE_Hwc Ecore_Evas Init Done");
-
-   if (tdm_display_add_output_create_handler(tdisplay, _e_comp_screen_output_create_cb, e_comp_screen)) goto fail;
-
-   return EINA_TRUE;
-fail:
-   _e_comp_screen_deinit_outputs(e_comp_screen);
-
-   return EINA_FALSE;
-}
-#endif
-
 static void
 _e_comp_screen_e_screen_free(E_Screen *scr)
 {
@@ -887,10 +384,6 @@ _e_comp_screen_engine_deinit(void)
    if (!e_comp) return;
    if (!e_comp->e_comp_screen) return;
 
-#ifdef E_DISPLAY
-#else
-   _e_comp_screen_deinit_outputs(e_comp->e_comp_screen);
-#endif
    _e_comp_screen_del(e_comp->e_comp_screen);
    e_comp->e_comp_screen = NULL;
 }
@@ -911,18 +404,6 @@ _e_comp_screen_engine_init(void)
      }
    e_main_ts_end("\tE_Comp_Screen New Done");
 
-#ifdef E_DISPLAY
-#else
-   e_main_ts_begin("\tE_Comp_Screen Outputs Init");
-   if (!_e_comp_screen_init_outputs(e_comp_screen))
-     {
-        e_main_ts_end("\tE_Comp_Screen Outputs Init Failed");
-        e_error_message_show(_("Enlightenment cannot initialize outputs!\n"));
-        _e_comp_screen_engine_deinit();
-        return EINA_FALSE;
-     }
-   e_main_ts_end("\tE_Comp_Screen Outputs Init Done");
-#endif
    if (!E_EVENT_SCREEN_CHANGE) E_EVENT_SCREEN_CHANGE = ecore_event_type_new();
 
    ecore_event_add(E_EVENT_SCREEN_CHANGE, NULL, NULL, NULL);
@@ -964,19 +445,11 @@ e_comp_screen_e_screens_setup(E_Comp_Screen *e_comp_screen, int rw, int rh)
    int i = 0, right_x = 0;
    int x, y, w, h;
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   primary_output = e_comp_screen_primary_output_get(e_comp_screen);
-#endif
    /* No pirmary output means that there is no output at the system */
    if (!primary_output) goto out;
 
-#ifdef E_DISPLAY
    EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
-#else
-   EINA_LIST_FOREACH(e_comp_screen->outputs, l, output)
-#endif
      {
         screen = E_NEW(E_Screen, 1);
         if (!screen) return;
@@ -1194,11 +667,6 @@ e_comp_screen_shutdown()
 
    e_dbus_conn_shutdown();
 
-#ifdef E_DISPLAY
-#else
-   _e_comp_screen_deinit_outputs(e_comp->e_comp_screen);
-#endif
-
    E_FREE_LIST(output_hooks, e_output_hook_del);
 
    E_FREE_LIST(event_handlers, ecore_event_handler_del);
@@ -1211,37 +679,6 @@ e_comp_screen_shutdown()
    e_comp->e_comp_screen = NULL;
 }
 
-#ifdef E_DISPLAY
-#else
-static E_Output *
-_e_comp_screen_output_find_primary(E_Comp_Screen *e_comp_screen)
-{
-   E_Output *output = NULL, *o;
-   const Eina_List *l;
-
-   EINA_LIST_FOREACH(e_comp_screen->outputs, l, o)
-     {
-        unsigned int pipe = 0;
-        tdm_error error;
-
-        error = tdm_output_get_pipe(o->toutput, &pipe);
-        if (error != TDM_ERROR_NONE || pipe != 0)
-          continue;
-
-        output = o;
-        break;
-     }
-
-   if (!output)
-     {
-        ERR("couldn't find the primary output");
-        return NULL;
-     }
-
-   return output;
-}
-#endif
-
 static Eina_Bool
 _e_comp_screen_rotation_set(E_Comp_Screen *e_comp_screen, int screen_rotation,
   void (*setter)(E_Comp_Screen *e_comp_screen, int data), int data)
@@ -1251,15 +688,9 @@ _e_comp_screen_rotation_set(E_Comp_Screen *e_comp_screen, int screen_rotation,
    const Eina_List *l;
    int w, h;
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
    if (!primary_output)
      return EINA_FALSE;
-#else
-   primary_output = _e_comp_screen_output_find_primary(e_comp_screen);
-   if (!primary_output)
-     return EINA_FALSE;
-#endif
 
    if (!e_output_rotate(primary_output, screen_rotation))
      return EINA_FALSE;
@@ -1367,304 +798,11 @@ e_comp_screen_rotation_ignore_output_transform_send(E_Client *ec, Eina_Bool igno
    e_screen_rotation_ignore_output_transform_send(ec, ignore);
 }
 
-#ifdef E_DISPLAY
-#else
-EINTERN E_Output *
-e_comp_screen_primary_output_get(E_Comp_Screen *e_comp_screen)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, NULL);
-
-   E_Output *output = NULL, *o = NULL;
-   Eina_List *l = NULL;
-   int highest_priority = 0;
-
-   /* find the highest priority of the e_output */
-   EINA_LIST_FOREACH(e_comp_screen->outputs, l, o)
-     {
-        if (highest_priority < o->config.priority)
-          {
-             highest_priority = o->config.priority;
-             output = o;
-          }
-     }
-
-   return output;
-}
-
-EINTERN Eina_Bool
-e_comp_screen_pp_support(void)
-{
-   E_Comp_Screen *e_comp_screen = NULL;
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE);
-
-   e_comp_screen = e_comp->e_comp_screen;
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen->tdisplay, EINA_FALSE);
-
-   return e_comp_screen->pp_enabled;
-}
-
-
-EINTERN Eina_List *
-e_comp_screen_pp_available_formats_get(void)
-{
-  E_Comp_Screen *e_comp_screen = NULL;
-  EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE);
-
-  e_comp_screen = e_comp->e_comp_screen;
-  EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, EINA_FALSE);
-  EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen->tdisplay, EINA_FALSE);
-
-  if (!e_comp_screen->pp_enabled)
-    {
-       ERR("pp does not support.");
-       return NULL;
-    }
-
-   return e_comp_screen->available_pp_formats;
-}
-
-EINTERN void
-e_comp_screen_hwc_info_debug(void)
-{
-   EINA_SAFETY_ON_NULL_RETURN(e_comp);
-   EINA_SAFETY_ON_NULL_RETURN(e_comp->e_comp_screen);
-
-   E_Comp_Screen *e_comp_screen = e_comp->e_comp_screen;
-   E_Output *output = NULL;
-   E_Plane *plane = NULL;
-   Eina_List *l_o, *ll_o;
-   Eina_List *l_l, *ll_l;
-   tdm_output_conn_status conn_status;
-   int output_idx = 0;
-   tdm_layer_capability layer_capabilities;
-   char layer_cap[4096] = {0, };
-   int i;
-   const tdm_prop *tprops;
-   int count;
-
-   INF("HWC: HWC Information ==========================================================");
-   EINA_LIST_FOREACH_SAFE(e_comp_screen->outputs, l_o, ll_o, output)
-     {
-        tdm_error err = TDM_ERROR_NONE;
-
-        if (!output) continue;
-
-        if (e_hwc_policy_get(output->hwc) == E_HWC_POLICY_PLANES)
-          {
-             err = tdm_output_get_conn_status(output->toutput, &conn_status);
-             if (err != TDM_ERROR_NONE) continue;
-             if (conn_status == TDM_OUTPUT_CONN_STATUS_DISCONNECTED) continue;
-
-             INF("HWC: HWC Output(%d):(x, y, w, h)=(%d, %d, %d, %d) Information.",
-                 ++output_idx,
-                 output->config.geom.x, output->config.geom.y, output->config.geom.w, output->config.geom.h);
-             INF("HWC:  num_layers=%d", output->plane_count);
-             EINA_LIST_FOREACH_SAFE(output->planes, l_l, ll_l, plane)
-               {
-                   if (!plane) continue;
-                   /* FIXME: hwc extension doesn't provide thing like layer */
-                   tdm_layer_get_capabilities(plane->tlayer, &layer_capabilities);
-                   snprintf(layer_cap, sizeof(layer_cap), "%s%s%s%s%s%s%s%s",
-                            _layer_cap_to_str(layer_capabilities, TDM_LAYER_CAPABILITY_CURSOR),
-                            _layer_cap_to_str(layer_capabilities, TDM_LAYER_CAPABILITY_PRIMARY),
-                            _layer_cap_to_str(layer_capabilities, TDM_LAYER_CAPABILITY_OVERLAY),
-                            _layer_cap_to_str(layer_capabilities, TDM_LAYER_CAPABILITY_GRAPHIC),
-                            _layer_cap_to_str(layer_capabilities, TDM_LAYER_CAPABILITY_VIDEO),
-                            _layer_cap_to_str(layer_capabilities, TDM_LAYER_CAPABILITY_TRANSFORM),
-                            _layer_cap_to_str(layer_capabilities, TDM_LAYER_CAPABILITY_RESEVED_MEMORY),
-                            _layer_cap_to_str(layer_capabilities, TDM_LAYER_CAPABILITY_NO_CROP));
-                   INF("HWC:  index=%d zpos=%d ec=%p %s",
-                       plane->index, plane->zpos,
-                       plane->ec?plane->ec:NULL,
-                       layer_cap);
-               }
-          }
-        else
-          {
-             /* TODO: construct debug info for outputs managed by the hwc-wins */
-             INF("HWC: HWC Output(%d) managed by hwc-wins.", ++output_idx);
-
-             if (!e_hwc_windows_get_available_properties(output->hwc, &tprops, &count))
-               {
-                  ERR("e_hwc_windows_get_video_available_properties failed");
-                  return;
-               }
-             INF(">>>>>>>> Available UI props : count = %d", count);
-             for (i = 0; i < count; i++)
-               INF("   [%d] %s, %u", i, tprops[i].name, tprops[i].id);
-
-             if (!e_hwc_windows_get_video_available_properties(output->hwc, &tprops, &count))
-               {
-                  ERR("e_hwc_windows_get_video_available_properties failed");
-                  return;
-               }
-             INF(">>>>>>>> Available VIDEO props : count = %d", count);
-             for (i = 0; i < count; i++)
-               INF("   [%d] %s, %u", i, tprops[i].name, tprops[i].id);
-          }
-     }
-   INF("HWC: =========================================================================");
-}
-
-#define NUM_SW_FORMAT   (sizeof(sw_formats) / sizeof(sw_formats[0]))
-
-static tbm_format sw_formats[] = {
-     TBM_FORMAT_ARGB8888,
-     TBM_FORMAT_XRGB8888,
-     TBM_FORMAT_YUV420,
-     TBM_FORMAT_YVU420,
-};
-
-static tdm_layer *
-_e_comp_screen_video_tdm_layer_get(tdm_output *output)
-{
-   int i, count = 0;
-#ifdef CHECKING_PRIMARY_ZPOS
-   int primary_idx = 0, primary_zpos = 0;
-   tdm_layer *primary_layer;
-#endif
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL);
-
-   tdm_output_get_layer_count(output, &count);
-   for (i = 0; i < count; i++)
-     {
-        tdm_layer *layer = tdm_output_get_layer(output, i, NULL);
-        tdm_layer_capability capabilities = 0;
-        EINA_SAFETY_ON_NULL_RETURN_VAL(layer, NULL);
-
-        tdm_layer_get_capabilities(layer, &capabilities);
-        if (capabilities & TDM_LAYER_CAPABILITY_VIDEO)
-          return layer;
-     }
-
-#ifdef CHECKING_PRIMARY_ZPOS
-   tdm_output_get_primary_index(output, &primary_idx);
-   primary_layer = tdm_output_get_layer(output, primary_idx, NULL);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(primary_layer, NULL);
-   tdm_layer_get_zpos(primary_layer, &primary_zpos);
-#endif
-
-   for (i = 0; i < count; i++)
-     {
-        tdm_layer *layer = tdm_output_get_layer(output, i, NULL);
-        tdm_layer_capability capabilities = 0;
-        EINA_SAFETY_ON_NULL_RETURN_VAL(layer, NULL);
-
-        tdm_layer_get_capabilities(layer, &capabilities);
-        if (capabilities & TDM_LAYER_CAPABILITY_OVERLAY)
-          {
-#ifdef CHECKING_PRIMARY_ZPOS
-             int zpos = 0;
-             tdm_layer_get_zpos(layer, &zpos);
-             if (zpos >= primary_zpos) continue;
-#endif
-             return layer;
-          }
-     }
-
-   return NULL;
-}
-
-static E_Output *
-_e_comp_screen_eoutput_get_by_toutput(tdm_output *output)
-{
-   Eina_List *l;
-   E_Output *eo;
-
-   EINA_LIST_FOREACH(e_comp->e_comp_screen->outputs, l, eo)
-      if (eo->toutput == output)
-        return eo;
-
-   return NULL;
-}
-#endif
-
 E_API Eina_Bool
 e_comp_screen_available_video_formats_get(const tbm_format **formats, int *count)
 {
-#ifdef E_DISPLAY
    return e_display_available_video_formats_get(formats, count);
-#else
-   E_Output *output;
-   tdm_output *toutput;
-   tdm_layer *layer;
-   tdm_error error;
-
-   *count = 0;
-
-   if (e_comp_screen_pp_support())
-     {
-        error = tdm_display_get_pp_available_formats(e_comp->e_comp_screen->tdisplay, formats, count);
-        if (error == TDM_ERROR_NONE)
-          return EINA_TRUE;
-     }
-
-   /* get the first output */
-   toutput = tdm_display_get_output(e_comp->e_comp_screen->tdisplay, 0, NULL);
-   if (!toutput)
-     return EINA_FALSE;
-
-   output = _e_comp_screen_eoutput_get_by_toutput(toutput);
-   if (!output)
-     return EINA_FALSE;
-
-   if (e_hwc_policy_get(output->hwc) != E_HWC_POLICY_WINDOWS)
-     {
-        /* get the first suitable layer */
-        layer = _e_comp_screen_video_tdm_layer_get(toutput);
-        if (layer)
-          {
-             tdm_layer_get_available_formats(layer, formats, count);
-          }
-        else
-          {
-             *formats = sw_formats;
-             *count = NUM_SW_FORMAT;
-          }
-     }
-   else
-     {
-        error = tdm_hwc_get_video_supported_formats(output->hwc->thwc, formats, count);
-        if (error != TDM_ERROR_NONE)
-          {
-             *formats = sw_formats;
-             *count = NUM_SW_FORMAT;
-          }
-     }
-
-   return EINA_TRUE;
-#endif
-}
-
-#ifdef E_DISPLAY
-#else
-EINTERN void *
-e_comp_screen_gbm_device_get(E_Comp_Screen *e_comp_screen)
-{
-   int fd;
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, NULL);
-
-   if (e_comp_screen->gdevice) return e_comp_screen->gdevice;
-
-   fd = tbm_drm_helper_get_master_fd();
-   EINA_SAFETY_ON_FALSE_RETURN_VAL(fd >= 0, NULL);
-
-   e_comp_screen->gdevice = gbm_create_device(fd);
-   if (!e_comp_screen->gdevice)
-     {
-        ERR("fail to create gbm device");
-        close(fd);
-        return NULL;
-     }
-
-   e_comp_screen->gdevice_fd = fd;
-
-   return e_comp_screen->gdevice;
 }
-#endif
 
 EINTERN Eina_Bool
 e_comp_screen_size_get(E_Comp_Screen *e_comp_screen, int *w, int *h)
@@ -1677,87 +815,10 @@ e_comp_screen_size_get(E_Comp_Screen *e_comp_screen, int *w, int *h)
    return EINA_TRUE;
 }
 
-#ifdef E_DISPLAY
-#else
-static char *
-_e_comp_screen_dpms_to_string(E_OUTPUT_DPMS dpms)
-{
-   switch (dpms)
-     {
-        case E_OUTPUT_DPMS_ON:
-          return "DPMS_ON";
-          break;
-        case E_OUTPUT_DPMS_STANDBY:
-          return "DPMS_STANDBY";
-          break;
-        case E_OUTPUT_DPMS_SUSPEND:
-          return "DPMS_SUSPEND";
-          break;
-        case E_OUTPUT_DPMS_OFF:
-          return "DPMS_OFF";
-          break;
-        default:
-          return "Unknown";
-     }
-}
-
-EINTERN void
-e_comp_screen_debug_info_get(Eldbus_Message_Iter *iter)
-{
-   Eldbus_Message_Iter *line_array;
-   E_Output *output = NULL;
-   E_Hwc *hwc = NULL;
-   Eina_List *l;
-   char info_str[1024];
-
-   eldbus_message_iter_arguments_append(iter, "as", &line_array);
-
-   eldbus_message_iter_basic_append(line_array, 's',
-   "===========================================================================================");
-   eldbus_message_iter_basic_append(line_array, 's',
-   " idx      id           status       dpms     (   x  ,   y  ) ( w    x    h ) ");
-   eldbus_message_iter_basic_append(line_array, 's',
-   "===========================================================================================");
-
-
-#ifdef E_DISPLAY
-   EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
-#else
-   E_Comp_Screen *e_comp_screen = NULL;
-   e_comp_screen = e_comp->e_comp_screen;
-   EINA_LIST_FOREACH(e_comp_screen->outputs, l, output)
-#endif
-     {
-        if (!output) continue;
-        hwc = output->hwc;
-        if (!output->hwc) continue;
-        if (e_hwc_policy_get(hwc) == E_HWC_POLICY_NONE) continue;
-
-        snprintf(info_str, sizeof(info_str), "%2d %12s %15s %10s   (%5d , %5d) (%5d x %5d)",
-                 output->index, output->id,
-                 output->info.connected ? "connected" : "disconnected",
-                 _e_comp_screen_dpms_to_string(output->dpms),
-                 output->config.geom.x, output->config.geom.y,
-                 output->config.geom.w, output->config.geom.h);
-
-        eldbus_message_iter_basic_append(line_array, 's', info_str);
-     }
-
-   eldbus_message_iter_basic_append(line_array, 's',
-   "===========================================================================================");
-
-   eldbus_message_iter_container_close(iter, line_array);
-}
-#endif
-
 E_API Eina_List *
 e_comp_screen_outputs_get(E_Comp_Screen *e_comp_screen)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, NULL);
 
-#ifdef E_DISPLAY
    return e_display_outputs_get();
-#else
-   return e_comp_screen->outputs;
-#endif
 }
index 106e99c..71c085d 100644 (file)
@@ -5,10 +5,6 @@
 #include "e_comp_screen.h"
 
 #include <Eldbus.h>
-//#ifdef E_DISPLAY
-//#else
-#include <tdm.h>
-//#endif
 
 typedef struct _E_Screen        E_Screen;
 
@@ -24,15 +20,6 @@ extern EINTERN int E_EVENT_SCREEN_CHANGE;
 EINTERN Eina_Bool         e_comp_screen_init(void);
 EINTERN void              e_comp_screen_shutdown(void);
 
-//#ifdef E_DISPLAY
-//#else
-EINTERN void              e_comp_screen_hwc_info_debug(void);
-EINTERN E_Output         *e_comp_screen_primary_output_get(E_Comp_Screen *e_comp_screen);
-EINTERN Eina_Bool         e_comp_screen_pp_support(void);
-EINTERN Eina_List        *e_comp_screen_pp_available_formats_get(void);
-EINTERN void             *e_comp_screen_gbm_device_get(E_Comp_Screen *e_comp_screen);
-EINTERN void              e_comp_screen_debug_info_get(Eldbus_Message_Iter *iter);
-//#endif
 EINTERN void              e_comp_screen_e_screens_setup(E_Comp_Screen *e_comp_screen, int rw, int rh);
 EINTERN const Eina_List  *e_comp_screen_e_screens_get(E_Comp_Screen *e_comp_screen);
 EINTERN Eina_Bool         e_comp_screen_rotation_pre_set(E_Comp_Screen *e_comp_screen, int rotation_pre);
index ddb1e8f..94c8a35 100644 (file)
@@ -427,11 +427,7 @@ e_input_device_rotation_set(E_Input_Device *dev, unsigned int rotation)
    EINA_SAFETY_ON_NULL_RETURN(dev);
    EINA_SAFETY_ON_NULL_RETURN(dev->seats);
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif
    EINA_SAFETY_ON_NULL_RETURN(primary_output);
 
    EINA_LIST_FOREACH(dev->seats, l, seat)
@@ -548,11 +544,7 @@ e_input_device_touch_rotation_set(E_Input_Device *dev, unsigned int rotation)
    EINA_SAFETY_ON_NULL_RETURN_VAL(dev, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(dev->seats, EINA_FALSE);
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif
    e_output_size_get(primary_output, &output_w, &output_h);
    default_w = (float)output_w;
    default_h = (float)output_h;
@@ -615,11 +607,7 @@ e_input_device_touch_transformation_set(E_Input_Device *dev, int offset_x, int o
    EINA_SAFETY_ON_NULL_RETURN_VAL(dev->seats, EINA_FALSE);
    EINA_SAFETY_ON_TRUE_RETURN_VAL((w == 0) || (h == 0), EINA_FALSE);
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif
    e_output_size_get(primary_output, &output_w, &output_h);
    default_w = (float)output_w;
    default_h = (float)output_h;
index 4e97216..87a30cc 100644 (file)
@@ -41,11 +41,7 @@ e_input_evdev_device_calibration_set(E_Input_Evdev *evdev)
           }
      }
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif 
    e_output_size_get(primary_output, &w, &h);
 
    if (primary_output)
@@ -1097,11 +1093,7 @@ e_input_evdev_handle_pointer_motion_absolute(E_Input_Evdev *evdev, struct libinp
 
    EINA_SAFETY_ON_NULL_RETURN(evdev);
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif
 
    e_output_size_get(primary_output, &w, &h);
 
index cb6cb7b..936f991 100644 (file)
@@ -2269,17 +2269,7 @@ _e_comp_wl_cb_randr_change(void *data EINA_UNUSED, int type EINA_UNUSED, void *e
    E_Output *eout;
    unsigned int transform = WL_OUTPUT_TRANSFORM_NORMAL;
 
-#ifdef E_DISPLAY
    EINA_LIST_FOREACH(e_display_outputs_get(), l, eout)
-#else
-   E_Comp_Screen *e_comp_screen;
-
-   if (!e_comp) return ECORE_CALLBACK_RENEW;
-   if (!e_comp->e_comp_screen) return ECORE_CALLBACK_RENEW;
-   e_comp_screen = e_comp->e_comp_screen;
-
-   EINA_LIST_FOREACH(e_comp_screen->outputs, l, eout)
-#endif
      {
         if (!eout->config.enabled)
           {
index fbb7ef4..d0f324d 100644 (file)
@@ -585,11 +585,7 @@ _e_eom_presentation_check(void *data)
      {
         if (eom_trace_debug)
           EOMINF("_e_eom_presentation_check wait expired set to mirror", NULL, eom_output->output);
-#ifdef E_DISPLAY
         primary_output = e_display_primary_output_get();
-#else
-        primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif 
         e_output_mirror_set(eom_output->output, primary_output);
         eom_output->wait_presentation = EINA_FALSE;
      }
@@ -667,11 +663,7 @@ _e_eom_cb_wl_request_set_attribute(struct wl_client *client, struct wl_resource
         if (e_output_presentation_ec_get(eom_output->output) == eom_client->ec)
           e_output_presentation_unset(eom_output->output);
 
-#ifdef E_DISPLAY
         primary_output = e_display_primary_output_get();
-#else
-        primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif 
         if (!e_output_mirror_set(eom_output->output, primary_output))
           {
              EOMERR("e_output_mirror_set fail", eom_output->output);
@@ -824,11 +816,7 @@ _e_eom_cb_wl_eom_client_destroy(struct wl_resource *resource)
         _e_eom_output_attribute_set(eom_output, EOM_OUTPUT_ATTRIBUTE_NONE);
         e_output_presentation_unset(eom_output->output);
 
-#ifdef E_DISPLAY
         primary_output = e_display_primary_output_get();
-#else
-        primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif 
         if (!e_output_mirror_set(eom_output->output, primary_output))
           EOMERR("e_output_mirror_set fail", eom_output->output);
      }
@@ -932,11 +920,7 @@ _e_eom_connect(E_EomOutputPtr eom_output)
      {
         EOMINF("Start Mirroring", NULL, eom_output->output);
 
-#ifdef E_DISPLAY
         primary_output = e_display_primary_output_get();
-#else
-        primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif 
         if (!e_output_mirror_set(eom_output->output, primary_output))
           {
              EOMERR("e_output_mirror_set fail", eom_output->output);
@@ -1090,33 +1074,14 @@ _e_eom_output_init(void)
    E_EomOutputPtr eom_output;
    Eina_List *l;
 
-#ifdef E_DISPLAY
    primary_output = e_display_primary_output_get();
-#else
-   E_Comp_Screen *e_comp_screen = NULL;
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE);
-
-   e_comp_screen = e_comp->e_comp_screen;
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, EINA_FALSE);
-
-   primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-#endif 
    EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
 
-#ifdef E_DISPLAY
    g_eom->eom_output_count = e_display_num_outputs_get() - 1;
-#else
-   g_eom->eom_output_count = e_comp_screen->num_outputs - 1;
-#endif
    EOMINF("external output count : %d", NULL, NULL, g_eom->eom_output_count);
 
    /* create the eom_output except for the primary output */
-#ifdef E_DISPLAY
    EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
-#else
-   EINA_LIST_FOREACH(e_comp_screen->outputs, l, output)
-#endif
      {
         if (!output) continue;
         if (output == primary_output) continue;
index a255cad..db076cf 100644 (file)
@@ -486,11 +486,7 @@ e_explicit_sync_init(void)
    if (!e_comp_gl_get()) return EINA_FALSE;
    if (!e_egl_sync_enabled_get()) return EINA_FALSE;
 
-#ifdef E_DISPLAY
    EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
-#else
-   EINA_LIST_FOREACH(e_comp->e_comp_screen->outputs, l, output)
-#endif
      {
          if (!output) continue;
          if (!output->hwc) continue;
index 13dcdd5..7db33b9 100644 (file)
@@ -1,5 +1,5 @@
 #include "e_tbm_gbm_server_intern.h"
-#include "e_comp_screen_intern.h"
+#include "e_display_intern.h"
 #include "e_comp_wl_tbm_intern.h"
 
 #include <assert.h>
@@ -260,7 +260,7 @@ _e_gbm_client_buffer_tbm_surface_create_with_gbm_bo(struct gbm_bo *gbm_bo)
 static E_Gbm_Client_Buffer *
 _e_gbm_client_buffer_create(struct wl_resource *resource)
 {
-   void *gbm_device = e_comp->e_comp_screen->gdevice;
+   void *gbm_device = e_display_gbm_device_get();;
    struct gbm_bo *gbm_bo;
    E_Gbm_Client_Buffer *buffer;