taemin.yeom [Fri, 5 Mar 2021 09:31:25 +0000 (18:31 +0900)]
Apply libsyscommon gdbus api improvement on error handling
Change-Id: I2d6eb4e2ada9b15aa058c8691ff4cc576cd19738
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
Hyotaek Shim [Thu, 25 Feb 2021 03:53:32 +0000 (12:53 +0900)]
Do not call hal_device_led_put_backend()
Deviced does not repeat loading/unloading plugin modules during runtime.
So, dlopen() is not required, and rather it will cause race condition during exit.
Change-Id: Ice5a4bbdda8afb38e7631d025f682fbc2f85d8fb
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
lokilee73 [Wed, 17 Feb 2021 07:28:21 +0000 (16:28 +0900)]
Check display feature for iot headless
Change-Id: Ib63e628eaf1df39d2bd1a44f36385f22e1a30ff1
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
INSUN PYO [Wed, 17 Feb 2021 04:36:40 +0000 (13:36 +0900)]
Use mtp-responder-dummy.socket when there is no mtp-responser.socket
The mtp-responder.socket is special in the configfs environment.
If mtp-responder.socket is missing, gadget configuration will fail.
As a result, all usb operations do not work properly.
So in environments that mtp doesn't support, use dummy mtp.
Applied target : RPI TV, RPI headless(32/64)
Change-Id: Ie945b8ecc40ea669c8d2ca7a703e52721775a5a6
lokilee73 [Tue, 9 Feb 2021 01:06:05 +0000 (10:06 +0900)]
Fix svace
Change-Id: I1dd3b6f4258a13a0bba0109cc018a7d8e5602965
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Fri, 5 Feb 2021 09:56:21 +0000 (18:56 +0900)]
Use libsyscommon for ini-parser
Change-Id: I77f3d1f6cefda2f883e88adbe2895492b95a1fad
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Fri, 5 Feb 2021 01:05:05 +0000 (10:05 +0900)]
Change dbus method name for pass SetScenario
Change-Id: I68a8762f7ba9b947cd77b672c73d306233cfa8f1
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Wed, 3 Feb 2021 07:37:18 +0000 (16:37 +0900)]
pmqos: apply next HAL architecture (hal api + backend)
Change-Id: I67a2715d99493d40575d2e9b6428feabb9cc94e3
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Mon, 1 Feb 2021 04:14:18 +0000 (13:14 +0900)]
Ir : Apply next HAL architecture (hal api + backend)
Change-Id: I92f488f273a1afdf8696c86c312c0a3a3edf6dcc
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Tue, 12 Jan 2021 00:54:42 +0000 (09:54 +0900)]
Apply next HAL architecture (hal api + backend)
Change-Id: I0d11e7e89a83846bbb7ab93b17cd3dc066e911e3
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Youngjae Cho [Wed, 6 Jan 2021 08:14:04 +0000 (17:14 +0900)]
Use list of libsyscommon
Change-Id: Icf0ebaa385aa4e0f99bb8c17ffc872b946dbe8c9
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Thu, 7 Jan 2021 05:37:39 +0000 (14:37 +0900)]
Apply screen timeout for iot
Change-Id: I6e3597d513616d3d269f6c1a96fe18571fb7e201
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
lokilee73 [Mon, 21 Dec 2020 05:38:17 +0000 (14:38 +0900)]
Remove touch key/led
Touch key/led is not supported on wearable target.
Change-Id: I521c0e5cdc77a1c29d95dbd1bd339b7a8a17ca96
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Mon, 21 Dec 2020 04:07:04 +0000 (13:07 +0900)]
Remove unnecessary dependency
The xattr syscalls are provided by glibc since ages.
So, there is no need to have dependency with libattr-devel
Change-Id: Id2eaf0db2859b48c09e81f87427622f472cc02ad
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Mon, 21 Dec 2020 01:33:14 +0000 (10:33 +0900)]
Fix build error
[ 220s] /home/abuild/rpmbuild/BUILD/deviced-10.0.0/src/tzip/tzip.c:35:10: fatal error: attr/xattr.h: No such file or directory
[ 220s] 35 | #include <attr/xattr.h>
Change-Id: I2d753bcedb29f252e8789de0a8203bbdd72592fd
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Wed, 16 Dec 2020 06:39:24 +0000 (15:39 +0900)]
Add null checking code after add_node
Change-Id: Ia8a18630551d988e01a90e3158ba4d42b183b4f9
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Tue, 15 Dec 2020 11:16:43 +0000 (20:16 +0900)]
Remove duplicated function call in default_trans
check_processes is already called via default_check.
ex) default_check -> makeup_trans_condition -> check_processes
Change-Id: Ie867584ce8c3571fbd2c424ea1a715201864d8ad
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Tue, 15 Dec 2020 06:34:39 +0000 (15:34 +0900)]
Fix typo
Change-Id: I989aa70be85a684d789b042817871b786712d83e
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Hyotaek Shim [Fri, 11 Dec 2020 01:06:33 +0000 (10:06 +0900)]
Rearrange device_notify(DEVICE_NOTIFIER_LCD_OFF, ..)
And remove ambient_set_state() for other profiles except wearable
device_notify(LCD_OFF) is triggered after ambient_set and LCD_OFF_PRE.
Change-Id: I04c4608334a9627b0804f796056aa84dba5b567e
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Youngjae Cho [Tue, 15 Dec 2020 05:52:48 +0000 (14:52 +0900)]
Check state trans condition strictly when lock expired
Change-Id: I9090937aeaa31817228127d199b710871c166585
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Mon, 14 Dec 2020 06:31:59 +0000 (15:31 +0900)]
Fix infinite recursive call for AOD corner case
The subroutine triggered by lcd_off_procedure() could lead infinite
recursive call. This can happen when the lcd_off_procedure() do not
serve actual DPMS_OFF, remaining display state as DPMS_ON even after
the call.
One of the case is when the clockend signal arrives late. In this
situation, deviced forces to set ambient_state as false, but actual node
of lcd power remains ON. This combination of two state* makes deviced
perceive dpms state as DPMS_ON. As a result, lcd_off_procedure() has
been processed, but deviced still recognize dpms state as DPMS_ON,
triggering recursive call for lcd_off_procedure() to turning off display.
[*] ambient_state=>false && lcd node=>ON
Possible callstack of recursive call
del_state_cond
-> default_trans
-> default_action
-> lcd_off_procedure**
-> ambient_set_state(true)
-> pm_lock_internal
-> proc_condition
-> proc_condition_lock
-> proc_change_state
-> lcd_off_procedure [repeat **]
To fix this, leave ambient_state as it is when clockend arrival is
delayed. This makes deviced perceive DPMS state as DPMS_OFF, and it
won't trigger lcd_off_procedure().
Change-Id: I14ccca1ba7718975752389cd409a775fbfe80ada
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
lokilee73 [Fri, 4 Dec 2020 05:53:46 +0000 (14:53 +0900)]
Fix typo
Change-Id: I16ff0cf0d03650cdfc909906c9b3e7f959dd6f03
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Thu, 3 Dec 2020 08:00:46 +0000 (17:00 +0900)]
Remove unused function low-power
low-power.c is not used and duplicated with powersaver.c
Change-Id: I8e93891c41d83710d26e6d4ecbc2c9a5a77bc7bd
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
INSUN PYO [Fri, 27 Nov 2020 10:06:00 +0000 (19:06 +0900)]
usb: change usb initialization - skip usb hal operation when usb is disconnected.
If USB is initialized without a USB connection, only initialize the internal usb state and skip usb hal operation.
To support sdb over BT, sdbd.service should start automatically at boot time.
If usb cable is not connected, usb hal stops sdbd.service when initializing usb.
Change-Id: I936d0a62b5d3a0e8229ff02760e1a6d23081a003
Youngjae Cho [Tue, 24 Nov 2020 04:59:59 +0000 (13:59 +0900)]
Make critical-log configurable
Change-Id: I67eb3788a78f5ce02dacb85f8c3398d5f54fd947
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Tue, 10 Nov 2020 09:22:45 +0000 (18:22 +0900)]
Manage application state: foreground, background, terminated
Foreground / Background
An application's lock is managed more strictly from the point when the
application requires it. Now determine the memeber variable 'background'
of PmLockNode based on the application's fg/bg state when adding lock
as a new PmLockNode.
Terminated
When an application is terminated without releasing lock, deviced unlocks
it right away. At the same time, deviced decides whether to change state
or not. At before, for this situation, it was responsible
for pmlock_check() to release lingering lock of terminated application.
Change-Id: I70e66b69a5f3cdbfa54a2deb2e53ddf15d5456e1
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Youngjae Cho [Mon, 9 Nov 2020 06:48:21 +0000 (15:48 +0900)]
Add bitmap functions
Change-Id: I8c39533fa77e6830881062b525b72eec3386342e
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Hyotaek Shim [Tue, 3 Nov 2020 01:15:46 +0000 (01:15 +0000)]
Merge "power: Print warning when `exit' is requested" into tizen
Karol Lewandowski [Fri, 23 Oct 2020 11:08:28 +0000 (13:08 +0200)]
power: Print warning when `exit' is requested
Change-Id: If73feb43cc7c4322fc8aa9d53c8397e2d76ca3d3
Karol Lewandowski [Mon, 26 Oct 2020 14:33:52 +0000 (15:33 +0100)]
packaging: Align alternatives setup with fedora-recommended scheme
Change-Id: I707e0a565322a97c23ce19ec3f5e9dd6aa7b5e8a
Michal Bloch [Mon, 2 Nov 2020 14:21:26 +0000 (14:21 +0000)]
Merge "Implement shutdown et al. using deviced DBus interface" into tizen
Mateusz Majewski [Thu, 17 Sep 2020 11:24:07 +0000 (13:24 +0200)]
Implement shutdown et al. using deviced DBus interface
Change-Id: Idf7cd364bedf7dfcd7024ece67b360745343b984
Co-authored-by: Michal Bloch <m.bloch@samsung.com>
lokilee73 [Thu, 29 Oct 2020 08:24:40 +0000 (17:24 +0900)]
Fix wrong condition for halt
halt and poweroff are different command.
exit is the same as halt.
So, change condition.
Change-Id: I837260224d8fe10907f89f435774c8c7d4e46758
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Youngjae Cho [Tue, 27 Oct 2020 06:05:03 +0000 (15:05 +0900)]
Rearrange PWROFF_FLAG flag setting
Set PWROFF_FLAG when the poweroff enters POWEROFF_TRIGGERED stage.
Change-Id: I4129f654792e6ad090774cbc46e0f5a64692e64a
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
lokilee73 [Tue, 27 Oct 2020 02:29:56 +0000 (11:29 +0900)]
Add comments for DEVICE_NOTIFIER_POWEROFF
Change-Id: If4f2dbcbc66a6579612016b16207339bfe14a37b
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Youngjae Cho [Mon, 26 Oct 2020 06:10:10 +0000 (15:10 +0900)]
Fix restart option to on-failure
This prevents restarting deviced when the deviced is returning main()
through poweroff sequence.
Change-Id: Icbb4a8c306721a1613c04d41060fbbd323c5e62b
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
lokilee73 [Tue, 13 Oct 2020 07:02:06 +0000 (16:02 +0900)]
Skip running animation if option is silent
Change-Id: Iaccd10955d02a129ad352b0a13192ed47042ffa9
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
(cherry picked from commit
ca9d81149e324e49efc033810b25ce787f7c4c00)
Youngjae Cho [Mon, 14 Sep 2020 02:49:48 +0000 (11:49 +0900)]
Use definitions of libsyscommon instead of device api
device api now uses libsyscommon library for dbus communication.
To get in line with this change, Deviced is required to use the
callback function of libsyscommon instead of that of api/device.
Change-Id: I5c8f8025ba215ec2fb9a6722ee66ca4b2d8fbea2
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Tue, 13 Oct 2020 03:28:30 +0000 (12:28 +0900)]
Apply dpms cache globally
Existing get_lcd_power() accesses to node directly, but it now uses
dpms_get_cached_state() instead. Accessing to the node is separated
into another function, get_lcd_power_node().
Change-Id: Ic05ce15d0fd1ec603c88db470144631a7e1b3ebd
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Mon, 12 Oct 2020 05:33:32 +0000 (14:33 +0900)]
Fix dbus call of default_pmlock_check()
For non-killable daemons, the return of resourced's CheckAppStatus
is always ignored. Therefore, fix not to call CheckAppStatus when
the pmlock_check is checking non-killable daemon, not app.
Change-Id: Ifeef32754c9d94a18ad302b97927407de91b83d8
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Youngjae Cho [Mon, 5 Oct 2020 08:09:04 +0000 (17:09 +0900)]
Adopt a dpms cache
In the previos structure, deviced sets dpms through Enlightenment,
whereas gets dpms by reading the lcd power node directly. There is
a possibility of a miasmatch between the actual dpms state and the
lcd power node. The cached dpms value is alternatively used for
this situation in replacement of the get_lcd_power().
Change-Id: Id0144cd76cb017694198856f6b40ff7162b61e64
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Thu, 8 Oct 2020 08:18:22 +0000 (17:18 +0900)]
silent reboot: Fix initial DPMS contol
For silent reboot, don't do DPMS_ON, which was done at the
end of init_dpms().
Change-Id: I3692503aa1b7a10085dcc19408148be440f382f7
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Hyotaek Shim [Wed, 7 Oct 2020 06:39:48 +0000 (15:39 +0900)]
Add get_lcd_power_node() for direct accessing the lcd power node
Change-Id: Id47db38af56b2f6b6e4be0e6b46acf79b0564d75
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
lokilee73 [Tue, 6 Oct 2020 11:33:36 +0000 (20:33 +0900)]
Do not handle LCD DIM, when display.Dimming is 0
LCD DIM is not supported in dbus_changestate.
Change-Id: Ie6d1ca66dcf5770492df3331fb71802a089df1af
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Mon, 5 Oct 2020 11:30:36 +0000 (20:30 +0900)]
Fix compile error
display_conf->Dimming can be obtained via get_var_display_config()
Change-Id: I846084962769e2b2e6846552f8724b6bd6d221d5
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Mon, 5 Oct 2020 05:03:18 +0000 (14:03 +0900)]
Do not handle LCD DIM, when display.Dimming is 0
LCD DIM lock/unlock is not supported in
dbus_lockstate and dbus_unlockstate.
Change-Id: I51e913b66adf55bb78124185ae5aca19b46ce1a2
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
(cherry picked from commit
8dbf5cc61905833fed475ef0f3bc720ffe0ddc07)
lokilee73 [Tue, 29 Sep 2020 07:59:38 +0000 (16:59 +0900)]
Add S_LCDDIM in process_background and process_foreground
S_NORMAL is affected by signal, AppStatusChange.
ex) lock status of process with the signal
node->background: true, LOCK is ignored
node->background: false, LOCK is valid
Add S_LCDDIM to make it controlled by AppStatusChange as well.
Change-Id: I4f97a07c39bc58c8599a8dae68601849bff12791
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Mon, 21 Sep 2020 11:55:01 +0000 (20:55 +0900)]
Add logs to get pid information for below functions.
ex) dbus_changestatebyreason
dbus_customlcdon
dbus_customlcdoff
dbus_setbrightness
dbus_holdbrightness
dbus_releasebrightness
dbus_lcdpaneloffmode
dbus_dimstay_control
dbus_staytouchscreenoff
Change-Id: I3e692a5b2a407df04ec6e9aeab2f596b88fb7590
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Wed, 16 Sep 2020 11:16:20 +0000 (20:16 +0900)]
Remove unused function ciritical_log
ex) CRITICAL_LOG is used instead of critical_log
Change-Id: Ib47f59e9d3425cd877f978286c4da3501bdb4866
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Tue, 15 Sep 2020 09:52:18 +0000 (18:52 +0900)]
Deduplicate below functions
ex) update_lock_timer
process_background
process_foreground
Change-Id: I396f02f04943a27134c6b7a708f65d386c97edec
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Yunmi Ha [Mon, 14 Sep 2020 07:11:28 +0000 (16:11 +0900)]
Replace function name to get variable pointer
Change-Id: I8c057e2cf393636fcf439b0a6f9d62f5e7254992
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Yunmi Ha [Thu, 10 Sep 2020 08:26:16 +0000 (17:26 +0900)]
Fix battery link error when battery module is off
- When battery_module option is off,
there is link error about undefined function.
- Get battery reference by battery plugin handle.
Change-Id: I4b8649c98d52617bd98f97cfd37f52a355a1d565
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Yunmi Ha [Fri, 4 Sep 2020 03:10:09 +0000 (12:10 +0900)]
The battery plugin is not built, when battery module is off.
Change-Id: I5d3ded1a4708448c77a7bc61a31ed8d4134005ea
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
lokilee73 [Thu, 10 Sep 2020 07:14:30 +0000 (16:14 +0900)]
Change function name
ex) dh_get_param_from_var to g_variant_get_safe
Change-Id: Ie8f2efe288b983debe60ec29100a4e146e280827
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Youngjae Cho [Thu, 10 Sep 2020 04:36:35 +0000 (13:36 +0900)]
Update warning_id when registering lockcheck timer
Segfault occurs when the lock node had been deleted during
FORCE_RELEASE_LOCK_INTERVAL and accessed by lockcheck timer callback.
Change-Id: I8defd4fa15a3276588286ef6ae7811d34433241b
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
dd12492f83aa2a72e1f580569b81c594e72e042c)
Yunmi Ha [Fri, 4 Sep 2020 02:57:18 +0000 (11:57 +0900)]
Get battery status from battery plugin.
- When battery_module option is off,
there is link error about undefined function.
- Change battery reference to battery plugin same as display.
Change-Id: I75924fd15f81e2485463f0d3eca3f8e798ecaec6
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
lokilee73 [Tue, 8 Sep 2020 02:05:37 +0000 (11:05 +0900)]
Deduplicate display_load_config
Change-Id: I450a89b1e115a0302101aae95cfd643eb651ff6b
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Sat, 29 Aug 2020 08:13:31 +0000 (17:13 +0900)]
Support multi HDMI + Svace fix
1) Support multi HDMI
There are two HDMI ports in RPI4 target
and it can be increased in the future.
So, make a bitmap table for HDMI.
Supported MAX HDMI number is 64 for now.
Below data is listed up.
extcon# : 1 is shifted by #
ex) type value bitmap
extcon1 1/0 0x10/0x00
extcon2 1/0 0x100/0x000
extcon3 1/0 0x1000/0x0000
If one of them is 1, then 1(connected) is broadcasted.
Otherwise, 0(disconnected) is broadcasted.
2) Svace fix
src/power/power-control.c
Below condition is removed,
because .log_type is same or bigger than PM_LOG_MIN
pm_history_log[index].log_type < PM_LOG_MIN
Change-Id: Ib9dbaa374cc5ccbbde1ebac45840befe1fb786d2
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Yunmi Ha [Fri, 28 Aug 2020 08:41:33 +0000 (17:41 +0900)]
Fix dlsym() caller for get_display_conf
Change-Id: If9eac834f99620e52807881c321d2f08e4a6e194
Youngjae Cho [Mon, 31 Aug 2020 02:38:10 +0000 (11:38 +0900)]
Enhance display/power lock managemenent
Summary:
- Detect someone who holds lock longer than 30 minutes.
- If a general application is detected, deviced generates signal
with time information in addtion to pid.
- If a specific daemon is detected, deviced tries to kill it directly.
For general applications:
Added an addition information, lock holding time in second, to the
signal "pmlock_expired". This makes someone, who is in charge of
application lifecycle and notification, possible to determine whether
to kill that application or not.
For some specific killable daemon:
Added list of killable daemon to conf file and deviced loads that list.
If a killable daemon holds lock longer than 30 minutes, deviced directly
sends SIGTERM to that daemon, releasing lock. After for a while, deviced
checks once more, if the daemon is still alive then, sends SIGKILL.
Change-Id: Ia0d433facdcc7814e19278619a58a111ff7ff7c3
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Tue, 1 Sep 2020 02:12:49 +0000 (11:12 +0900)]
Return errno for failing fopen in config_parse
Change-Id: I23c0e54128f59c9a3b3e533add1670cfb74bf9df
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
lokilee73 [Thu, 27 Aug 2020 05:35:56 +0000 (14:35 +0900)]
Dosen't lock becasue it could prevent Suspend-to-RAM
If internal lock by USB-HOST is on, it can prevent going to suspend-to-ram.
So, remove it.
Change-Id: I87852664313d662cf38af120383506bd2116932f
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Tue, 25 Aug 2020 10:51:28 +0000 (19:51 +0900)]
Deduplicate Power Manager history functions
ex)
pm_history_init
pm_history_save
pm_history_print
Change-Id: Ib322155e0091d6f972a833d140beb3c1bd4c890b
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Fri, 21 Aug 2020 06:48:51 +0000 (15:48 +0900)]
Add internal CAPIs to auto test
ex)
device_touchscreen_disable
device_touchscreen_enable
device_display_get_brightness_state
device_display_get_max_brightness_state
device_display_set_brightness_state
device_display_change_state_by_reason
device_multi_led_get_number
device_multi_led_control
device_battery_get_info_direct
device_pmqos_app_launch_home
device_pmqos_homescreen
device_get_reboot_mode
Change-Id: I3f45437591ed29c9477851b138d51d9fd5864295
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Youngjae Cho [Thu, 20 Aug 2020 04:45:08 +0000 (13:45 +0900)]
Fix display not to go into AOD when poweroff
Change-Id: Ie57cc79a23eb20b948e8bdf54ce6acadcd1474b6
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Yunmi Ha [Fri, 7 Aug 2020 09:29:07 +0000 (18:29 +0900)]
Change display_conf to static
Change-Id: I64cc875bd0fb554f297bf95ba6994ffe429c52ef
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Yunmi Ha [Fri, 7 Aug 2020 08:51:23 +0000 (17:51 +0900)]
Change states global variable to static
Change-Id: I86483d65ad63f6ceca0c12111f994ffaf95669eb
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Yunmi Ha [Fri, 7 Aug 2020 07:23:17 +0000 (16:23 +0900)]
Change battery global variable to static
Change-Id: I2d2b3e024e0518bf9f442ec4820c12546085160f
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Hyotaek Shim [Tue, 18 Aug 2020 05:00:00 +0000 (14:00 +0900)]
Fix build warnings
Change-Id: Ibcc05e48990655e0d62e08dc43fa7fe448c1cb9c
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Yunmi Ha [Fri, 14 Aug 2020 07:33:47 +0000 (16:33 +0900)]
Add initialize constructor for backlight init.
Change-Id: I592367573b0550d6841b1440ba7e2ea47849471f
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Youngjae Cho [Wed, 15 Jul 2020 09:22:28 +0000 (18:22 +0900)]
Change backlight_ops static
Change-Id: I8d958fc084a74e6272f470bf81a7f1a342c10492
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Yunmi Ha [Thu, 13 Aug 2020 06:17:59 +0000 (15:17 +0900)]
Add initialize constructor for variable init.
Change-Id: I0c469e3609f4c99a36531d1a2a9adbcea48aab50
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Yunmi Ha [Wed, 12 Aug 2020 06:21:35 +0000 (15:21 +0900)]
Move variable initialization code to probe function
Change-Id: Ieafb6b73e6a64da572d79b401937cc495bb8fa16
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Yunmi Ha [Wed, 12 Aug 2020 05:35:11 +0000 (14:35 +0900)]
Fix battery_plgn memory corruption
Change-Id: Ib20a86452e669873cd7b0f1a0ae3ef21f077ac0a
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Hyotaek Shim [Wed, 12 Aug 2020 02:38:58 +0000 (11:38 +0900)]
Fix initializtion for extcon_usbhost
Change-Id: I98e67b10b0f3790b70ee77bbd3d41cb6ee99dc39
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Youngjae Cho [Thu, 6 Aug 2020 02:12:06 +0000 (11:12 +0900)]
Guarantee to restore brightness to default on LCDON
AutoBrightnessChanged with level 0 on LCDON will check brightness. If
the current brightnes is different to default brightness, restore the
brightness to the default brightness. This is especially important for
turning on LCD from AOD clock as the deferred brightness effect is
applied at this point.
Change-Id: Ia82a058c5d462d7739d51d161e2740586d990247
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
lokilee73 [Fri, 7 Aug 2020 09:18:51 +0000 (18:18 +0900)]
Change power related global variables and functions to static
Change-Id: I7a1f14ac7d7ebab5a2cefab8b070b246e62dd866
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Youngjae Cho [Thu, 16 Jul 2020 07:02:11 +0000 (16:02 +0900)]
Change display_plgn, battery_plgn static
Change-Id: I3933a70a3f197cf6955b378429aa99c6e1f69150
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
lokilee73 [Tue, 4 Aug 2020 04:27:39 +0000 (13:27 +0900)]
Add doze_pmqos_request for cpu throttling
Request for cpu throttling is sent from DEVICED to PASS,
when LCD is ON or OFF
ex) LCD OFF : 1 to enter doze mode
LCD ON : 0 to leave doze mode
Change-Id: I4a655be04dd5bbd5198e452bda85cbd9df8f06e7
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Yunmi Ha [Wed, 5 Aug 2020 07:59:56 +0000 (16:59 +0900)]
Remove unnecessary dependencies
- remove 'libdevice-node' package dependencies.
Change-Id: I7e85a9bc54e077923b8d44793e3df7d9e91a7e32
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Hyotaek Shim [Tue, 4 Aug 2020 05:04:50 +0000 (14:04 +0900)]
Wait for 4 sec. before poweroff_prepare() and set LCD_OFF in disable_display()
To preserve boot animation time and keep black screen even if the animation is killed
To set LCD_NORMAL when "devicectl display stop" is executed
Change-Id: I58a855bc6d3940fc417481523552f24df22731d7
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Hyotaek Shim [Tue, 4 Aug 2020 06:56:48 +0000 (06:56 +0000)]
Revert "Change abnormal health popup lcddim lock to 60s"
This reverts commit
ec0c8ae86c88d2e5f42b133ff408416e75ebeef3.
Change-Id: I8ad4a44d91601d049f0707e65256c83d49347432
Youngjae Cho [Mon, 27 Jul 2020 04:35:58 +0000 (13:35 +0900)]
Add DPMS checklist for dependable DPMS control
For guaranteeing HBMOFF before DPMS OFF, needs for checker has arisen.
There can be corner case that HBM hasn't been offed before DPMS OFF.
To detect such situation, introduced checklist. And check right before
the DPMS request, guaranteeing HBMOFF.
Change-Id: Id490891f98ec2896b5b6b566aedc741c4c7b2f91
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
084c700b17ffdba0b3e3b295ece1867faaf8bb0a)
Youngjae Cho [Thu, 23 Jul 2020 04:38:11 +0000 (13:38 +0900)]
Apply new power management feature, Doze mode
Change-Id: Ia515c2130c1b68eab6dc5bc2b5a3d2beb62c1114
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Thu, 23 Jul 2020 01:19:15 +0000 (10:19 +0900)]
Change abnormal health popup lcddim lock to 60s
In the below commit,
6b0553796377417ea333f246742dc302e024cc6e
it is missed that update macro to 1 min.
Change-Id: I3c761d3107ff62e6137505d6fca38b5f6dec92bc
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
1eb746baa6176ba20528236afc1a28e1000ff421)
Youngjae Cho [Tue, 21 Jul 2020 04:34:24 +0000 (13:34 +0900)]
Do not control sw bezel on changing display state
sw bezel is only controlled by vconf.
Change-Id: I44a75eed17ccd3cd5115bce810cd15a017bfdf9f
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
b8151da7cb2cc94a21b99aaebfe1ba9ac31e603b)
lokilee73 [Tue, 14 Jul 2020 12:34:50 +0000 (21:34 +0900)]
Devide pm_status_flag into set and clear functions
to remove global variable
set_pm_status_flag is to add flag in pm_status_flag
clear_pm_status_flag is to clear flag in pm_status_flag
Change-Id: If3d9b6969c5a86338b66ca96f1b65fac7efff3a7
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Youngjae Cho [Wed, 15 Jul 2020 05:35:20 +0000 (14:35 +0900)]
Add missing NULL check of calling HAL
Change-Id: I85454fd6ce2bebd041025240e0b7c1606b9e6ec4
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Wed, 15 Jul 2020 04:20:50 +0000 (13:20 +0900)]
Add null checking code before calling a bezel HAL
Change-Id: Idb80accdaefb7820a0776ca55415d2ffd115d83f
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
3809eaa73c98dbc14fae730352fc877e19622f7c)
lokilee73 [Mon, 13 Jul 2020 07:02:17 +0000 (16:02 +0900)]
Move pm_old_state to display.c to remove global variable
Change-Id: Id366233f17a0ab7cee367775ce5758a8df21854d
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Wed, 8 Jul 2020 06:06:42 +0000 (15:06 +0900)]
Move pm_cur_state to display.c to remove global variable
Change-Id: If9eb70c2b8fdeff1f4248983fa5d8b07bd6de86b
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Tue, 7 Jul 2020 10:46:49 +0000 (19:46 +0900)]
Change global variable to static one
Change-Id: I371c2bb10dd31fd0080c6c87a62b27be9891a5fa
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Youngjae Cho [Wed, 8 Jul 2020 02:18:09 +0000 (11:18 +0900)]
Fix coverity issue
Change-Id: Ia09f20d916d8128c07aea903dca24a5afa5a562e
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Tue, 7 Jul 2020 09:17:32 +0000 (18:17 +0900)]
Fix coverity issue
Change-Id: Ia9a1a6aa32514a482ce64345088ad99be59e9634
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Tue, 7 Jul 2020 08:16:19 +0000 (17:16 +0900)]
Add vibration intensity control logic for bezel
Change-Id: I1025c52aa25e549bd56b35d54a570fd5078813d7
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
fd2915816cc1dd60ec856fea0afaa3649b5154bb)
Youngjae Cho [Tue, 16 Jun 2020 02:34:03 +0000 (11:34 +0900)]
Add brightness interaction
Add brightness interaction among
- Set
- Hold
- HBM
- LBM
- LowbatteryDim
- DimStay (Battery Abnormal Health)
The condition in display_dimstay_check() is deleted,
if ((pm_status_flag & PWRSV_FLAG) && !(pm_status_flag & BRTCH_FLAG))
return true;
as all the brightness controlled by HBM/LBM/Hold/Release/Set is allowed
to change even though in low battery dim situation.
Checking HBM state after LCDON is deleted, as now sensord always notify
deviced about the brightness state on receiving LCDOn signal.
Change-Id: I2fc2babde83656d0743f113b5547e6edea72768f
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Mon, 6 Jul 2020 05:26:58 +0000 (14:26 +0900)]
Add auto-test for brightness
Usage: deviced-auto-test wearable brightness [tcname]
Change-Id: Ied1e76aa411e0d78e912ad7050de4e0077933728
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Mon, 6 Jul 2020 04:46:31 +0000 (13:46 +0900)]
Fix not to defer processing lowbat on realoff
If uevent continues to occur shorter than 1.5s on realoff state,
it defers processing lowbattery infinitely and makes poweroff sequence
unreachable. For that case, added exception to process lowbat
immediately when the battery state is realoff.
Change-Id: I90354fa261f73aa2e5b8451078576fcc070166a8
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
c07e2dda8467cd2df6ccea80f3449e1a05993f31)
Youngjae Cho [Tue, 30 Jun 2020 02:22:14 +0000 (11:22 +0900)]
Change order of checking HW/SW bezel
SW bezel can have both HW/SW bezel node, but HW bezel can only have
HW bezel node. So check SW bezel first, and after check HW bezel.
Change-Id: I437eabb66e64cd922636999c1d3b952fa03e096c
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
99d786411ab6361f2875a47876a478ccd04aaab3)
lokilee73 [Mon, 29 Jun 2020 04:53:49 +0000 (13:53 +0900)]
Add signal to broadcast key input values on iot profile
Change-Id: I2c40a4f5d09533ad4551578edd65ffca7d3d16db
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>