display: Move plugin display.c to core 33/290233/6
authorYoungjae Cho <y0.cho@samsung.com>
Tue, 21 Mar 2023 05:48:56 +0000 (14:48 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Mon, 27 Mar 2023 04:51:06 +0000 (13:51 +0900)
The list lcdon_ops has been renamed to display_dependent_device_ops and
related operation has been added.
 - display_start_dependent_device()
 - display_stop_dependent_device()
 - display_register_dependent_device()
 - display_unregister_dependent_device()
Each operation replaces the previous lcdon_ops code.

The enum brightness_request_e has been moved to display-ops.h that
contains operation of auto_brightness_control.

Change-Id: I04b2b28d42938743fcbe0654461274127b95f010
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
17 files changed:
plugins/iot-headed/display/core.c
plugins/iot-headed/display/device-interface.c
plugins/mobile/display/core.c
plugins/mobile/display/device-interface.c
plugins/tv/display/core.c
plugins/tv/display/device-interface.c
plugins/wearable/display/auto-brightness-sensorhub.h
plugins/wearable/display/core.c
plugins/wearable/display/device-interface.c
src/display/display.c
src/display/display.h [moved from src/display/plugin-common/display.h with 66% similarity]
src/display/plugin-common/core.h
src/display/plugin-common/display-dbus.c
src/display/plugin-common/display-lock.c
src/display/plugin-common/display-ops.h
src/display/plugin-common/display-panel.c
src/display/plugin-common/display.c [deleted file]

index 57dbfbe..a280885 100644 (file)
@@ -109,7 +109,6 @@ static int lock_screen_timeout = LOCK_SCREEN_INPUT_TIMEOUT;
 static struct timeval lcdon_tv;
 static int lcd_paneloff_mode = false;
 static int stay_touchscreen_off = false;
-GList *lcdon_ops;
 /*
  * The two variables(lcdon_broadcast, pmstate_suspend) must be set initial
  * state because it should be sent from previous state at booting time.
@@ -304,8 +303,6 @@ static gboolean late_transit_on(void *data)
 
 void lcd_on_procedure(int state, enum device_flags flag)
 {
-       GList *l = NULL;
-       const struct device_ops *ops = NULL;
        unsigned long flags = get_lcd_on_flags();
        flags |= flag;
 
@@ -348,8 +345,7 @@ void lcd_on_procedure(int state, enum device_flags flag)
        else if (state == LCD_DIM)
                set_setting_pmstate(S_LCDDIM);
 
-       SYS_G_LIST_FOREACH(lcdon_ops, l, ops)
-               ops->start(flags);
+       display_start_dependent_device(flags);
 
        if (!lcdon_broadcast) {
        broadcast_lcd_on(SIGNAL_POST, flags);
@@ -382,8 +378,6 @@ static unsigned long get_lcd_off_flags(void)
 
 inline void lcd_off_procedure(enum device_flags flag)
 {
-       GList *l = NULL;
-       const struct device_ops *ops = NULL;
        unsigned long flags = get_lcd_off_flags();
        flags |= flag;
 
@@ -426,8 +420,7 @@ inline void lcd_off_procedure(enum device_flags flag)
        if (flags & LCD_PHASED_TRANSIT_MODE)
                display_backlight_change_brightness_by_dpms_state(DPMS_OFF);
 
-       SYS_G_LIST_FOREACH(lcdon_ops, l, ops)
-               ops->stop(flags);
+       display_stop_dependent_device(flags);
 
        if (flags & AMBIENT_MODE) {
                broadcast_lcd_off_late(flags);
@@ -1737,25 +1730,20 @@ static void init_lcd_operation(void)
 
        ops = find_device("display");
        if (!check_default(ops))
-               SYS_G_LIST_APPEND(lcdon_ops, ops);
+               display_register_dependent_device(ops);
 
        ops = find_device("touchkey");
        if (!check_default(ops))
-               SYS_G_LIST_APPEND(lcdon_ops, ops);
+               display_register_dependent_device(ops);
 
        ops = find_device("touchscreen");
        if (!check_default(ops))
-               SYS_G_LIST_APPEND(lcdon_ops, ops);
+               display_register_dependent_device(ops);
 }
 
 static void exit_lcd_operation(void)
 {
-       GList *l = NULL;
-       GList *l_next = NULL;
-       const struct device_ops *ops = NULL;
-
-       SYS_G_LIST_FOREACH_SAFE(lcdon_ops, l, l_next, ops)
-               SYS_G_LIST_REMOVE_LIST(lcdon_ops, l);
+       display_unregister_dependent_device();
 }
 
 enum {
index 43fe79e..2a2c497 100644 (file)
@@ -43,7 +43,6 @@
 #include "vconf.h"
 #include "core.h"
 #include "display-dpms.h"
-#include "display.h"
 #include "display-lock.h"
 #include "display-backlight.h"
 #include "display-panel.h"
index 87bb9ac..0949e9b 100644 (file)
@@ -111,7 +111,6 @@ static int lock_screen_timeout = LOCK_SCREEN_INPUT_TIMEOUT;
 static struct timeval lcdon_tv;
 static int lcd_paneloff_mode = false;
 static int stay_touchscreen_off = false;
-GList *lcdon_ops;
 /*
  * The two variables(lcdon_broadcast, pmstate_suspend) must be set initial
  * state because it should be sent from previous state at booting time.
@@ -311,8 +310,6 @@ static gboolean late_transit_on(void *data)
 
 void lcd_on_procedure(int state, enum device_flags flag)
 {
-       GList *l = NULL;
-       const struct device_ops *ops = NULL;
        unsigned long flags = get_lcd_on_flags();
        flags |= flag;
 
@@ -355,8 +352,7 @@ void lcd_on_procedure(int state, enum device_flags flag)
        else if (state == LCD_DIM)
                set_setting_pmstate(S_LCDDIM);
 
-       SYS_G_LIST_FOREACH(lcdon_ops, l, ops)
-               ops->start(flags);
+       display_start_dependent_device(flags);
 
        if (!lcdon_broadcast) {
        broadcast_lcd_on(SIGNAL_POST, flags);
@@ -389,8 +385,6 @@ static unsigned long get_lcd_off_flags(void)
 
 inline void lcd_off_procedure(enum device_flags flag)
 {
-       GList *l = NULL;
-       const struct device_ops *ops = NULL;
        unsigned long flags = get_lcd_off_flags();
        flags |= flag;
 
@@ -433,8 +427,7 @@ inline void lcd_off_procedure(enum device_flags flag)
        if (flags & LCD_PHASED_TRANSIT_MODE)
                display_backlight_change_brightness_by_dpms_state(DPMS_OFF);
 
-       SYS_G_LIST_FOREACH(lcdon_ops, l, ops)
-               ops->stop(flags);
+       display_stop_dependent_device(flags);
 
        if (flags & AMBIENT_MODE) {
                broadcast_lcd_off_late(flags);
@@ -1747,25 +1740,20 @@ static void init_lcd_operation(void)
 
        ops = find_device("display");
        if (!check_default(ops))
-               SYS_G_LIST_APPEND(lcdon_ops, ops);
+               display_register_dependent_device(ops);
 
        ops = find_device("touchkey");
        if (!check_default(ops))
-               SYS_G_LIST_APPEND(lcdon_ops, ops);
+               display_register_dependent_device(ops);
 
        ops = find_device("touchscreen");
        if (!check_default(ops))
-               SYS_G_LIST_APPEND(lcdon_ops, ops);
+               display_register_dependent_device(ops);
 }
 
 static void exit_lcd_operation(void)
 {
-       GList *l = NULL;
-       GList *l_next = NULL;
-       const struct device_ops *ops = NULL;
-
-       SYS_G_LIST_FOREACH_SAFE(lcdon_ops, l, l_next, ops)
-               SYS_G_LIST_REMOVE_LIST(lcdon_ops, l);
+       display_unregister_dependent_device();
 }
 
 enum {
index b4b0496..8726b08 100644 (file)
@@ -42,7 +42,6 @@
 #include "vconf.h"
 #include "core.h"
 #include "display-dpms.h"
-#include "display.h"
 #include "display-lock.h"
 #include "display-backlight.h"
 #include "display-panel.h"
index 956cc53..c4a34d3 100644 (file)
@@ -109,7 +109,6 @@ static int lock_screen_timeout = LOCK_SCREEN_INPUT_TIMEOUT;
 static struct timeval lcdon_tv;
 static int lcd_paneloff_mode = false;
 static int stay_touchscreen_off = false;
-GList *lcdon_ops;
 /*
  * The two variables(lcdon_broadcast, pmstate_suspend) must be set initial
  * state because it should be sent from previous state at booting time.
@@ -304,8 +303,6 @@ static gboolean late_transit_on(void *data)
 
 void lcd_on_procedure(int state, enum device_flags flag)
 {
-       GList *l = NULL;
-       const struct device_ops *ops = NULL;
        unsigned long flags = get_lcd_on_flags();
        flags |= flag;
 
@@ -348,8 +345,7 @@ void lcd_on_procedure(int state, enum device_flags flag)
        else if (state == LCD_DIM)
                set_setting_pmstate(S_LCDDIM);
 
-       SYS_G_LIST_FOREACH(lcdon_ops, l, ops)
-               ops->start(flags);
+       display_start_dependent_device(flags);
 
        if (!lcdon_broadcast) {
        broadcast_lcd_on(SIGNAL_POST, flags);
@@ -382,8 +378,6 @@ static unsigned long get_lcd_off_flags(void)
 
 inline void lcd_off_procedure(enum device_flags flag)
 {
-       GList *l = NULL;
-       const struct device_ops *ops = NULL;
        unsigned long flags = get_lcd_off_flags();
        flags |= flag;
 
@@ -426,8 +420,7 @@ inline void lcd_off_procedure(enum device_flags flag)
        if (flags & LCD_PHASED_TRANSIT_MODE)
                display_backlight_change_brightness_by_dpms_state(DPMS_OFF);
 
-       SYS_G_LIST_FOREACH(lcdon_ops, l, ops)
-               ops->stop(flags);
+       display_stop_dependent_device(flags);
 
        if (flags & AMBIENT_MODE) {
                broadcast_lcd_off_late(flags);
@@ -1737,25 +1730,20 @@ static void init_lcd_operation(void)
 
        ops = find_device("display");
        if (!check_default(ops))
-               SYS_G_LIST_APPEND(lcdon_ops, ops);
+               display_register_dependent_device(ops);
 
        ops = find_device("touchkey");
        if (!check_default(ops))
-               SYS_G_LIST_APPEND(lcdon_ops, ops);
+               display_register_dependent_device(ops);
 
        ops = find_device("touchscreen");
        if (!check_default(ops))
-               SYS_G_LIST_APPEND(lcdon_ops, ops);
+               display_register_dependent_device(ops);
 }
 
 static void exit_lcd_operation(void)
 {
-       GList *l = NULL;
-       GList *l_next = NULL;
-       const struct device_ops *ops = NULL;
-
-       SYS_G_LIST_FOREACH_SAFE(lcdon_ops, l, l_next, ops)
-               SYS_G_LIST_REMOVE_LIST(lcdon_ops, l);
+       display_unregister_dependent_device();
 }
 
 enum {
index b607cc3..10dc227 100644 (file)
@@ -43,7 +43,6 @@
 #include "core.h"
 #include "display-dpms.h"
 #include "display-panel.h"
-#include "display.h"
 #include "display-backlight.h"
 #include "power/power-suspend.h"
 #include "display-lock.h"
index 7f26c4a..a3d401f 100644 (file)
@@ -29,6 +29,7 @@
 #define HBM_LEVEL              120
 
 #include "display.h"
+#include "display-ops.h"
 
 int prepare_level_handler(void);
 void exit_level_handler(void);
index 904ca95..cf41068 100644 (file)
@@ -121,7 +121,6 @@ static int lock_screen_timeout = LOCK_SCREEN_INPUT_TIMEOUT;
 static struct timeval lcdon_tv;
 static int lcd_paneloff_mode = false;
 static int stay_touchscreen_off = false;
-GList *lcdon_ops;
 /*
  * The two variables(lcdon_broadcast, pmstate_suspend) must be set initial
  * state because it should be sent from previous state at booting time.
@@ -515,8 +514,6 @@ static gboolean late_transit_on(void *data)
 
 void lcd_on_procedure(int state, enum device_flags flag)
 {
-       GList *l = NULL;
-       const struct device_ops *ops = NULL;
        unsigned long flags = get_lcd_on_flags();
        flags |= flag;
        int ret;
@@ -567,8 +564,7 @@ void lcd_on_procedure(int state, enum device_flags flag)
        else if (state == LCD_DIM)
                set_setting_pmstate(S_LCDDIM);
 
-       SYS_G_LIST_FOREACH(lcdon_ops, l, ops)
-               ops->start(flags);
+       display_start_dependent_device(flags);
 
        if (!lcdon_broadcast) {
                broadcast_lcd_on(SIGNAL_POST, flags);
@@ -598,8 +594,6 @@ static unsigned long get_lcd_off_flags(void)
 
 inline void lcd_off_procedure(enum device_flags flag)
 {
-       GList *l = NULL;
-       const struct device_ops *ops = NULL;
        unsigned long flags = get_lcd_off_flags();
        flags |= flag;
 
@@ -645,8 +639,7 @@ inline void lcd_off_procedure(enum device_flags flag)
        if (flags & LCD_PHASED_TRANSIT_MODE)
                display_backlight_change_brightness_by_dpms_state(DPMS_OFF);
 
-       SYS_G_LIST_FOREACH(lcdon_ops, l, ops)
-               ops->stop(flags);
+       display_stop_dependent_device(flags);
 
        if (flags & AMBIENT_MODE) {
                broadcast_lcd_off_late(flags);
@@ -2005,25 +1998,20 @@ static void init_lcd_operation(void)
 
        ops = find_device("display");
        if (!check_default(ops))
-               SYS_G_LIST_APPEND(lcdon_ops, ops);
+               display_register_dependent_device(ops);
 
        ops = find_device("touchscreen");
        if (!check_default(ops))
-               SYS_G_LIST_APPEND(lcdon_ops, ops);
+               display_register_dependent_device(ops);
 
        ops = find_device("bezel");
        if (!check_default(ops))
-               SYS_G_LIST_APPEND(lcdon_ops, ops);
+               display_register_dependent_device(ops);
 }
 
 static void exit_lcd_operation(void)
 {
-       GList *l = NULL;
-       GList *l_next = NULL;
-       const struct device_ops *ops = NULL;
-
-       SYS_G_LIST_FOREACH_SAFE(lcdon_ops, l, l_next, ops)
-               SYS_G_LIST_REMOVE_LIST(lcdon_ops, l);
+       display_unregister_dependent_device();
 }
 
 enum {
index 3f57023..0054982 100644 (file)
 #include "vconf.h"
 #include "core.h"
 #include "display-dpms.h"
-#include "display.h"
 #include "display-lock.h"
 #include "display-backlight.h"
 #include "display-panel.h"
-#include "display-config.h"
+#include "display/display-config.h"
 #include "battery-monitor.h"
 #include "battery/power-supply.h"
 #include "power/power-suspend.h"
index a8f72ed..32dd285 100644 (file)
  * limitations under the License.
  */
 
+#include <libsyscommon/list.h>
 #include <shared/devices.h>
 
+#include "display/display.h"
+#include "shared/log.h"
+
 static const struct device_ops *display_plugin_device_ops;
+static int pm_cur_state;
+static int pm_old_state;
+static unsigned int pm_status_flag;
+static enum display_init_direction_e g_display_init_direction;
+static bool g_display_hal_backend_available;
+static GList *display_dependent_device_ops;
+
+inline int get_pm_cur_state(void)
+{
+       return pm_cur_state;
+}
+
+inline void set_pm_cur_state(int cur_state)
+{
+       pm_cur_state = cur_state;
+}
+
+inline int get_pm_old_state(void)
+{
+       return pm_old_state;
+}
+
+inline void set_pm_old_state(int old_state)
+{
+       pm_old_state = old_state;
+}
+
+inline unsigned int get_pm_status_flag(void)
+{
+       return pm_status_flag;
+}
+
+inline void set_pm_status_flag(unsigned int status_flag)
+{
+       pm_status_flag |= status_flag;
+}
+
+inline void clear_pm_status_flag(unsigned int status_flag)
+{
+       pm_status_flag &= ~status_flag;
+}
+
+inline enum display_init_direction_e get_display_init_direction(void)
+{
+       return g_display_init_direction;
+}
+
+inline void set_display_init_direction(enum display_init_direction_e display_init_direction)
+{
+       g_display_init_direction = display_init_direction;
+}
+
+/* FIXME: The first parameter was type enum dpms_state.
+ *        After extracting display-dpms from plugin, restore its type to enum dpms_state. */
+void lcd_direct_control(int dpms_state, int flags)
+{
+       const struct device_ops *ops = NULL;
+       GList *l = NULL;
+
+       switch (dpms_state) {
+       case 0: /* FIXME: DPMS_ON */
+               SYS_G_LIST_FOREACH(display_dependent_device_ops, l, ops)
+                       ops->start(flags);
+               break;
+       case 3: /* FIXME: DPMS_OFF */
+               SYS_G_LIST_FOREACH(display_dependent_device_ops, l, ops)
+                       ops->stop(flags);
+               break;
+       default:
+               _E("state is wrong value %d", dpms_state);
+               break;
+       }
+}
+
+/* FIXME: This function is for temporary use, should be fixed after plugin refactoring */
+void display_set_hal_backend_available(bool display_hal_backend_available)
+{
+       g_display_hal_backend_available = display_hal_backend_available;
+}
+
+/* FIXME: This function is for temporary use, should be fixed after plugin refactoring */
+bool display_is_hal_backend_available(void)
+{
+       return g_display_hal_backend_available;
+}
+
+void display_start_dependent_device(unsigned long flags)
+{
+       const struct device_ops *ops = NULL;
+       GList *l;
+
+       SYS_G_LIST_FOREACH(display_dependent_device_ops, l, ops)
+               ops->start(flags);
+}
+
+void display_stop_dependent_device(unsigned long flags)
+{
+       const struct device_ops *ops = NULL;
+       GList *l;
+
+       SYS_G_LIST_FOREACH(display_dependent_device_ops, l, ops)
+               ops->stop(flags);
+}
+
+void display_register_dependent_device(const struct device_ops *ops)
+{
+       SYS_G_LIST_APPEND(display_dependent_device_ops, ops);
+}
+
+void display_unregister_dependent_device(void)
+{
+       GList *l = NULL;
+       GList *l_next = NULL;;
+       const struct device_ops *ops = NULL;
+
+       SYS_G_LIST_FOREACH_SAFE(display_dependent_device_ops, l, l_next, ops)
+               SYS_G_LIST_REMOVE_LIST(display_dependent_device_ops, l);
+}
 
 static int display_probe(void *data)
 {
similarity index 66%
rename from src/display/plugin-common/display.h
rename to src/display/display.h
index 90c4764..c947535 100644 (file)
  * limitations under the License.
  */
 
-
 #ifndef __DISPLAY_H__
 #define __DISPLAY_H__
 
-#include <libsyscommon/ini-parser.h>
-#include "device-interface.h"
+#include <stdbool.h>
+#include "shared/devices.h"
 
-void lcd_direct_control(enum dpms_state state, int flags);
+enum display_init_direction_e {
+       DISPLAY_INIT_DIRECTION_HORIZONTAL,
+       DISPLAY_INIT_DIRECTION_VERTICAL,
+};
+
+void lcd_direct_control(int dpms_state, int flags); /* FIXME: The first parameter was type enum dpms_state */
 int get_pm_cur_state(void);
 int get_pm_old_state(void);
 void set_pm_cur_state(int cur_state);
@@ -35,35 +39,9 @@ enum display_init_direction_e get_display_init_direction(void);
 void set_display_init_direction(enum display_init_direction_e display_init_direction);
 void display_set_hal_backend_available(bool display_hal_backend_available);
 bool display_is_hal_backend_available(void);
+void display_start_dependent_device(unsigned long flags);
+void display_stop_dependent_device(unsigned long flags);
+void display_register_dependent_device(const struct device_ops *ops);
+void display_unregister_dependent_device(void);
 
-enum brightness_request_e {
-       BR_MIN = 0,
-       /* entering request */
-       BR_LBM_ON,
-       BR_HBM_ON,
-       BR_HOLD_BRIGHTNESS,
-       BR_LOWDIM_ON, /* low battery dim */
-
-       /* exiting request */
-       BR_LBM_OFF,
-       BR_HBM_OFF,
-       BR_RELEASE_BRIGHTNESS,
-       BR_LOWDIM_OFF, /* low battery dim off */
-
-       /* special */
-       BR_SET_BRIGHTNESS,
-
-       BR_MAX,
-};
-
-enum display_init_direction_e {
-       DISPLAY_INIT_DIRECTION_HORIZONTAL,
-       DISPLAY_INIT_DIRECTION_VERTICAL,
-};
-
-/* request for brightness that managed internally.
- * BR_HOLD_BRIGHTNESS and BR_SET_BRIGHTNESS does not use this implicit brightness
- * for request, but explicitly request for a brightness value */
-#define BR_IMPLICIT            (-1)
-
-#endif
+#endif //__DISPLAY_H__
index fce9961..0d83d1a 100644 (file)
@@ -28,6 +28,7 @@
 #include "device-interface.h"
 #include "setting.h"
 #include "display-dpms.h"
+#include "display.h"
 #include "display-config.h"
 
 #define WITHOUT_STARTNOTI      0x1
@@ -119,7 +120,6 @@ struct display_keyfilter_ops {
 };
 
 extern const struct display_keyfilter_ops *keyfilter_ops;
-extern GList *lcdon_ops;
 
 typedef struct {
        pid_t pid;
@@ -159,7 +159,6 @@ void set_lcd_paneloff_mode(int val);
 void lcd_on_direct(enum device_flags flags);
 void lcd_on_procedure(int state, enum device_flags flag);
 void lcd_off_procedure(enum device_flags flag);
-void lcd_direct_control(enum dpms_state state, int flags);
 bool touch_event_blocked(void);
 void broadcast_lcd_off_late(enum device_flags flags);
 void set_dim_state(bool on);
index 88a3ee6..fa77a7c 100644 (file)
 #include "dd-display.h"
 #include "display-actor.h"
 #include "display-ops.h"
-#include "display.h"
 #include "shared/plugin.h"
 #include "display-lock.h"
 #include "display-panel.h"
+//#include "display/display.h"
 #include "display-backlight.h"
 
 #define AUL_APPSTATUS_PATH             "/Org/Tizen/Aul/AppStatus"
index 4223b2f..ad7c2f7 100644 (file)
@@ -24,7 +24,7 @@
 #include "shared/common.h"
 #include "device-interface.h"
 #include "poll.h"
-#include "display.h"
+//#include "display.h"
 #include "display-signal.h"
 #include "lock-detector.h"
 #include "display-lock.h"
index 7fd6d42..70eba16 100644 (file)
@@ -23,7 +23,7 @@
 #include <errno.h>
 #include "shared/common.h"
 #include "shared/devices.h"
-#include "display.h"
+//#include "display.h"
 
 struct display_ops {
        char *name;
@@ -59,6 +59,31 @@ const struct display_ops *find_display_feature(const char *name);
 
 #define DISPLAY_FUNC(a, b)     (((a) << 16) | (b))
 
+enum brightness_request_e {
+       BR_MIN = 0,
+       /* entering request */
+       BR_LBM_ON,
+       BR_HBM_ON,
+       BR_HOLD_BRIGHTNESS,
+       BR_LOWDIM_ON, /* low battery dim */
+
+       /* exiting request */
+       BR_LBM_OFF,
+       BR_HBM_OFF,
+       BR_RELEASE_BRIGHTNESS,
+       BR_LOWDIM_OFF, /* low battery dim off */
+
+       /* special */
+       BR_SET_BRIGHTNESS,
+
+       BR_MAX,
+};
+
+/* request for brightness that managed internally.
+ * BR_HOLD_BRIGHTNESS and BR_SET_BRIGHTNESS does not use this implicit brightness
+ * for request, but explicitly request for a brightness value */
+#define BR_IMPLICIT            (-1)
+
 struct display_plugin {
        void *handle;
        int (*pm_lock_internal) (pid_t pid, int s_bits, int flag, int timeout);
index be401df..f968332 100644 (file)
@@ -19,7 +19,7 @@
 #include "shared/log.h"
 #include "power/power-suspend.h"
 #include "ambient-mode.h"
-#include "display.h"
+//#include "display.h"
 #include "display-backlight.h"
 #include "display-dpms.h"
 #include "display-panel.h"
diff --git a/src/display/plugin-common/display.c b/src/display/plugin-common/display.c
deleted file mode 100644 (file)
index 977252a..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * deviced
- *
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-#include <stdio.h>
-#include <libsyscommon/list.h>
-#include <libsyscommon/ini-parser.h>
-
-#include "util.h"
-#include "core.h"
-#include "display-dpms.h"
-#include "display-ops.h"
-#include "dd-display.h"
-#include "shared/common.h"
-
-static int pm_cur_state;
-static int pm_old_state;
-static unsigned int pm_status_flag;
-static enum display_init_direction_e g_display_init_direction;
-static bool g_display_hal_backend_available;
-
-inline int get_pm_cur_state(void)
-{
-       return pm_cur_state;
-}
-
-inline void set_pm_cur_state(int cur_state)
-{
-       pm_cur_state = cur_state;
-}
-
-inline int get_pm_old_state(void)
-{
-       return pm_old_state;
-}
-
-inline void set_pm_old_state(int old_state)
-{
-       pm_old_state = old_state;
-}
-
-inline unsigned int get_pm_status_flag(void)
-{
-       return pm_status_flag;
-}
-
-inline void set_pm_status_flag(unsigned int status_flag)
-{
-       pm_status_flag |= status_flag;
-}
-
-inline void clear_pm_status_flag(unsigned int status_flag)
-{
-       pm_status_flag &= ~status_flag;
-}
-
-inline enum display_init_direction_e get_display_init_direction(void)
-{
-       return g_display_init_direction;
-}
-
-inline void set_display_init_direction(enum display_init_direction_e display_init_direction)
-{
-       g_display_init_direction = display_init_direction;
-}
-
-void lcd_direct_control(enum dpms_state state, int flags)
-{
-       const struct device_ops *ops = NULL;
-       GList *l = NULL;
-
-       switch (state) {
-       case DPMS_ON:
-               SYS_G_LIST_FOREACH(lcdon_ops, l, ops)
-                       ops->start(flags);
-               break;
-       case DPMS_OFF:
-               SYS_G_LIST_FOREACH(lcdon_ops, l, ops)
-                       ops->stop(flags);
-               break;
-       default:
-               _E("state is wrong value %d", state);
-               break;
-       }
-}
-
-/* FIXME: This function is for temporary use, should be fixed after plugin refactoring */
-void display_set_hal_backend_available(bool display_hal_backend_available)
-{
-       g_display_hal_backend_available = display_hal_backend_available;
-}
-
-/* FIXME: This function is for temporary use, should be fixed after plugin refactoring */
-bool display_is_hal_backend_available(void)
-{
-       return g_display_hal_backend_available;
-}