Youngjae Cho [Thu, 17 Aug 2023 04:58:33 +0000 (13:58 +0900)]
display: Remove unnecessary headers from headed/headless plugin
Change-Id: I6bfa944043026d5b6d29aa37b685eeb60f34c319
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Thu, 17 Aug 2023 11:13:03 +0000 (20:13 +0900)]
plugin: Replace shared/log.h with the libsyscommon/log.h
Change-Id: I382897148934deba330e23975b411d51103d3a61
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Thu, 17 Aug 2023 06:04:46 +0000 (15:04 +0900)]
display: Replace headed/headless device-notifier.h with libsyscommon
Change-Id: I8c712cc698767267742a0d19ef017e5eacd06c12
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Thu, 17 Aug 2023 05:15:44 +0000 (14:15 +0900)]
display: Remove unused ambient code from headed plugin
Change-Id: Ie0629fb269c633b24f6be8afbad93c8e4b223f40
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Thu, 17 Aug 2023 05:06:31 +0000 (14:06 +0900)]
display: Remove unused disp_plgn/backlight_ops from headed
Change-Id: I858e6097b407bc447fa3687247ccff75fb725980
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Chanwoo Choi [Thu, 17 Aug 2023 09:44:25 +0000 (18:44 +0900)]
plugins: iot-headless: Repalce shared header with libsyscommon header
- shared/log.h -> libsyscommon/log.h
- shared/device-notifier.h -> system/syscommon-plugin-deviced-common-interface.h
-> libsyscommon/notifier.h
Change-Id: I548e74944fde61852ccff73e4c9f514dc7a3cbb0
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Thu, 17 Aug 2023 09:21:20 +0000 (18:21 +0900)]
shared: event: Replace event_broadcast_id() with gdbus_signal_emit() directly
Without event_broadcast_id() wrapper funciton, use gdbus_signal_emit()
helper function directly to send the signal of event id.
Change-Id: I1545d7a1fb2c70c74c873dd0d2d81342c96aa0f5
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Thu, 17 Aug 2023 06:24:29 +0000 (15:24 +0900)]
shared: event: Replace with DEVICED_POWER_ATTR_TUPLE2_SET_WAKELOCK
Replace event_acquire_wakelock() with DEVICED_POWER_ATTR_TUPLE2_SET_WAKELOCK
attribute by using resource-mangaer in libsyscommon and then remove
event_acquire_wakelock().
Change-Id: I7f0dbc7a46f0753c14ef4ecbecb0bf27e300f61e
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Thu, 17 Aug 2023 06:24:00 +0000 (15:24 +0900)]
power: resource: Add new DEVICED_POWER_ATTR_TUPLE2_SET_WAKELOCK
DEVICED_POWER_ATTR_TUPLE2_SET_WAKELOCK attribute provides the
setter function to acquire the wakelock in order to prevent the suspending.
[Detailed description of newly added attribute]
- attr id : DEVICED_POWER_ATTR_TUPLE2_SET_WAKELOCK
- setter : O
- getter : X
- 1st param : Event ID
- 2nd param : Timeout to release the wakelock count
Change-Id: I9ffdecac5ddd538b22ae2cd9397abb0fe93dd98a
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Thu, 17 Aug 2023 05:30:13 +0000 (14:30 +0900)]
power: resource: Remove unneeded blank
Change-Id: I529384993dd03dc5767ee0a31aa6a396b8c0f7b7
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Thu, 17 Aug 2023 05:27:57 +0000 (14:27 +0900)]
plugins: iot-headless: Remove unused header and replace it by libsyscommon
- shared/common.h is not used
- shared/log.h is replaced with libsyscommon/lig.h
Change-Id: If4113e98aa7b130230b2fa1eac93395c99e9ae70
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Youngjae Cho [Thu, 17 Aug 2023 05:48:27 +0000 (14:48 +0900)]
shared: Replace device_notifier_type with the libsyscommon
The prefix DEVICE_NOTIFIER has been replaced with DEVICE'D'_NOTIFIER.
Change-Id: Ie2600c7846ca9ac898b3b20f69e36bc8c45f9b3e
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Yunhee Seo [Thu, 17 Aug 2023 01:38:15 +0000 (10:38 +0900)]
display: Remove display module from headless plugin
Headless does not use display device, however dummy display.so file exists.
As display refactoring progressed, there was no need for dummy display module to exist.
Thus, display module is removed from headless plugin.
Change-Id: Ia0bf6bf53ae5883a86f26bc522f222130ae95b3d
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Youngjae Cho [Wed, 16 Aug 2023 02:10:07 +0000 (11:10 +0900)]
display: Replace change state of iot-headed/mobile/tv plugin
The display_state_transition_request_state_transition_with_option()
has been replaced by resource-manager API of the libsyscommon that
sets display attribute DEVICED_DISPLAY_ATTR_TUPLE2_SET_CURRENT_STATE.
Change-Id: I7e9cecd3246914c5a323eac7acb3051b907737bb
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Mon, 14 Aug 2023 07:55:14 +0000 (16:55 +0900)]
display: Add set attribute for current state
New attribute:
- id: DEVICED_DISPLAY_ATTR_TUPLE2_SET_CURRENT_STATE
- type: SYSCOMMON_RESMAN_DATA_TYPE_UIN64_UINT64
- setter: O
- getter: X
It sets display current state. It receives two parameters,
- enum deviced_display_state
: next state to be changed
- enum deviced_event
: reason why the state changed
Change-Id: I9e3bca655b85f0639fa50ea6d21cee62e2dc909d
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Wed, 9 Aug 2023 11:22:00 +0000 (20:22 +0900)]
display: Add display attribute representing current state
New attribute:
- id: DEVICED_DISPLAY_ATTR_INT_GET_CURRENT_STATE
- type: SYSCOMMON_RESMAN_DATA_TYPE_INT
- setter: X
- getter: O
Plugins and other core modules has replaced get_pm_cur_state()
with resource-manager API that accessing the attribute.
Change-Id: Iacb01f00c6909f313d32575f424646a8b4de3a96
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Thu, 10 Aug 2023 06:31:06 +0000 (15:31 +0900)]
display: Relocate display_state_transition_do_state_action()
The display_state_transition_do_state_action() of display-panel.c has
been moved to display-state-transition.c and it has renamed to
display_state_set_current().
Change-Id: Iff04254b484c56fd56db134978f805e12fcfc4b6
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Thu, 10 Aug 2023 04:43:17 +0000 (13:43 +0900)]
display: Add display_state_get_current()
It replaces get_pm_cur_state() of the display core.
Change-Id: I7fa227f816b343226f5a7584952862a4ebdd8459
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Thu, 10 Aug 2023 02:57:13 +0000 (11:57 +0900)]
display: Relocate state to display-state-transition.c
The existing pm_cur_state/pm_old_state has renamed to current/previous.
Getter and setter on that current/previous state has moved accordingly.
However, those getter/setter name hasn't been changed as it will be
replaced with resource-manager soon.
Change-Id: Ib89c018bd1cf011c80bff4ec9922fa970931a1aa
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Thu, 10 Aug 2023 01:39:07 +0000 (10:39 +0900)]
display: Replace state_t with deviced_display_state of the libsyscommon
Removed unused S_STANDBY, S_SUSPEND and S_POWEROFF.
Change-Id: I16ecff84bf8b3bf0379afe43942aa28d2950f4b2
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Mon, 7 Aug 2023 11:00:59 +0000 (20:00 +0900)]
Replace INTERNAL_LOCK_* with deviced_event of the libsyscommon
Most of INTERNAL_LOCK_XXX has changed to the same name, DEVICED_EVENT_XXX.
A few of them, mostly INTERNAL_LOCK_PM, has changed to the best matching
name that reflects its context.
Change-Id: I4574e82985defed2578338b6c2bb3cbd34f023ea
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Mon, 7 Aug 2023 08:24:04 +0000 (17:24 +0900)]
display: Remove unreachable display-enhance code
The enhance isn't invoked by display_ops->func(), but by notifier.
Change-Id: I43f4cfd3c1afc8b11960302fc5cdb4e97ac9c4b5
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Fri, 4 Aug 2023 05:23:53 +0000 (14:23 +0900)]
display: Add resource attribute representing max brightness
New attribute:
- id: DEVICED_DISPLAY_ATTR_INT_GET_MAX_BRIGHTNESS
- type: SYSCOMMON_RESMAN_DATA_TYPE_INT
- setter: O
- getter: X
The previous operations, display_backlight_get_max_brightness(),
has been replaced with operation that accessing the attribute
DEVICED_DISPLAY_ATTR_INT_BRIGHTNESS via resource-manager API.
Change-Id: I6966cbdf4a75795c9f566611424095a04c133bbc
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Fri, 4 Aug 2023 05:32:05 +0000 (14:32 +0900)]
display: power: Replace common code with the libsyscommon
Change-Id: I7baf001d4d03ef675465b821d564cae3958055ca
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Thu, 3 Aug 2023 06:07:11 +0000 (15:07 +0900)]
display: Introduce resource-driver
Add skeleton resource-driver for the display.
Change-Id: I716c208ed55b89636d4c3ecc394d8f6938abecc6
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Yunhee Seo [Fri, 4 Aug 2023 04:48:27 +0000 (13:48 +0900)]
input: Add typecasting to avoid static analysis issue
Add typecasting to avoid static analysis issue
Change-Id: I4be23e93b2e67854d3bbd93bc758e18b7daa8e3a
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Fri, 4 Aug 2023 04:41:00 +0000 (13:41 +0900)]
plugin: display: Add check NULL dereference
Fix static analysis NULL dereference issue.
Change-Id: I5cca401e4cd9a1b52e19e30dbfbebd747c6a3aed
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Fri, 4 Aug 2023 04:39:33 +0000 (13:39 +0900)]
battery: Add check NULL derefernce
Fix static analysis NULL dereferce issue.
Change-Id: Ib33ce3df0eab04c62c9096d78e09ff2e093edd57
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Youngjae Cho [Thu, 3 Aug 2023 02:03:49 +0000 (11:03 +0900)]
power: Fix type casting of set_current_state()
The last set-value parameter, data4, receives address to the user_data,
which is type of 'const void *'.
Change-Id: I6eaf48357b8eb5c4bfc551832b3c35aff2b2aef7
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Tue, 1 Aug 2023 09:50:19 +0000 (18:50 +0900)]
display: Apply resource-manager for controlling power
Previously, controlling power has operated via power functions such as
power_request_change_state(), power_request_change_state_strict(). It
has changed to work via the libsyscommon resource-manager.
Change-Id: I39253c193ccf73e66a6075c4e46e4a1432c501dd
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Mon, 31 Jul 2023 10:31:29 +0000 (19:31 +0900)]
power: Introduce resource-driver
The power module now operates on top of resource-driver.
New attribute:
- id: DEVICED_POWER_ATTR_SET_UINT64_4_CURRENT_STATE
- type: SYSCOMMON_RESMAN_DATA_TYPE_UINT64_UINT64_UINT64_UINT64
- setter: O
- getter: X
It trigger power transition to set current power state.
Requires 4 parameter:
1. FROM state
Transition take place only from the 'FROM' state. If you
don't mind whatever the 'FROM' state is, use
DEVICED_POWER_STATE_ALL for the 'FROM' state.
2. TO state
Next state to transition
3. triggering reason
4. user_data
New attribute:
- id: DEVICED_POWER_ATTR_UINT64_CURRENT_STATE
- type: SYSCOMMON_RESMAN_DATA_TYPE_UINT64
- setter: X
- getter: O
It gets the current power state.
New attribute:
- id: DEVICED_POWER_ATTR_INT_WAKEUP_REASON
- type: SYSCOMMON_RESMAN_DATA_TYPE_INT
- setter: X
- getter: O
It gets wakeup reason of the latest system wakeup.
All enums and macros regarding power state have moved to libsyscommon,
syscommon-plugin-deviced-power-interface.h, so that those value can be
used by both the deviced core and plugin.
To match type of user_data from resource-manager, fix the existing
'void *' to 'const void *'.
Change-Id: I58af2a74ce2313a07b676e1a884b4201751a882c
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Mon, 31 Jul 2023 07:06:08 +0000 (16:06 +0900)]
core: Introduce resource-manager
The deviced core init/exit resource drivers. The helper functions have
been added for this job.
- resource_init()
- resource_exit()
Currently, there can be only a single resource instance by a resource
type. Therefore, the deviced manages resource ids of instances within
an array that each index contains a single integer of resource id.
Change-Id: I8818c64f9bfa70a9751a213330e36c5744a55daa
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Fri, 28 Jul 2023 01:04:37 +0000 (10:04 +0900)]
display: Fix build warning, casting pointer into integer
The warning happens when casting 64bit pointer into 32bit integer.
Casting into intermeidate type, intptr_t, suppresses such warning.
Change-Id: I56bbce61f7c43311574e8cfb65237ad49954cf55
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Wed, 26 Jul 2023 08:00:43 +0000 (17:00 +0900)]
shared: Replace device notifier with syscommon notifier
Leave enum device_notifier_type and device_notifier_state_e for now.
It will be moved to plugin-api-interface to be used by both the deviced
and its plugin.
Change-Id: I11e6a275f60a0170e7854f9268459617ce563530
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Wed, 26 Jul 2023 07:37:32 +0000 (16:37 +0900)]
shared: Replace do_mkdir() with syscommon_mkdir()
Change-Id: I93f1691078b8ae3686035be3a87541f9fa203165
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Wed, 26 Jul 2023 06:30:59 +0000 (15:30 +0900)]
shared: Remove unused get_command() and unnecessary include
Change-Id: I6e81fb4a969793c87c71f45dab42fea9caecfc90
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Wed, 26 Jul 2023 05:39:21 +0000 (14:39 +0900)]
shared: Replace do_copy_force() with syscommon_file_copy()
Change-Id: I4522ca9f1f9a2aebdc16b106e8d0536bca6cae9b
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Yunhee Seo [Tue, 18 Jul 2023 11:35:56 +0000 (20:35 +0900)]
display: Remove get_lcd_power()
As display plugin dependency is resolved, get_lcd_power() no longer needs to exist.
Thus, get_lcd_power() and wrapper are removed.
Change-Id: I97b35b3f7f1b502fa630f91c39e59fc326788952
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Tue, 18 Jul 2023 11:25:43 +0000 (20:25 +0900)]
display: Fix typo
display_plugin_display_on_by_reason() name was misspelled.
Change-Id: I4aa413762e839c2453070ccadc62912d685ce3d4
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Tue, 18 Jul 2023 10:04:00 +0000 (19:04 +0900)]
display: Remove unused function display_panel_set_dpms_running_state()
dpms_running_state variable and setter have never been used since they were added.
There is no place to call display_panel_set_dpms_running_state() and it is unreachable.
Thus display_panel_set_dpms_running_state() and dpms_running_state is removed.
Change-Id: I51a74e0e300d37e2d87808248a7759c0992c45d9
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Youngjae Cho [Mon, 24 Jul 2023 12:43:36 +0000 (21:43 +0900)]
shared: Replace is_emulator() with syscommon_is_emulator()
Change-Id: I4ee8746942fbc9f3a223bb5d3867f774a2ce5a52
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Mon, 24 Jul 2023 11:47:34 +0000 (20:47 +0900)]
Replace prefix 'libsys' with 'syscommon'
Change-Id: I10e88e888da3a8a9c5cfed8640ac2aaceecf3565
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Mon, 24 Jul 2023 11:30:37 +0000 (20:30 +0900)]
power: Move shutdown exclusive code to shutdown.c
umount_partition_by_kill() and its subroutine functions are only used
by the shutdown binary. Therefore relocate it from shared library to
shutdown binary.
Change-Id: I1d88b5892cdf1d918b674f30d095ab56c2a8743c
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Mon, 24 Jul 2023 11:36:56 +0000 (20:36 +0900)]
shared: Replace mount_check() with syscommon_is_mounted()
Change-Id: I505117cb3ffcfb3e467bd2dd7df79d2d051b5f39
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Mon, 24 Jul 2023 10:28:54 +0000 (19:28 +0900)]
shared: Replace sys_check_node() with access()
Change-Id: I56c9e398bd176930e5ae05fafdce440ef459d2fe
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Mon, 17 Jul 2023 06:20:06 +0000 (15:20 +0900)]
shared: Replace proc operation with that of the libsyscommon
Change-Id: I733374a063ab2dee5192cf1c553e1480f9a2343c
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Mon, 17 Jul 2023 02:43:43 +0000 (11:43 +0900)]
Remove unused code and file
Change-Id: I9c9c6e4652e9b97ad6e06efa8c0baebe0a2b4db4
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Mon, 17 Jul 2023 02:32:19 +0000 (11:32 +0900)]
shared: Move suspend_path()/resume_path() to tzip
Those functions are only used by tzip module.
Change-Id: I28a861373835a6e26bed39de8280c29b348c7552
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Mon, 17 Jul 2023 01:19:26 +0000 (10:19 +0900)]
bitmap: Replace bitmap with that of the libsyscommon
Change-Id: I701b7102f466f6f16dae6ce499fc04a0218b5c68
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Yunhee Seo [Mon, 17 Jul 2023 07:50:23 +0000 (16:50 +0900)]
display: Add omitted code to display-panel
Add lcd_on_timeval initizalization code.
Because of this, the reset timeout value calculation was not accurate.
Change-Id: I2361ed311da06589911e456481977d87426971fb
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Fri, 14 Jul 2023 06:47:46 +0000 (15:47 +0900)]
display: Remove duplicated display_exit codes
display all plugins follow same display_exit logic.
There is no need to keep same logic code except specific profile code logic.
Thus display_exit() logic is moved to display.c.
Change-Id: I48b00e9289dbac9adc14b7d619f7e5f3ff81b853
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Fri, 14 Jul 2023 07:25:10 +0000 (16:25 +0900)]
display: Relocate display hal-backend loader/unloader
display_service_load/display_service_free() is used as display hal-backend loader/unloader.
However, display core should treat hal-backend using during display probe,exit process.
Thus, display_service_load/display_service_free() are removed.
Also, display_set_hal_backend_available() is removed.
Because display core(display.c) only decides whether the display hal-backend using or not.
Change-Id: I6533145b0d558c2bae831eee1ea04ab313f286ac
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Thu, 13 Jul 2023 03:44:35 +0000 (12:44 +0900)]
display: Relocate display initialization code
Except for a specific profile, unnecessarily duplicated codes are erased.
And same code is moved to display.c.
Change-Id: I35c6e0693fb1e9581ecefa1f03db9fa71681084f
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Wed, 12 Jul 2023 10:06:31 +0000 (19:06 +0900)]
display: Remove poll.c
poll.c file has legacy functions pm_change_internal/pm_lock_internal/pm_unlock_internal()
These functions are usually called from external requests like key-event, dbus method, etc.
pm_lock_internal/pm_unlock_internal() gets specific display state lock/unlock.
pm_change_internal() requests state transition according to specific condition.
This file has to be erased, and then inner functions are relocated.
These are new functions to be added.
display-lock
- int display_lock_request_lock_with_option(pid_t pid, int s_bits, int flag, int timeout);
- int display_lock_request_unlock_with_option(pid_t pid, int s_bits, int flag);
-> These replace pm_lock_internal/pm_unlock_intenral().
display-state-transition
- int display_state_transition_request_state_transition_with_option(pid_t pid, int s_bits);
-> This replaces pm_change_internal().
display-util
- int display_util_get_display_state(int s_bits);
-> This extracts display state from s_bits.
Change-Id: Ied90f5a7f132f3bfcba1ecf1eef8faa02c728e31
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Tue, 11 Jul 2023 10:23:49 +0000 (19:23 +0900)]
display: Remove unncessary display_backlight_get_brightness_by_plugin_profile()
As display functions are relocated and refactored, this function became unnecessary.
Change-Id: Id0ef55c6f116bc8cba3db97c4487c6e67cbeee5c
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Tue, 11 Jul 2023 09:30:52 +0000 (18:30 +0900)]
display: Refactor display_plugin_get_device_flags()
To make display-plugin independent without any other file dependence,
display_plugin_get_device_flags() is refactored.
This function is added to display-util
- int display_util_get_device_flags(unsigned long *device_flags);
-> This function sets display flag value and return.
Change-Id: I1ad7f1ebb3838a0bca7aa74623f9e6ee3da4299a
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Mon, 10 Jul 2023 06:28:18 +0000 (15:28 +0900)]
display: Relocate delayed_init_done
delayed_init_done is used from all plugins with the same logic.
This function is used to unlock INTERNAL_LOCK_BOOTING after display initialization.
Because INTERNAL_LOCK_BOOTING is caught while display is initialized.
Thus, delayed_init_done is moved to display.c
Change-Id: Id6e23dd5b10de8d20edce22715972a829c95b49e
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Mon, 10 Jul 2023 02:40:35 +0000 (11:40 +0900)]
display: Remove util.h/plugin-common
util.h is used from display plugins for Power manager logging.
The concept of power manager that exist as legacy while refactoring
should be eliminated.
By deleting util.h, the dependency problem is solved and the plugin-common
is also erased.
Also, util.h can be replaced by display-util.h and log.h in the display core.
Change-Id: Ic9630ff0a8ef50190d1abab9ce5a86956b714c8a
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Thu, 29 Jun 2023 06:25:15 +0000 (15:25 +0900)]
power: Remove unsafe function
To resolve build warning, strncpy is replaced by snprintf.
Change-Id: I780b09d61807f889991c89766c3560c097bc509b
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Thu, 29 Jun 2023 06:04:32 +0000 (15:04 +0900)]
display: Fix static analysis issue
Fix logical error code
Change-Id: I8fe1338ac833385577ea8e515745d8a44c226b63
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Thu, 29 Jun 2023 05:36:23 +0000 (14:36 +0900)]
display: Relocate display-dbus.c to core
As remove dependecies, display-dbus.c is relocated to display core side.
Change-Id: Ia46963a15f27e99c0e3cb2402af3a50cb934e96c
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Adam Michalski [Tue, 13 Jun 2023 15:52:56 +0000 (17:52 +0200)]
Add ISU package
The following changes have been made for ISU:
* isu/isu.cfg - ISU configuration file.
[isu] section:
`name` and `version` have been filled by using the #NAME# and #VERSION#
patterns that in turn will be replaced by the `%isu_package` RPM macro
into the name and version of the RPM package.
`system_service` is the systemd service name and must be the same as the
original one.
[files] section:
contains a list of all files that should be added to the ISU package.
Since we only want to replace the binary, there is only one file here.
* isu/deviced.service - modified ISU service file.
Compared to the original 'deviced.service' the following changes have been
made for ISU:
- `EnvironmentFile=/etc/isu/service-common.inc` - to include ISU-specific
variables
- `ExecStart=` has been changed to launch sandbox application with default
parameters (`ISU_SANDBOX_INVOCATION`), ISU-provided
`#ISU_RUN_PATH#/deviced/rootfs/usr/bin/deviced` is visible as
`/usr/bin/deviced` in the sandbox
- `NotifyAccess=all` has been set as there is one intermediate process
(`isu-sandbox`) between `systemd` and `/usr/bin/deviced`
* isu/CMakeLists.txt - CMake config file for the ISU.
Added installing ISU config file and the service file to the appropriate
locations (/etc/isu/*)
* CMakeLists.txt - main config file for CMake.
We've added the `isu` subdirectory where we placed the isu configuration
file and the modified service file that will run `dlog` in a sandboxed
environment.
* packaging/deviced.spec - main `deviced` RPM spec file.
We've made the following changes:
- added `Requires: %{name}-isu = %{version}-%{release}` tag in the main
spec section which will cause the ISU package to be installed when the
original package is installed.
- added the `%isu_package` macro invocation right before the `%prep` section
which will cause the configuration to be placed in the correct location
with all ISU-related files packaged into the `*-isu` RPM package.
Change-Id: Ib4ede1ff59a0a6be23b7414926672e772c2ac1d5
Yunhee Seo [Wed, 28 Jun 2023 07:44:59 +0000 (16:44 +0900)]
display: Remove display_info interface
display_info interface is only used in the wearable plugins.
Thus there is no reason why display_info should exist in all display plugins.
Furthermore, it is hard to figure out above interface usage and role.
Delete display_info to eliminate the dependence between core and display plugins.
During refactoring, the wearable plugin codes must be cleaned up later.
Change-Id: I3caa44fb213cd70416435b02214f0bc0c26edddd
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
SangYoun Kwak [Tue, 4 Jul 2023 07:59:41 +0000 (16:59 +0900)]
Fix the build error using gcc 13
In the function "cfs_set_gadget_config" from
src/usb-gadget/usb-gadget-cfs-ops.c, it concatenates two strings and
stores it into a buffer(named instance) using snprintf.
In this situation, the gcc-13 compiler complains about: the length of
concatenated string can be greater than the size of the buffer, so
it should be handled.
It is already handled by checking the length of the two strings but the
compiler don't know about it.
To fix this situation, codes for checking the return value of snprintf
have been added.
Change-Id: I6195e72dd2f88bfeb72fb53b19227d2e08d03afb
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
Yunhee Seo [Wed, 28 Jun 2023 05:37:42 +0000 (14:37 +0900)]
display: Relocate lcd_uevent_changed()
lcd_uevent_ops is registered from all display plugin initialization.
It controls touchscreen_ops stop/start through uevent.
All the plugins have same lcd_uevent_changed() logic.
Thus it is relocated to display core.
Change-Id: Ie42b11f6f20e77463ea81dcf72aee662d368c5d5
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Wed, 28 Jun 2023 04:09:03 +0000 (13:09 +0900)]
display: Relocate __device_flags_to_string() from plugins to core
__device_flags_to_string() is used for getting string name according to device_flags.
These functions have same logic, thus it is relocated to display-util.
This function is added to display-util.
- int display_util_get_device_flags_name(enum device_flags flags, const char **flag_name);
-> It replaces __device_flags_to_string().
Change-Id: Ia84ae6d7ff71419e22b700c12a7bca4e76413293
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Wed, 28 Jun 2023 02:12:33 +0000 (11:12 +0900)]
display: Relocate SIGHUP handler
When the deviced gets SIGHUP, display calls pm_save_logdump().
Move SIGHUP handler to the core because there is no reason for the same handler to exist
in the all plugins.
Change-Id: I794de3869520229ef87c8c6a4b4e3d3695d82214
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Tue, 27 Jun 2023 07:30:45 +0000 (16:30 +0900)]
display: Remove check_seed_status()
The check_seed_status() name and role is unclear.
Thus it is removed and devided to 3 funcs.
These functions are added to display core.
- void display_set_initial_brightness(void);
-> It checks default brightness and set initial brightness value.
- void display_set_initial_battery_flag(void);
-> It checks battery status and set battery status to pm_status_flag.
- void display_set_initial_lockscreen_status(void);
-> It checks lockscreen state and set initial lockscreen timeout value.
To relocate these, this function is added to display-plugin.
- int display_plugin_config_get_pm_default_brightness(int *pm_default_brightness);
Change-Id: Ia1be19b5c0d5643e42c5c56a5b8df9483d25ad9b
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Tue, 27 Jun 2023 02:29:26 +0000 (11:29 +0900)]
display: Relocate poll.c from display/plugin-common to display core
To devide display/plugin-common and display core, all plugin-common files should be moved to core.
By eliminating dependence, poll.c relocation has become possible.
Change-Id: I6fa77229f23b16ff0ac89e8790aa020d8f9566b9
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Tue, 27 Jun 2023 02:02:25 +0000 (11:02 +0900)]
display: Remove poll_callback() from all display plugins
The role of poll_callback() is only causing transition according to the conditions.
To replace this function, poll_callback() is separated into two funcs and added.
These are added to display-state-transition.
- int display_state_transition_do_state_transition_by_input_poll_event(void);
- int display_state_transition_do_state_transition_by_pm_control_event(PMMsg *data);
-> It causes display state transition by a specific trigger condition.
To refactor these functions, this function is also added to display.
- bool display_is_display_ops_started_status(void);
-> It checks if display ops status is DEVICE_OPS_STATUS_START or not.
Change-Id: I3833e7881101bfd81c7855b14ffdf4aa74a590bf
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Mon, 26 Jun 2023 07:15:28 +0000 (16:15 +0900)]
display: Relocate proc_condition_funcs()
There are three functions to get display lock, unlock, state transition by external request.
proc_condition_lock()/proc_condition_unlock()/proc_condition()
Those functions rules are all the same, so they are relocated.
This function is added to display-lock.
- int display_lock_proc_condition(PMMsg *data);
Change-Id: I10dc0f14d3e7b2bc52a0c11fb1e256c986191eec
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Mon, 26 Jun 2023 07:29:40 +0000 (16:29 +0900)]
display: Relocate default_proc_change_state()/default_proc_change_state_action()
Above two functions are used for display-lock related functions.
default_proc_change_state_action() sets pm_cur_state and occurs state_action.
default_proc_change_state() occurs next state action when the specific condition is met.
These functions are added to display-plugin.
- bool display_plugin_state_is_there_proc_change_state(void);
- int display_plugin_state_proc_change_state(unsigned int cond, pid_t pid);
These functions are added to display-state-transition.
- void display_state_transition_do_proc_change_state_action(enum state_t next, int timeout);
- int display_state_transition_do_proc_change_state(unsigned int cond, pid_t pid);
Newly added functions should also be refactored.
Change-Id: I85476642bb4b4c4fc5c607ce6ce0591736d1a014
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Mon, 26 Jun 2023 05:38:31 +0000 (14:38 +0900)]
display: Remove battery plugin using from display plugin
display plugin used get_charging_status() from initialization steps.
To use that function, display plugin loaded battery plugin.
However, that function is not exist in the battery plugin.
Thus, that function loading and accessing is useless work.
Also, loading battery plugin from the display plugin structure should be removed.
This function is added to display-misc.
- void display_misc_set_battery_charging_status_flag(void);
-> It checks battery charging status and sets CHRGR_FLAG.
-> This function should be relocated during battery plugin refactoring.
Change-Id: I943768785b654a660982a3017cafd0e41b7b94ed
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Fri, 16 Jun 2023 08:10:30 +0000 (17:10 +0900)]
display: Relocate auto-brightness.c from display core to wearable plugin
The function of auto-brightness.c is only used by wearable plugin.
Thus auto-brightness.c file is moved to wearable/display module.
Change-Id: I301801f9325d6a09969070499a14dd0c38b0ba17
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Fri, 16 Jun 2023 03:41:49 +0000 (12:41 +0900)]
display: Relocate update_setting() from plugins to core
update_setting() is called from display init() and it updates pm related setting.
Actually, this function does a lot of work according to the incoming key value.
Also, it is necessary to change the initialization way, so it will be refactored after relocation.
To relocate, wrapper functions are added below display-plugin.
- bool display_plugin_is_there_update_pm_setting(void);
- int display_plugin_is_lcd_on_blocked(void);
- int display_plugin_set_power_save_mode_flag(int onoff);
-> This wrapper is added for wearable plugin.
New function is added below display/setting
- int display_setting_update_pm_setting(int key_idx, int val);
-> This is temporary function, it will be refactored.
Change-Id: I90564168f72df733e887e231fa8262a7a83f86ac
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Thu, 15 Jun 2023 07:51:24 +0000 (16:51 +0900)]
display: Relocate set_lcd_timeout()/reset_lcd_timeout()
set_lcd_timeout(), reset_lcd_timeout() is only used by dbus_setlcdtimeout call.
However, it is unclear where it is being used.
Furthermore, those functions' work flow overlap with set custom timeout, state transition.
Thus, these functions are moved to display-dbus.c
After that, it will be refactored.
Change-Id: Iad32a524cc4fc8d8548258766236921be22dc94f
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Thu, 15 Jun 2023 07:25:10 +0000 (16:25 +0900)]
display: Relocate delayed_dpms_init_done() from plugins to core
During display init, it is necessary to add a timer to wait for dpms initialization.
Also, that work should be handled in the display.c
Thus, this function is added below display.c
void display_add_timer_for_wating_dpms_init(void);
-> This replaces add_timer_for_dpms_init()
Change-Id: Icfcc248b54899608a6a0c483df0ae572e0112798
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Thu, 15 Jun 2023 07:08:12 +0000 (16:08 +0900)]
display: Relocate power_saving_func() from plugins to core
power_saving_func() sets PWRSV_FLAG.
Actually, this work should be moved to display.c
This function is added below display.c
- void display_set_power_save_mode_flag(int onoff);
-> This replaces power_saving_func()
Change-Id: I9e803ab97ab02b9ddf64519aadd6c373167d0aa4
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Thu, 15 Jun 2023 06:55:28 +0000 (15:55 +0900)]
display: Relocate power related static function from plugins to core
power_resume_from_echomem_callback(), poweroff_triggered_callback()
These power notifier callback should be registered/unregistered from display.c
There is no reason to exist in plugins.
It is desirable to be managed in display.c
Change-Id: I0d9078bb7e48d05d40a752a071153c74898db890
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Wed, 14 Jun 2023 11:08:52 +0000 (20:08 +0900)]
display: Relocate display_on/off_by_reason()
display_on/off_by_reason() is used by dbus_changestatebyreason call.
1. Set display on/off reason to the flag.
2. Check if it is possible to go to lcd_on/off procedure.
If possible, go to the lcd on/off procedure.
3. After that, update current, before display state and do action about S_NORMAL/S_LCDOFF.
For relocating these, the string of device operation declaration has also been moved to shared/devices.h
There is no reason for the same string to exist in all plugins.
New functions are added below display-panel.
- int display_panel_display_turn_on_by_reason(const char *reason, int timeout);
- int display_panel_display_turn_off_by_reason(const char *reason);
-> These replace display_on/off_by_reason()
Change-Id: Ia22ee6295fa138c3742be62c3bbc2c357716caf5
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Wed, 14 Jun 2023 11:02:40 +0000 (20:02 +0900)]
display: Relocate custom_lcd_on/off()
custom_lcd_on/off() is used by dbus_customlcdon/off call.
These update custom timeout value and go to S_NORMAL/S_LCDOFF display state.
New functions added below display-panel.
- int display_panel_custom_lcd_on(int timeout);
- int display_panel_custom_lcd_off(enum device_flags flag);
-> These replace custom_lcd_on/off().
Change-Id: Ie6e28ade1a05212f97c4feb87ea70955ff2cddc0
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Wed, 14 Jun 2023 07:17:34 +0000 (16:17 +0900)]
display: Relocate lcd_on_direct()
lcd_on_direct() is used to lcd turn on directly by key-event, proc_change_state.. etc.
It is called under the specific condition.
To relocate lcd_on_direct(), update_display_locktime() is also relocated.
For wearable plugin, this wrapper is added.
- int display_plugin_lcd_on_procedure(int state, enum device_flags flag);
New functions are added below display-state-transition
- void display_state_transition_update_lock_screen_timeout(int timeout);
-> This function sets lock screen timeout value and update.
It replaces update_display_locktime()
New function is added below display-panel
- void display_panel_lcd_on_direct(enum device_flags flags);
-> This replaces lcd_on_direct()
Change-Id: I5628e230ec0fcc9a0ff36b31966ffbda85d92d69
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Youngjae Cho [Fri, 16 Jun 2023 01:39:49 +0000 (10:39 +0900)]
display: Refactor display lock
Hide display_lock data, which was PmLockNdoe before, into display-lock.c.
And display-lock.c has changed to support and can be controlled only by
the below functions.
---------------------------------------------------------------------
Removed | Newly Added
---------------------------------------------------------------------
display_lock_add_pmlock_node | display_lock_request_lock
---------------------------------------------------------------------
- | display_lock_update_lock
---------------------------------------------------------------------
del_node | display_lock_release_lock
---------------------------------------------------------------------
delete_condition | display_lock_release_lock_all
---------------------------------------------------------------------
check_processes | -
---------------------------------------------------------------------
get_trans_cnodition | -
---------------------------------------------------------------------
makeup_trans_condition | -
---------------------------------------------------------------------
check_lock_state | display_lock_is_state_locked
---------------------------------------------------------------------
Change-Id: I82de53ecfbc4119bc6de5b030342859f8fb6ed9c
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Tue, 13 Jun 2023 07:50:59 +0000 (16:50 +0900)]
display: Make diaplay lock data private
Changed list name 'cond_head' to 'g_display_lock_list'. Previously, the
list had been exposed to another module using get_cond_head(). Remove
the function to protect the data from being accessed oustide of the
display-lock.c. Instead, the display-lock.c now provides services that
the other module has done using get_cond_head(). Currently, the only
below function has been added for display-misc.c.
- display_lock_print_lock_info()
All existing get_cond_head() has been replaced by proper functions.
Change-Id: I4e4603f44c6613d71bb0b1e05abe6d45ae4a39c5
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Tue, 13 Jun 2023 03:36:07 +0000 (12:36 +0900)]
display: Remove unused holdkeyblock code
Change-Id: I28ad71cca7b84f459adf333765ac213e6eb31929
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Yunhee Seo [Wed, 14 Jun 2023 01:54:25 +0000 (10:54 +0900)]
display: Relocate default_action()
For relocating default_action(), there are some changes.
1. Add device_ops_status getter/setter temporarily.
2. Add lcd on time update and calculation functions.
3. Remove state action functions from the display-plugin.
-> Since default_action() has relocated, these functions no longer need to exist.
New functions in the display
- void display_set_display_ops_status(enum device_ops_status dev_ops_status);
- int display_get_display_ops_status(enum device_ops_status *dev_ops_status);
-> device_ops_status is set during the display init, probe, exit...
New functions in the display-panel
- void display_panel_update_lcd_on_timeval(void);
- int display_panel_calculate_diff_time_between_lcd_on_direct_and_state_action(int *diff_time);
-> These functions update lcd_on time and caculate the time difference
between lcd_on_direct and do_state_action.
New function in the display-state-transition
- int display_state_transition_do_state_action(int timeout);
-> This function is usually called after the display state changed.
It handles the rest of the work for changed display state.
Change-Id: If6ccd5f5cbcae21ed87db473596bdc3c71ddb86f
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Youngjae Cho [Wed, 14 Jun 2023 06:38:34 +0000 (15:38 +0900)]
display: Remove unused killable-daemon code
Change-Id: Idffac4921c3b147ec3fced2525c92eb8e3444f52
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Tue, 13 Jun 2023 11:15:19 +0000 (20:15 +0900)]
input: Simplify input_plugin_init()/input_plugin_exit()
Change-Id: Ifaf1a2e359b8f639a05836e32ff351b58940ffae
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Chanwoo Choi [Tue, 13 Jun 2023 09:04:54 +0000 (09:04 +0000)]
Merge "display: Relocate lcd_on/off_procedure()" into tizen
Chanwoo Choi [Tue, 13 Jun 2023 09:04:52 +0000 (09:04 +0000)]
Merge "display: Relocate touch_event_blocked()" into tizen
Chanwoo Choi [Tue, 13 Jun 2023 09:04:50 +0000 (09:04 +0000)]
Merge "display: Remove lcd_on_expired()/stop_lock_timer()/check_lock_screen()" into tizen
Youngjae Cho [Mon, 12 Jun 2023 09:08:09 +0000 (18:08 +0900)]
input: Define plugin interface for input
Input plugin must implement interface provided by input-plugin-interface.h
with symbol name INPUT_PLUGIN_INTERFACE_SYMBOL. The input core dlopen()
and dlsym() with that symbol, initializing or exiting input plugin within
the deviced core execution.
Change-Id: Id279db971cb0351b609a022de02a51672242c0b6
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Yunhee Seo [Tue, 13 Jun 2023 02:00:03 +0000 (11:00 +0900)]
display: Relocate lcd_on/off_procedure()
lcd_on/off_procedure() rules are same in all plugins except wearable.
Thus, duplicated codes are removed and relocated to display-panel.
These functions are added below display-panel.
- void display_panel_lcd_on_procedure(int state, enum device_flags flag);
-> This replaces lcd_on_procedure(), it works to turn on lcd.
- void display_panel_lcd_off_procedure(enum device_flags flag);
-> This replaces lcd_off_procedure(), it works to turn off lcd.
- bool display_panel_is_lcd_on_state_broadcasted(void);
-> With this, It is possible to know if the lcd_on/off_procedure() done.
This is used as flag of lcd on/off process.
This function is added below display-plugin.
- int display_plugin_lcd_off_procedure(enum device_flags flag);
-> This is for wearable plugin, there is lcd_off_procedure() use case in the key-filter.c
Change-Id: I1a7f8268df4d45d0585fe7c8a93981cc7be4268c
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Mon, 12 Jun 2023 12:46:48 +0000 (21:46 +0900)]
display: Relocate touch_event_blocked()
touch_event_blocked() checks touch event blocking during lcd_on/off_procedure().
For relocating lcd_on/off_procedure(), touch_event_blocked() is also relocated.
This functions are added below display-misc.
- int display_misc_set_touch_event_blocked(bool blocked);
- bool display_misc_is_touch_event_blocked(void);
-> This replaces touch_event_blocked()
Change-Id: Icaa609ad4a4e168663dd85556dea2c448b5747bd
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Mon, 12 Jun 2023 11:43:41 +0000 (20:43 +0900)]
display: Remove lcd_on_expired()/stop_lock_timer()/check_lock_screen()
These functions are used when the EVENT_INPUT occurs from the below situation,
S_SLEEP/S_LCDOFF --> EVENT_INPUT --> S_NORMAL
check_lock_screen() checks lock_screen state, If lock_screen is not launched,
this adds timeout callback for lcd_on_procedure().
stop_lock_timer() removes callback from above description.
lcd_on_expired() is callback for lcd_on_procedure() after timeout.
Simply, that functions checks lock screen status, and then If lock screen is not launched,
go to lcd_on_procedure after timeout value.
However, according to the default_action code logic, it goes to lcd_on_procedure()
regardless of check_lock_screen().
Also, meaningless lcd_on_procedure() call occurs.
Thus, lcd_on_expired()/stop_lock_timer()/check_lock_screen() is removed.
Change-Id: Ie82889e951678260ac10e1b7c86546040aff3fc8
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Chanwoo Choi [Tue, 13 Jun 2023 02:28:12 +0000 (02:28 +0000)]
Merge "input: Remove unused code of input-dbus from plugin" into tizen
Youngjae Cho [Mon, 12 Jun 2023 08:03:04 +0000 (17:03 +0900)]
input: Remove unused code of input-dbus from plugin
Change-Id: I28af8d7611c138eab106b748fea3d9efc38b5e90
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Yunhee Seo [Wed, 7 Jun 2023 07:29:32 +0000 (16:29 +0900)]
display: state-transition: Relocate default_trans()
default_trans() was used for display state transition.
1. It gets next display state and checks if the state transition is possible or not.
2. And then, it updates old/current display state.
3. Finally, it goes to next state transition or default_action if possible.
These functions are added below display-state-transition.
- int display_state_transition_do_state_transition(enum state_t state, int evt_type);
-> This replaces default_trans()
- bool display_state_transition_is_display_state_support_transition(enum state_t state);
-> This function checks if state is support to do state transition related job.
For example,
1. checking state transition condition
2. do state transition
3. do state action
To check these, this function is added.
Change-Id: Icc58965838e30fde2871c1c69596ffbed43e60f2
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Thu, 8 Jun 2023 01:49:19 +0000 (10:49 +0900)]
display: state-transition: Relocate check_lcdoff_direct()
check_lcdoff_direct() is used to check if display state can go to S_LCDOFF.
All plugins follows same policy of this function.
Thus, this function is added below display-state-transition.
- bool display_state_transition_is_possible_to_go_lcdoff(void);
-> This replaces check_lcdoff_direct().
Also, new function is added below display-plugin.
- int display_plugin_config_get_dimming(int *dimming);
-> It gets dimming config value from the conf file.
To confirm going to S_LCDOFF state, dimming value must also be checked.
So, display_plugin_config_get_dimming() is added too.
Change-Id: I19545fa1d6e7592a938a24e0b130302d88d81e02
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Yunhee Seo [Wed, 7 Jun 2023 08:34:39 +0000 (17:34 +0900)]
display: state-transition: Relocate update_lcdoff_source()
update_lcdoff_source() is used for setting lcdoff reason.
This function is called when the display state goes to lcdoff state.
Same code was copied and used in all plugins.
Thus, this function is added below display-state-transition
int display_state_transition_update_lcdoff_reason(int source);
-> This function sets the lcdoff reason to VCONFKEY_PM_LCDOFF_SOURCE.
Change-Id: Idc857d4b52502612eaccb01373d984815806a153
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>