From: Youngjae Cho Date: Tue, 11 Jun 2024 04:02:02 +0000 (+0900) Subject: display: Remove setter for DEVICED_DISPLAY_ATTR_INT_DPMS_STATE X-Git-Tag: accepted/tizen/8.0/unified/20240618.013352~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=001bda7bd267d7d59226009c89060080b5d2d86e;p=platform%2Fcore%2Fsystem%2Fdeviced.git display: Remove setter for DEVICED_DISPLAY_ATTR_INT_DPMS_STATE The attribute setter is currently not being used. Moreover, controlling DPMS from plugin should be prevented as it could ignore and bypass internal state of the deviced. Only getter is allowed. Change-Id: Ib473744960c6b67b9a3f657fc240354d098d4f38 Signed-off-by: Youngjae Cho --- diff --git a/src/display/display-panel.c b/src/display/display-panel.c index 7868375e..60e2401b 100644 --- a/src/display/display-panel.c +++ b/src/display/display-panel.c @@ -176,10 +176,18 @@ int display_panel_set_panel_state_by_off_state(enum device_flags flags) _I("[DPMS XLIB Backlight] LCD off %#x cnt:%d", flags, cnt); cnt++; - if (flags & FORCE_OFF_MODE) - ret = display_panel_set_dpms_state(SYSCOMMON_DEVICED_DPMS_FORCE_OFF, flags); - else - ret = display_panel_set_dpms_state(SYSCOMMON_DEVICED_DPMS_OFF, flags); + /** + * FIXME: Currently no one can enter this condition. + * Temporarily disabled it and removed enum FORCE_OFF_MODE. + * Just comment out instead of removing it because the call DPMS + * for SYSCOMMON_DEVICED_DPMS_FORCE_OFF is still working and let + * it be helpful when recall how it was used. + * + * if (flags & FORCE_OFF_MODE) + * ret = display_panel_set_dpms_state(SYSCOMMON_DEVICED_DPMS_FORCE_OFF, flags); + * else + */ + ret = display_panel_set_dpms_state(SYSCOMMON_DEVICED_DPMS_OFF, flags); #ifdef ENABLE_PM_LOG enum syscommon_deviced_display_state current; diff --git a/src/display/resource-display.c b/src/display/resource-display.c index 72ee0f30..0fd3e7c5 100644 --- a/src/display/resource-display.c +++ b/src/display/resource-display.c @@ -76,24 +76,6 @@ static int set_display_attr_data(int resource_id, return -EINVAL; switch (attr->id) { - case DEVICED_DISPLAY_ATTR_INT_DPMS_STATE: - { - enum syscommon_deviced_dpms_state state = *(enum syscommon_deviced_dpms_state *) data; - - switch (state) { - case SYSCOMMON_DEVICED_DPMS_ON: - return display_panel_set_panel_state_by_on_state(0); - case SYSCOMMON_DEVICED_DPMS_STANDBY: - return display_panel_set_panel_state_by_standby_state(1); - case SYSCOMMON_DEVICED_DPMS_OFF: - return display_panel_set_panel_state_by_off_state(0); - case SYSCOMMON_DEVICED_DPMS_FORCE_OFF: - return display_panel_set_panel_state_by_off_state(FORCE_OFF_MODE); - default: - return 0; - } - } - break; case DEVICED_DISPLAY_ATTR_INT_CUSTOM_BRIGHTNESS: { bool on = *(bool *) data; @@ -437,7 +419,6 @@ static const struct syscommon_resman_resource_attribute display_attrs[] = { .type = SYSCOMMON_RESMAN_DATA_TYPE_INT, .flag = SYSCOMMON_RESMAN_RESOURCE_FLAG_PUBLIC, .ops = { - .set = set_display_attr_data, .get = get_display_attr_data, .is_supported = syscommon_resman_resource_attr_supported_always, }, diff --git a/src/shared/devices.h b/src/shared/devices.h index cee2456f..83763742 100644 --- a/src/shared/devices.h +++ b/src/shared/devices.h @@ -42,7 +42,6 @@ enum device_flags { NORMAL_MODE = 0x00000001, - FORCE_OFF_MODE = 0x00000004, TOUCH_SCREEN_OFF_MODE = 0x00002000, LCD_PANEL_OFF_MODE = 0x00004000, LCD_ON_BY_GESTURE = 0x00010000,