#include "power/power-doze.h"
#include "device-interface.h"
#include "display-plugin.h"
-#include "display-dpms.h"
#include "display-signal.h"
#include "display-lock.h"
#include "display-backlight.h"
_I("[lcdstep] 0x%lx", flags);
if (flags & AMBIENT_MODE) {
- if (ambient_get_state() == false && dpms_get_cached_state() == DPMS_ON)
+ if (ambient_get_state() == false && display_panel_get_dpms_cached_state() == DPMS_ON)
return;
ambient_set_state(false);
}
static inline bool check_lcd_is_on(void)
{
- if (dpms_get_cached_state() != DPMS_ON)
+ if (display_panel_get_dpms_cached_state() != DPMS_ON)
return false;
return true;
}
_I("custom lcd off by flag(%d)", flag);
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(flag);
if (set_custom_lcdon_timeout(0) == true)
}
_I("platform lcd off by %s", reason);
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(flag);
/* state transition */
default_proc_change_state_action(next, -1);
break;
case S_LCDOFF:
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(LCD_OFF_BY_EVENT);
if (set_custom_lcdon_timeout(0))
update_display_time();
if ((get_pm_old_state() != S_SLEEP) && (get_pm_old_state() != S_LCDOFF)) {
stop_lock_timer();
/* lcd off state : turn off the backlight */
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(LCD_OFF_BY_TIMEOUT);
}
- if (dpms_get_cached_state() == DPMS_ON
+ if (display_panel_get_dpms_cached_state() == DPMS_ON
|| lcd_paneloff_mode)
lcd_off_procedure(LCD_OFF_BY_TIMEOUT);
break;
if ((get_pm_old_state() != S_SLEEP) && (get_pm_old_state() != S_LCDOFF))
stop_lock_timer();
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(LCD_OFF_BY_TIMEOUT);
if (!pm_get_power_lock_support()) {
/* LCD on if lock screen show before waiting time */
if ((get_pm_cur_state() == S_NORMAL) &&
val == VCONFKEY_IDLE_LOCK &&
- dpms_get_cached_state() != DPMS_ON &&
+ display_panel_get_dpms_cached_state() != DPMS_ON &&
is_lcdon_blocked() == LCDON_BLOCK_NONE)
lcd_on_procedure(LCD_NORMAL, LCD_ON_BY_EVENT);
stop_lock_timer();
set_pm_status_flag(DIMSTAY_FLAG);
}
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
display_backlight_update_by_default_brightness();
return 0;
{
int timeout;
- if (!dpms_init())
+ if (!display_panel_init_dpms())
return G_SOURCE_CONTINUE;
switch (get_pm_cur_state()) {
{
guint id = g_timeout_add(500/* milliseconds */, delayed_dpms_init_done, NULL);
if (id == 0)
- _E("Failed to add dpms_init timeout.");
+ _E("Failed to add display_panel_init_dpms timeout.");
}
/**
check_seed_status();
/* In smd test, TSP should be turned off if display panel is not existed. */
- if (dpms_get_cached_state() == -ENOENT) {
+ if (display_panel_get_dpms_cached_state() == -ENOENT) {
_I("Display panel is not existed.");
lcd_direct_control(DPMS_OFF, NORMAL_MODE);
exit_lcd_operation();
* since display manager can be launched later than deviced.
* In the case, display cannot be turned on at the first booting */
// wm_ready = check_wm_ready();
- if (dpms_init()) {
+ if (display_panel_init_dpms()) {
if (is_lcdon_blocked() != LCDON_BLOCK_NONE)
lcd_off_procedure(LCD_OFF_BY_EVENT);
else
#include "device-interface.h"
#include "vconf.h"
#include "core.h"
-#include "display-dpms.h"
#include "display-lock.h"
#include "display-backlight.h"
#include "display-panel.h"
}
static struct display_backlight_ops backlight_ops = {
- .get_lcd_power = dpms_get_cached_state,
+ .get_lcd_power = display_panel_get_dpms_cached_state,
.set_brightness = NULL,
.get_brightness = NULL,
.transit_state = NULL,
display_backlight_update_by_default_brightness();
- dpms_exit();
+ display_panel_exit_dpms();
ops = find_device("touchscreen");
if (!check_default(ops))
#include "core.h"
#include "poll.h"
#include "display-actor.h"
+#include "display-panel.h"
#include "display-backlight.h"
#include "display-ops.h"
#include "display-config.h"
if (current_state_in_on())
return false;
- if (dpms_get_cached_state() == DPMS_ON) {
+ if (display_panel_get_dpms_cached_state() == DPMS_ON) {
if (ambient_get_state() == false)
return false;
}
if (!current_state_in_on())
return;
- if (dpms_get_cached_state() == DPMS_OFF)
+ if (display_panel_get_dpms_cached_state() == DPMS_OFF)
return;
broadcast_lcdoff_by_powerkey();
{
/* It's not needed if it's already LCD off state */
if (!current_state_in_on() &&
- dpms_get_cached_state() != DPMS_ON)
+ display_panel_get_dpms_cached_state() != DPMS_ON)
return false;
/*
#include "power/power-doze.h"
#include "device-interface.h"
#include "display-plugin.h"
-#include "display-dpms.h"
#include "proximity.h"
#include "display-info.h"
#include "display-signal.h"
_I("[lcdstep] 0x%lx", flags);
if (flags & AMBIENT_MODE) {
- if (ambient_get_state() == false && dpms_get_cached_state() == DPMS_ON)
+ if (ambient_get_state() == false && display_panel_get_dpms_cached_state() == DPMS_ON)
return;
ambient_set_state(false);
}
static inline bool check_lcd_is_on(void)
{
- if (dpms_get_cached_state() != DPMS_ON)
+ if (display_panel_get_dpms_cached_state() != DPMS_ON)
return false;
return true;
}
_I("custom lcd off by flag(%d)", flag);
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(flag);
if (set_custom_lcdon_timeout(0) == true)
}
_I("platform lcd off by %s", reason);
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(flag);
/* state transition */
default_proc_change_state_action(next, -1);
break;
case S_LCDOFF:
- if (dpms_get_cached_state() == DPMS_ON) {
+ if (display_panel_get_dpms_cached_state() == DPMS_ON) {
if (get_proximity_state() == SENSOR_PROXIMITY_NEAR)
lcd_off_procedure(LCD_OFF_BY_PROXIMITY);
else
if ((get_pm_old_state() != S_SLEEP) && (get_pm_old_state() != S_LCDOFF)) {
stop_lock_timer();
/* lcd off state : turn off the backlight */
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(LCD_OFF_BY_TIMEOUT);
}
- if (dpms_get_cached_state() == DPMS_ON
+ if (display_panel_get_dpms_cached_state() == DPMS_ON
|| lcd_paneloff_mode)
lcd_off_procedure(LCD_OFF_BY_TIMEOUT);
break;
if ((get_pm_old_state() != S_SLEEP) && (get_pm_old_state() != S_LCDOFF))
stop_lock_timer();
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(LCD_OFF_BY_TIMEOUT);
if (!pm_get_power_lock_support()) {
/* LCD on if lock screen show before waiting time */
if ((get_pm_cur_state() == S_NORMAL) &&
val == VCONFKEY_IDLE_LOCK &&
- dpms_get_cached_state() != DPMS_ON &&
+ display_panel_get_dpms_cached_state() != DPMS_ON &&
is_lcdon_blocked() == LCDON_BLOCK_NONE)
lcd_on_procedure(LCD_NORMAL, LCD_ON_BY_EVENT);
stop_lock_timer();
set_pm_status_flag(DIMSTAY_FLAG);
}
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
display_backlight_update_by_default_brightness();
return 0;
{
int timeout;
- if (!dpms_init())
+ if (!display_panel_init_dpms())
return G_SOURCE_CONTINUE;
switch (get_pm_cur_state()) {
{
guint id = g_timeout_add(500/* milliseconds */, delayed_dpms_init_done, NULL);
if (id == 0)
- _E("Failed to add dpms_init timeout.");
+ _E("Failed to add display_panel_init_dpms timeout.");
}
/**
check_seed_status();
/* In smd test, TSP should be turned off if display panel is not existed. */
- if (dpms_get_cached_state() == -ENOENT) {
+ if (display_panel_get_dpms_cached_state() == -ENOENT) {
_I("Display panel is not existed.");
lcd_direct_control(DPMS_OFF, NORMAL_MODE);
exit_lcd_operation();
* since display manager can be launched later than deviced.
* In the case, display cannot be turned on at the first booting */
// wm_ready = check_wm_ready();
- if (dpms_init()) {
+ if (display_panel_init_dpms()) {
if (is_lcdon_blocked() != LCDON_BLOCK_NONE)
lcd_off_procedure(LCD_OFF_BY_EVENT);
else
#include "device-interface.h"
#include "vconf.h"
#include "core.h"
-#include "display-dpms.h"
#include "display-lock.h"
#include "display-backlight.h"
#include "display-panel.h"
}
static struct display_backlight_ops backlight_ops = {
- .get_lcd_power = dpms_get_cached_state,
+ .get_lcd_power = display_panel_get_dpms_cached_state,
.set_brightness = NULL,
.get_brightness = NULL,
.transit_state = NULL,
display_backlight_update_by_default_brightness();
- dpms_exit();
+ display_panel_exit_dpms();
ops = find_device("touchscreen");
if (!check_default(ops))
#include "core.h"
#include "poll.h"
#include "display-actor.h"
+#include "display-panel.h"
#include "display-backlight.h"
#include "display-ops.h"
#include "display-config.h"
if (current_state_in_on())
return false;
- if (dpms_get_cached_state() == DPMS_ON) {
+ if (display_panel_get_dpms_cached_state() == DPMS_ON) {
if (ambient_get_state() == false)
return false;
}
if (!current_state_in_on())
return;
- if (dpms_get_cached_state() == DPMS_OFF)
+ if (display_panel_get_dpms_cached_state() == DPMS_OFF)
return;
broadcast_lcdoff_by_powerkey();
{
/* It's not needed if it's already LCD off state */
if (!current_state_in_on() &&
- dpms_get_cached_state() != DPMS_ON)
+ display_panel_get_dpms_cached_state() != DPMS_ON)
return false;
/*
if (current_state_in_on())
return false;
- if (dpms_get_cached_state() == DPMS_ON) {
+ if (display_panel_get_dpms_cached_state() == DPMS_ON) {
_W("display power was on");
return false;
}
return G_SOURCE_REMOVE;
displayon_by_powerkey_timeout_id = 0;
- if (dpms_get_cached_state() != DPMS_ON ||
+ if (display_panel_get_dpms_cached_state() != DPMS_ON ||
current_state_in_on() == false) {
broadcast_lcdon_by_powerkey();
lcd_on_direct(LCD_ON_BY_POWER_KEY);
ignore = true;
if (!displayon_by_powerkey_timeout_id &&
- dpms_get_cached_state() != DPMS_ON &&
+ display_panel_get_dpms_cached_state() != DPMS_ON &&
key_combination != COMBINATION_TORCH) {
displayon_by_powerkey_timeout_id = g_timeout_add(
100,
#include "power/power-doze.h"
#include "device-interface.h"
#include "display-plugin.h"
-#include "display-dpms.h"
#include "display-signal.h"
#include "display-lock.h"
#include "display-backlight.h"
_I("[lcdstep] 0x%lx", flags);
if (flags & AMBIENT_MODE) {
- if (ambient_get_state() == false && dpms_get_cached_state() == DPMS_ON)
+ if (ambient_get_state() == false && display_panel_get_dpms_cached_state() == DPMS_ON)
return;
ambient_set_state(false);
}
static inline bool check_lcd_is_on(void)
{
- if (dpms_get_cached_state() != DPMS_ON)
+ if (display_panel_get_dpms_cached_state() != DPMS_ON)
return false;
return true;
}
_I("custom lcd off by flag(%d)", flag);
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(flag);
if (set_custom_lcdon_timeout(0) == true)
}
_I("platform lcd off by %s", reason);
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(flag);
/* state transition */
default_proc_change_state_action(next, -1);
break;
case S_LCDOFF:
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(LCD_OFF_BY_EVENT);
if (set_custom_lcdon_timeout(0))
update_display_time();
if ((get_pm_old_state() != S_SLEEP) && (get_pm_old_state() != S_LCDOFF)) {
stop_lock_timer();
/* lcd off state : turn off the backlight */
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(LCD_OFF_BY_TIMEOUT);
}
- if (dpms_get_cached_state() == DPMS_ON
+ if (display_panel_get_dpms_cached_state() == DPMS_ON
|| lcd_paneloff_mode)
lcd_off_procedure(LCD_OFF_BY_TIMEOUT);
break;
if ((get_pm_old_state() != S_SLEEP) && (get_pm_old_state() != S_LCDOFF))
stop_lock_timer();
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(LCD_OFF_BY_TIMEOUT);
if (!pm_get_power_lock_support()) {
/* LCD on if lock screen show before waiting time */
if ((get_pm_cur_state() == S_NORMAL) &&
val == VCONFKEY_IDLE_LOCK &&
- dpms_get_cached_state() != DPMS_ON &&
+ display_panel_get_dpms_cached_state() != DPMS_ON &&
is_lcdon_blocked() == LCDON_BLOCK_NONE)
lcd_on_procedure(LCD_NORMAL, LCD_ON_BY_EVENT);
stop_lock_timer();
set_pm_status_flag(DIMSTAY_FLAG);
}
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
display_backlight_update_by_default_brightness();
return 0;
{
int timeout;
- if (!dpms_init())
+ if (!display_panel_init_dpms())
return G_SOURCE_CONTINUE;
switch (get_pm_cur_state()) {
{
guint id = g_timeout_add(500/* milliseconds */, delayed_dpms_init_done, NULL);
if (id == 0)
- _E("Failed to add dpms_init timeout.");
+ _E("Failed to add display_panel_init_dpms timeout.");
}
/**
check_seed_status();
/* In smd test, TSP should be turned off if display panel is not existed. */
- if (dpms_get_cached_state() == -ENOENT) {
+ if (display_panel_get_dpms_cached_state() == -ENOENT) {
_I("Display panel is not existed.");
lcd_direct_control(DPMS_OFF, NORMAL_MODE);
exit_lcd_operation();
* since display manager can be launched later than deviced.
* In the case, display cannot be turned on at the first booting */
// wm_ready = check_wm_ready();
- if (dpms_init()) {
+ if (display_panel_init_dpms()) {
if (is_lcdon_blocked() != LCDON_BLOCK_NONE)
lcd_off_procedure(LCD_OFF_BY_EVENT);
else
#include "device-interface.h"
#include "vconf.h"
#include "core.h"
-#include "display-dpms.h"
#include "display-panel.h"
#include "display-backlight.h"
#include "power/power-suspend.h"
}
static struct display_backlight_ops backlight_ops = {
- .get_lcd_power = dpms_get_cached_state,
+ .get_lcd_power = display_panel_get_dpms_cached_state,
.set_brightness = NULL,
.get_brightness = NULL,
.transit_state = NULL,
display_backlight_update_by_default_brightness();
- dpms_exit();
+ display_panel_exit_dpms();
ops = find_device("touchscreen");
if (!check_default(ops))
#include "core.h"
#include "poll.h"
#include "display-actor.h"
+#include "display-panel.h"
#include "display-backlight.h"
#include "display-ops.h"
#include "display-config.h"
if (current_state_in_on())
return false;
- if (dpms_get_cached_state() == DPMS_ON) {
+ if (display_panel_get_dpms_cached_state() == DPMS_ON) {
if (ambient_get_state() == false)
return false;
}
if (!current_state_in_on())
return;
- if (dpms_get_cached_state() == DPMS_OFF)
+ if (display_panel_get_dpms_cached_state() == DPMS_OFF)
return;
broadcast_lcdoff_by_powerkey();
{
/* It's not needed if it's already LCD off state */
if (!current_state_in_on() &&
- dpms_get_cached_state() != DPMS_ON)
+ display_panel_get_dpms_cached_state() != DPMS_ON)
return false;
/*
#include "power/power-doze.h"
#include "device-interface.h"
#include "display-plugin.h"
-#include "display-dpms.h"
#include "display-info.h"
#include "battery-monitor.h"
#include "display-signal.h"
_I("[lcdstep] 0x%lx", flags);
if (flags & AMBIENT_MODE) {
- if (ambient_get_state() == false && dpms_get_cached_state() == DPMS_ON)
+ if (ambient_get_state() == false && display_panel_get_dpms_cached_state() == DPMS_ON)
return;
ambient_set_state(false);
}
static inline bool check_lcd_is_on(void)
{
- if (dpms_get_cached_state() != DPMS_ON)
+ if (display_panel_get_dpms_cached_state() != DPMS_ON)
return false;
return true;
}
_I("custom lcd off by flag(%d)", flag);
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(flag);
if (set_custom_lcdon_timeout(0) == true)
}
_I("platform lcd off by %s", reason);
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(flag);
/* state transition */
default_proc_change_state_action(next, -1);
break;
case S_LCDOFF:
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(LCD_OFF_BY_EVENT);
if (set_custom_lcdon_timeout(0))
update_display_time();
if ((get_pm_old_state() != S_SLEEP) && (get_pm_old_state() != S_LCDOFF)) {
stop_lock_timer();
/* lcd off state : turn off the backlight */
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(LCD_OFF_BY_TIMEOUT);
}
- if (dpms_get_cached_state() == DPMS_ON
+ if (display_panel_get_dpms_cached_state() == DPMS_ON
|| lcd_paneloff_mode)
lcd_off_procedure(LCD_OFF_BY_TIMEOUT);
break;
if ((get_pm_old_state() != S_SLEEP) && (get_pm_old_state() != S_LCDOFF))
stop_lock_timer();
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(LCD_OFF_BY_TIMEOUT);
if (!pm_get_power_lock_support()) {
/* LCD on if lock screen show before waiting time */
if ((get_pm_cur_state() == S_NORMAL) &&
val == VCONFKEY_IDLE_LOCK &&
- dpms_get_cached_state() != DPMS_ON &&
+ display_panel_get_dpms_cached_state() != DPMS_ON &&
is_lcdon_blocked() == LCDON_BLOCK_NONE)
lcd_on_procedure(LCD_NORMAL, LCD_ON_BY_EVENT);
stop_lock_timer();
if (health == HEALTH_GOOD) {
clear_pm_status_flag(BATTERY_FLAG);
clear_pm_status_flag(DIMSTAY_FLAG);
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
auto_brightness_restore();
} else if (health == HEALTH_LOW || health == HEALTH_HIGH || health == HEALTH_OVP) {
set_pm_status_flag(BATTERY_FLAG);
set_pm_status_flag(DIMSTAY_FLAG);
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
display_backlight_update_by_default_brightness();
}
{
int timeout;
- if (!dpms_init())
+ if (!display_panel_init_dpms())
return G_SOURCE_CONTINUE;
switch (get_pm_cur_state()) {
{
guint id = g_timeout_add(500/* milliseconds */, delayed_dpms_init_done, NULL);
if (id == 0)
- _E("Failed to add dpms_init timeout.");
+ _E("Failed to add display_panel_init_dpms timeout.");
}
/**
check_seed_status();
/* In smd test, TSP should be turned off if display panel is not existed. */
- if (dpms_get_cached_state() == -ENOENT) {
+ if (display_panel_get_dpms_cached_state() == -ENOENT) {
_I("Display panel is not existed.");
lcd_direct_control(DPMS_OFF, NORMAL_MODE);
exit_lcd_operation();
* since display manager can be launched later than deviced.
* In the case, display cannot be turned on at the first booting */
// wm_ready = check_wm_ready();
- if (dpms_init()) {
+ if (display_panel_init_dpms()) {
if (is_lcdon_blocked() != LCDON_BLOCK_NONE)
lcd_off_procedure(LCD_OFF_BY_EVENT);
else
#include "device-interface.h"
#include "vconf.h"
#include "core.h"
-#include "display-dpms.h"
#include "display-lock.h"
#include "display-backlight.h"
#include "display-panel.h"
}
static struct display_backlight_ops backlight_ops = {
- .get_lcd_power = dpms_get_cached_state,
+ .get_lcd_power = display_panel_get_dpms_cached_state,
.set_brightness = set_brightness,
.get_brightness = NULL,
.transit_state = backlight_transit_state,
int is_lcdon_blocked(void)
{
- int state = dpms_get_cached_state();
+ int state = display_panel_get_dpms_cached_state();
if ((state == DPMS_DETACH) || (state == -EINVAL))
return LCDON_BLOCK_WHEN_DISPLAY_DETACHED;
display_backlight_update_by_default_brightness();
- dpms_exit();
+ display_panel_exit_dpms();
ops = find_device("touchscreen");
if (!check_default(ops))
#include "shared/common.h"
#include "shared/devices.h"
#include "display-actor.h"
+#include "display-panel.h"
#include "display-backlight.h"
#include "display-ops.h"
#include "display-info.h"
autobrt_timer = 0;
/* If it is still not turned on, do not apply auto brightness */
- if (dpms_get_cached_state() != DPMS_ON)
+ if (display_panel_get_dpms_cached_state() != DPMS_ON)
return G_SOURCE_REMOVE;
display_backlight_change_brightness_by_dpms_state(DPMS_ON);
#include "util.h"
#include "core.h"
#include "display-ops.h"
-#include "display-dpms.h"
+#include "display-panel.h"
#include "shared/common.h"
#include "shared/device-notifier.h"
register_notifier(DEVICE_NOTIFIER_LCD, display_state_changed);
/* double check to guarantee HBMOFF before DPMS OFF */
- register_dpms_checklist(DPMS_OFF, dpms_check_hbm_off);
+ display_panel_register_dpms_checklist(DPMS_OFF, dpms_check_hbm_off);
}
static void hbm_exit(void *data)
#include "poll.h"
#include "display-actor.h"
#include "display-ops.h"
+#include "display-panel.h"
#include "display-backlight.h"
#include "display-config.h"
#include "shared/common.h"
if (current_state_in_on())
return false;
- if (dpms_get_cached_state() == DPMS_ON) {
+ if (display_panel_get_dpms_cached_state() == DPMS_ON) {
if (ambient_get_state() == false)
return false;
}
if (!current_state_in_on())
return;
- if (dpms_get_cached_state() == DPMS_OFF)
+ if (display_panel_get_dpms_cached_state() == DPMS_OFF)
return;
broadcast_lcdoff_by_powerkey();
{
/* It's not needed if it's already LCD off state */
if (!current_state_in_on() &&
- dpms_get_cached_state() != DPMS_ON)
+ display_panel_get_dpms_cached_state() != DPMS_ON)
return false;
/*
#include "core.h"
#include "util.h"
#include "display-ops.h"
+#include "display-panel.h"
#include "shared/plugin.h"
#include <libsyscommon/libgdbus.h>
_I("Request swim mode state %d by %d", val, pid);
- if (dpms_get_cached_state() != DPMS_ON) {
+ if (display_panel_get_dpms_cached_state() != DPMS_ON) {
if (disp_plgn->pm_change_internal)
disp_plgn->pm_change_internal(INTERNAL_LOCK_SWIM, S_NORMAL);
lcd_state = true;
#include "core.h"
#include "display.h"
#include "display-backlight.h"
-#include "display-dpms.h"
+#include "display-panel.h"
#include "display-plugin.h"
#define DUMP_MODE_WAITING_TIME 600000 /* milisecond */
#ifndef __DISPLAY_BACKLIGHT_H__
#define __DISPLAY_BACKLIGHT_H__
-#include "display-dpms.h"
+#include "display-panel.h"
struct display_backlight_ops {
int (*get_lcd_power)(void);
#include <stdbool.h>
#include <libsyscommon/ini-parser.h>
-#include "display-dpms.h"
+#include "display-panel.h"
#include "display.h"
#include "deviced/dd-display.h"
#define __DISPLAY_CONFIG_H__
#include <stdbool.h>
-#include "display-dpms.h"
+#include "display-panel.h"
#define DISPLAY_CONF_FILE "/etc/deviced/display.conf"
/*
checker();
}
-void __register_dpms_checklist(int mode, void (*checker)(void), const char *caller)
+DD_INTERNAL
+void register_dpms_checklist(int mode, void (*checker)(void), const char *caller)
{
if (!checker)
return;
static bool none_dpms_init(void) { return true; }
static void none_dpms_exit(void) {}
+DD_INTERNAL
void dpms_set_state(int on)
{
if (g_dpms_ops.set_state)
g_dpms_ops.set_state(on);
}
+DD_INTERNAL
int dpms_get_state(void)
{
if (g_dpms_ops.get_state)
return -EINVAL;
}
+DD_INTERNAL
int dpms_get_cached_state(void)
{
if (g_dpms_ops.get_cached_state)
return -EINVAL;
}
+DD_INTERNAL
bool dpms_init(void)
{
if (!g_display_plugin.config) {
return false;
}
+DD_INTERNAL
void dpms_exit(void)
{
if (g_dpms_ops.exit)
int dpms_get_cached_state(void);
bool dpms_init(void);
void dpms_exit(void);
-void __register_dpms_checklist(int mode, void (*checker)(void), const char *caller);
-#define register_dpms_checklist(mode, checker) __register_dpms_checklist(mode, checker, __func__)
+void register_dpms_checklist(int mode, void (*checker)(void), const char *caller);
#endif /* __DISPLAY_DPMS_H__ */
#include "shared/log.h"
#include "power/power-suspend.h"
#include "ambient-mode.h"
-//#include "display.h"
#include "display-backlight.h"
-#include "display-dpms.h"
#include "display-panel.h"
#define MAX_WHITE_BALANCE_GAIN 2047
}
}
+int display_panel_get_dpms_cached_state(void)
+{
+ return dpms_get_cached_state();
+}
+
+bool display_panel_init_dpms(void)
+{
+ return dpms_init();
+}
+
+void display_panel_exit_dpms(void)
+{
+ dpms_exit();
+}
+
+void __display_panel_register_dpms_checklist(int mode, void (*checker)(void), const char *caller)
+{
+ register_dpms_checklist(mode, checker, caller);
+}
+
/* FIXME: This function is used for only wearable profile, should be fixed after plugin refactoring */
int display_panel_set_image_effect(enum display_image_effect effect)
{
#include <hal/device/hal-display.h>
+#include "display-dpms.h"
#include "shared/devices.h"
int display_panel_set_dpms_state(int dpms_on, enum device_flags flags);
int display_panel_set_frame_rate(int frame_rate);
int display_panel_get_frame_rate(int *frame_rate);
int display_panel_get_dpms_state(void);
+
+int display_panel_get_dpms_cached_state(void);
+bool display_panel_init_dpms(void);
+void display_panel_exit_dpms(void);
+void __display_panel_register_dpms_checklist(int mode, void (*checker)(void), const char *caller);
+#define display_panel_register_dpms_checklist(mode, checker) __display_panel_register_dpms_checklist(mode, checker, __func__)
+
void display_panel_set_dpms_running_state(int val);
-#endif /* __DISPLAY_PANEL_H__ */
\ No newline at end of file
+#endif /* __DISPLAY_PANEL_H__ */
#define __DISPLAY_H__
#include <stdbool.h>
-#include "display-dpms.h"
+#include "display-panel.h"
#include "shared/devices.h"
#define VCALL_FLAG 0x00000001
val = vconf_keynode_get_bool(key_nodes);
if (val != ambient_condition) {
- if (dpms_get_cached_state() != DPMS_ON)
+ if (display_panel_get_dpms_cached_state() != DPMS_ON)
if (disp_plgn->pm_lock_internal)
disp_plgn->pm_change_internal(INTERNAL_LOCK_PM, LCD_NORMAL);
}
if (is_emulator()) {
/* In emulator, deviced does not turn off the display. */
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
return;
}
#include "poll.h"
#include "device-interface.h"
#include "setting.h"
-#include "display-dpms.h"
#include "display.h"
#include "display-config.h"
#include "display-signal.h"
#include "lock-detector.h"
#include "display-lock.h"
+#include "display-panel.h"
#include "display-config.h"
#include "shared/log-macro.h"
#include "shared/apps.h"
state = node->state;
pid = node->pid;
- if (state == S_LCDOFF && dpms_get_cached_state() == DPMS_ON) {
+ if (state == S_LCDOFF && display_panel_get_dpms_cached_state() == DPMS_ON) {
_D("Lcd state is PM_LCD_POWER_ON");
return G_SOURCE_CONTINUE;
}
#include "shared/device-notifier.h"
#include "shared/time.h"
#include "vconf.h"
-#include "display-dpms.h"
#include "display.h"
#include "power.h"
#include "power-boot.h"
#define API __attribute__ ((visibility("default")))
#endif
+#ifndef DD_INTERNAL
+#define DD_INTERNAL __attribute__ ((visibility("hidden")))
+#endif
+
#ifndef DEPRECATED
#define DEPRECATED __attribute__ ((deprecated))
#endif
#include "battery/power-supply.h"
#include "core.h"
#include "display-ops.h"
+#include "display-panel.h"
#include "display-plugin.h"
#include "display-config.h"
#include "power/power-boot.h"
g_display_plugin.config->touch_wakeup = vconf_keynode_get_bool(key);
- /**
- * FIXME: display_plugin_backlight_get_lcd_power() should be changed to
- * dpms_get_cached_state() function.
- * After deviding src/display module and plugin display module from build.
- */
- if (display_plugin_backlight_get_lcd_power() != DPMS_ON) {
+ if (display_panel_get_dpms_cached_state() != DPMS_ON) {
if (g_display_plugin.config->touch_wakeup)
touchscreen_start(NORMAL_MODE);
else
static int touchscreen_start(enum device_flags flags)
{
- int state, ret;
+ int state = -1;
+ int ret;
if (touchscreen_enable != DEVICE_OPS_STATUS_START)
return 0;
*/
ret = touchscreen_set_state(TOUCHSCREEN_ON);
- state = -1;
- /**
- * FIXME: display_plugin_backlight_get_lcd_power() should be changed to
- * dpms_get_cached_state() function.
- * After deviding src/display module and plugin display module from build.
- */
- state = display_plugin_backlight_get_lcd_power();
+ state = display_panel_get_dpms_cached_state();
if (state == DPMS_OFF)
touchscreen_powersaving(POWERSAVING_ON);