platform/core/system/pass.git
7 years agopass: gov: Fix wrong description and remove specific resource name 63/113963/3
Chanwoo Choi [Thu, 9 Feb 2017 10:54:34 +0000 (19:54 +0900)]
pass: gov: Fix wrong description and remove specific resource name

This patch justs fixes the wrong description and remove the specific
resource name to improve the readability of comments on a text.

Change-Id: I0356b210a97f7325e2d13f7d10e7eab1669f3288
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: Remove the unneeded debug log 48/113948/3
Chanwoo Choi [Thu, 9 Feb 2017 10:23:45 +0000 (19:23 +0900)]
pass: Remove the unneeded debug log

This patch removes the uneeded debug log because this log is used
for only CPU resource. If there is error, pass_get_hotplug() function
will print the error message.

Change-Id: I3109398a2a6ffe33f348838200082cd0a26a6321
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: pmqos: Remove unused code 47/113947/1
Chanwoo Choi [Thu, 9 Feb 2017 06:28:48 +0000 (15:28 +0900)]
pass: pmqos: Remove unused code

This patch removes the unused code.

Change-Id: Ide74984d7a0160c458894f3d80851b40b8243f1e
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: gov: Rename struct pass_cpufreq_policy to pass_freq_policy 45/113945/1
Chanwoo Choi [Thu, 9 Feb 2017 10:12:15 +0000 (19:12 +0900)]
pass: gov: Rename struct pass_cpufreq_policy to pass_freq_policy

This patch renames 'struct pass_cpufreq_policy' to 'struct pass_freq_policy'
in order to remove the specific h/w dependency from name of structure.
This structure is used for all DVFS resources such as CPU, BUS and GPU.
- struct pass_cpufreq_policy cpufreq -> struct pass_freq_policy freq

Change-Id: I39560cc3f10846cd8f280b60eb8dbf78afb3e19c
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agohal: Make separate pass-hal-devel package 88/113288/1
Wook Song [Tue, 7 Feb 2017 05:37:03 +0000 (14:37 +0900)]
hal: Make separate pass-hal-devel package

This patch makes a separate package for pass-hal-devel. This package
includes header files to build the board-specific pass-hal packages.

Change-Id: Ia0581023a588ff7a1d39549c23a56268c808417d
Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agohal: Add define directive for BUFF_MAX to hal.h 87/113287/1
Wook Song [Tue, 7 Feb 2017 02:10:57 +0000 (11:10 +0900)]
hal: Add define directive for BUFF_MAX to hal.h

This patch moves the define directive for BUFF_MAX to the hal.h. The
directives in the other files related to the hal are removed. This patch
also inserts the include directive for this hal.h to the files, which
require BUFF_MAX.

Change-Id: Id6115ad79b0c43f64518fb2aabdacd04b3745e25
Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agohal: Add hal-log.h file to hal directory 86/113286/1
Wook Song [Tue, 7 Feb 2017 01:56:51 +0000 (10:56 +0900)]
hal: Add hal-log.h file to hal directory

This patch creates the hal-log.h file in the hal directory. This header
contains useful macros to display dlog messages and is used for the pass
hal.

Change-Id: I0cdd1c96c7c1d40aae2dc73715f9f71ac8c7a67b
Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agoshared: Fix warning messages due to LOG_TAG define 85/113285/1
Wook Song [Mon, 6 Feb 2017 03:57:40 +0000 (12:57 +0900)]
shared: Fix warning messages due to LOG_TAG define

This patch eliminates the following warning messages:
In file included from pass-0.0.1/src/shared/dbus.c:27:0:
pass-0.0.1/src/shared/log.h:23:0: warning: "LOG_TAG" redefined
  #define LOG_TAG "PASS"
  ^
In file included from /usr/include/dlog/dlog.h:34:0,
                 from pass-0.0.1/src/shared/log.h:22,
 from pass-0.0.1/src/shared/dbus.c:27:
/usr/include/dlog/dlog-internal.h:41:0: note: this is the
location of the previous definition
 #define LOG_TAG NULL

Change-Id: I072216c79a5daa883097601876cfff1f731ceaef
Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agoshared: Arrange common header file 84/113284/1
Wook Song [Mon, 6 Feb 2017 01:59:13 +0000 (10:59 +0900)]
shared: Arrange common header file

This patch removes unnecessary defines and macros from the common header
file in the shared directory.

Change-Id: Id7e6b0c132a9fc2bcec144d2f55fd836729d900a
Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agopass: pmqos: Fix bug of locked time 60/113060/2
Chanwoo Choi [Mon, 6 Feb 2017 02:00:59 +0000 (11:00 +0900)]
pass: pmqos: Fix bug of locked time

This patch fixes the bug of the wrong locked time.
On previous pass-pmqos.c show the current time
instead of the locked time.

- Before
UnLock 'AppLaunch' scenario for 'cpu0' resource (1799653344ms)
- After
UnLock 'AppLaunch' scenario for 'cpu0' resource (3001ms)

Change-Id: Iab24f788436604091058cc2bd085a088042bf8e0
Fixes: 8ddcc2d18db8 ("pass: Fix the build warnings")
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopmqos: Rename the pmqos filename from 'pmqos.conf' to 'pass-pmqos.conf' 52/113052/1
Chanwoo Choi [Sat, 4 Feb 2017 11:10:12 +0000 (20:10 +0900)]
pmqos: Rename the pmqos filename from 'pmqos.conf' to 'pass-pmqos.conf'

This patch just renames the file of pmqos configuration file
to keep the consistency of the format of pass configuration file.

Change-Id: Ib195e698c389ff5f044b8b3bad5cc27600ceb5ad
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopmqos: Change the 'PmqosScenario' to 'PassScenario' section name 51/113051/1
Chanwoo Choi [Sat, 4 Feb 2017 11:03:32 +0000 (20:03 +0900)]
pmqos: Change the 'PmqosScenario' to 'PassScenario' section name

This patch just changes the sectcion name from 'PmqosScenatio'
to 'PassScenario' in order to keep the consistency of property name
between pmqos.conf and pass-*.conf of each resource.

Second, this patch removes the unneeded 'PMQOS' section name
which doesn't include the any propeties.

Change-Id: I978be1ab5df3dec0213a9035a36fb9962df4339a
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: parser: Change 'limit_max_cpu' name to 'limit_min_cpu' 50/113050/1
Chanwoo Choi [Sat, 4 Feb 2017 10:48:11 +0000 (19:48 +0900)]
pass: parser: Change 'limit_max_cpu' name to 'limit_min_cpu'

The PASS uses the 'limit_max_cpu' as the minimum number of online cpu.
This name is not matched with the meaning of 'limit_max_cpu'.
So, this patch changes the name of 'limit_max_cpu' to 'limit_min_cpu'
to improve the readability of property in configuration files.

Change-Id: I35650f622ecf482606cdbbdf6c7c365582bace15
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agoshared: Unify the separate log.h to remove the duplicate header file 43/113043/4
Chanwoo Choi [Sun, 5 Feb 2017 23:47:13 +0000 (08:47 +0900)]
shared: Unify the separate log.h to remove the duplicate header file

This patch unifies the separate log.h header file and remove the duplicate
the log header file.

Change-Id: Id61e07a7a244070e1c139ce007c8a8118137321a
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agocore: Remove duplicate log header file 27/112827/4
Wook Song [Fri, 3 Feb 2017 03:42:49 +0000 (12:42 +0900)]
core: Remove duplicate log header file

This patch removes the duplicate log header file in the core directory.
From now, the only log header is the file in the shared directory.

Change-Id: I94d6cae273a7a123c3d65c503d6703d146322f51
Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agopass: conf: Update the supported sceanio list for each resource
Chanwoo Choi [Fri, 3 Feb 2017 01:36:23 +0000 (10:36 +0900)]
pass: conf: Update the supported sceanio list for each resource

This patch updates the all configuration files to add the supported scenaio
and the following nine scenarios are supported.
- AppLaunch
- AppLaunchHome
- BrowserJavaScript
- EmailScroll
- TizenStoreScroll
- CallLogScroll
- MyfilesScroll
- MessageScroll

Change-Id: I19c72a6607b725d86e6390f790bdbe0cdec575e7
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopmqos: Add new scenario name for MessageScroll/SIOP/UltraPowerSaving
Chanwoo Choi [Fri, 3 Feb 2017 00:51:16 +0000 (09:51 +0900)]
pmqos: Add new scenario name for MessageScroll/SIOP/UltraPowerSaving

This patch just adds the new scenario name as following:
- MessageScroll
- SIOP
- UltraPowerSaving

Change-Id: I7778fa6d50ce635e32fe0b996bd8fb6d3b160f0f
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agohal: Use proper header for dlog message display 98/112798/2
Wook Song [Fri, 3 Feb 2017 00:08:15 +0000 (09:08 +0900)]
hal: Use proper header for dlog message display

This patch changes the log header file used in hal to the proper ont for
dlog message display.

Change-Id: I8d20dad5e4447904f21c7a15911d358cb76baab7
Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agohal: Change the symbolic name of the HAL info 97/112797/2
Wook Song [Thu, 2 Feb 2017 23:27:41 +0000 (08:27 +0900)]
hal: Change the symbolic name of the HAL info

This patch changes the symbolic name of the HAL info from
TizenHardwareInfo to PassHalInfo. Accordingly, HAL_INFO_TAG is also
changed.

Change-Id: I8fca63caff647655c8ab562227897a94976b61fd
Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agopass: Change the usage of the term "hardware" 96/112796/2
Wook Song [Thu, 2 Feb 2017 23:02:33 +0000 (08:02 +0900)]
pass: Change the usage of the term "hardware"

This patch changes most of the usage of the term "hardware" to the usage
of the term "hal".

Change-Id: I2bab96ec6d77ae4a8058e30baf01c223e3856d80
Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agohal: Add macros for 16/32-bit tag generation 95/112795/2
Wook Song [Thu, 2 Feb 2017 11:55:32 +0000 (20:55 +0900)]
hal: Add macros for 16/32-bit tag generation

This patch adds several macros to generate 16-bit or 32-bit tags, which
can be used for identification variables.

Change-Id: Id633df8f784adf9c0f8d7528f49b35c5b51ab9ea
Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agopass: hal: Fix bug in resource name generation 94/112794/2
Wook Song [Thu, 2 Feb 2017 11:47:01 +0000 (20:47 +0900)]
pass: hal: Fix bug in resource name generation

This patch fixes a bug in the procedure of generating resource name.

Change-Id: I01505b7da21e32c843399317782b7fdd9aa54b90
Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agopass: conf: Add new configuration for bus/gpu's resource
Chanwoo Choi [Thu, 2 Feb 2017 08:35:31 +0000 (17:35 +0900)]
pass: conf: Add new configuration for bus/gpu's resource

This patch adds the new configuration file for bus/gpu's resource for TM2.
The configuration will move to pass-hal-(board name) package.
- pass-cluser2-bus0.conf
- pass-cluser3-bus1.conf
- pass-cluser4-gpu.conf

And this patch change the section name to remove the dependency
on specific h/w type as following:
- 'CpufreqLevel' -> 'Level'

In the 'Scenario(x)' section:
- 'cpufreq_min_level' -> 'min_level'
- 'cpufreq_max_level' -> 'max_level'

Change-Id: Ie11d713a30c4fab9193cebb1bab9863349487c86
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: pmqos: Show the resource name when lock/unlock the scenario
Chanwoo Choi [Thu, 2 Feb 2017 11:32:06 +0000 (20:32 +0900)]
pass: pmqos: Show the resource name when lock/unlock the scenario

This patch just shows the resource name when locking or unlocking
the scenario for debug.

For example,
Lock   'AppLaunch' scenario for 'cpu0' resource
Lock   'AppLaunch' scenario for 'cpu4' resource
Lock   'AppLaunch' scenario for 'soc:memory_bus@0' resource
Lock   'AppLaunch' scenario for 'soc:memory_bus@1' resource
Lock   'AppLaunch' scenario for '14ac0000.mali' resource

Change-Id: I5e2e990b6fd354f20c07b83ba5bb489e149178a0
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: pmqos: Rename the min/max level property of scenario section
Chanwoo Choi [Thu, 2 Feb 2017 11:18:20 +0000 (20:18 +0900)]
pass: pmqos: Rename the min/max level property of scenario section

This patch renames the min/max level property in 'Scenario(x)' section as
following:
- cpufreq_min_level -> min_level
- cpufreq_max_level -> max_level

It means that if 'Scenario(x)' section contains the minimum/maximum level
property according to each scenario. The renamed property don't depend on
the any specific h/w resource.

Change-Id: I61ec570a5d607bacc63270d0a72a5196057ee392
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: gov: Add new pass_gov_dummy governor for unmonitored resources
Chanwoo Choi [Thu, 2 Feb 2017 10:48:14 +0000 (19:48 +0900)]
pass: gov: Add new pass_gov_dummy governor for unmonitored resources

This patchs add the new 'pass_gov_dummy' governor which doesn't contain
the govenory policy to decide the next level. Some resource don't need
to monitor the resource status peridically and to decide the next level
according to the utilization. This dummy governor just initialize the
resource.

Change-Id: Icdf25902e9656ebb6587f430b30ee8c21475de47
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: gov: Don't create the timer if timeout is zero
Chanwoo Choi [Thu, 2 Feb 2017 10:59:14 +0000 (19:59 +0900)]
pass: gov: Don't create the timer if timeout is zero

This patch doesn't create the timer if timeout is zero.
if timerout of timer is zero, it means that this governor
don't need to use the timer for monitoring the resource status.

Change-Id: Ie56c5330b3ac3089a254ca067cb22c940ae3b234
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: gov: Add new 'limit_min_freq' property in 'Level' section
Chanwoo Choi [Thu, 2 Feb 2017 10:18:42 +0000 (19:18 +0900)]
pass: gov: Add new 'limit_min_freq' property in 'Level' section

This patch adds the new 'limit_min_freq' property in 'Level' section.
It means that if 'Level(x) section' contains the 'limit_min_freq' property,
the governor set the minimum frequency for DVFS h/w resource such as
cpu, memory bus and gpu.

Change-Id: I57f49ad47fa5ebf3e15aee24a448c2b47914779e
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: parser: Modify the section name from 'CpufreqLevel' to 'Level'
Chanwoo Choi [Thu, 2 Feb 2017 09:55:01 +0000 (18:55 +0900)]
pass: parser: Modify the section name from 'CpufreqLevel' to 'Level'

This patch change the section name to remove the dependency on
specific h/w type as following:
- 'CpufreqLevel' -> 'Level'

Change-Id: I4d5f5209e1156655e5364ea0f5264e7de0c3082c
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: Fix information of dbus interface
Chanwoo Choi [Thu, 2 Feb 2017 05:39:46 +0000 (14:39 +0900)]
pass: Fix information of dbus interface

This patch fixes the inappropriate information of dbus interface as following:
- Use the 'PASS' prefix instead of 'DEVICED'
- Remove the separate 'DEVICED_PATH_PASS' dbus interface
- Remove the 'DEVICED_PATH_CORE" dbus interface and method
- Use PASS_PATH_CORE dbus to start and stop the pass governor

Change-Id: Ib4a735bbe3ed8136a6be9b225f5feaa3c068c14b
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: gov: Remove global variable of pmqos
Chanwoo Choi [Thu, 2 Feb 2017 04:54:01 +0000 (13:54 +0900)]
pass: gov: Remove global variable of pmqos

This patch removes the the global variable of pmqos. Instead, the callback
funtcion of each notifier use the 'user_data" provided by device-notifier lib.

And, this patch adds the simple description for callback function of notifier.

Change-Id: I509a94f3e089051eec1c0aa120fffed0289b1153
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agocore: device-notifier: Remove wrong error handling code
Chanwoo Choi [Thu, 2 Feb 2017 04:56:55 +0000 (13:56 +0900)]
core: device-notifier: Remove wrong error handling code

The previous register_notifier() checks whether the function pointer
of callback is already registered or not. But it is wrong because
the different receivers are able to use the same callback function
with the different own user_data.

Change-Id: If9f4a80e91c48f7964f05009dc6ee7098d72f9cb
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agocore: device-notifier: Support user_data parameter for receiver
Chanwoo Choi [Thu, 2 Feb 2017 04:39:33 +0000 (13:39 +0900)]
core: device-notifier: Support user_data parameter for receiver

The current device-notifier didn't pass ther separate 'void *user_data'
parameter on callback function. So, must need global variables to share
the information. So, This patch supports the 'void *user_data' parameter
for device-notifier.

[Detailed new prototype for register_notifier()]
Before:
- int register_notifier(status, *func);
- int (*func)(void *data));

After:
- int register_notifier(status, *func, void *user_data);
- int (*func)(void *data, void *user_data));

Change-Id: Iec96cc18413a34a14f1a57585b0672548df34c0b
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: Remove unneeded debug messages
Chanwoo Choi [Thu, 2 Feb 2017 03:22:31 +0000 (12:22 +0900)]
pass: Remove unneeded debug messages

This patch removes the unnedded debug message.

Change-Id: Id1d7d4845ab52393e410f4e5ab968d5afba786a4
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopmqos: Rename exported function name and removes unneeded prefix
Chanwoo Choi [Thu, 2 Feb 2017 01:58:11 +0000 (10:58 +0900)]
pmqos: Rename exported function name and removes unneeded prefix

This renames the expoerted function name of pmqos as following:
- get_pmqos_table -> pmqos_get_scenario()
- release_pmqos_table() -> pmqos_put_scenario()

And this patch removes the unneeded prefix ('cpu') because
the scenario does not depend on the specific h/w resource.
The scenario name indicate ths specific situation or status
of user-space.

Change-Id: Iaabab609f00206a5d879a3f41475f97a99534b3c
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: Specify module name on the top of each module
Chanwoo Choi [Thu, 2 Feb 2017 01:41:49 +0000 (10:41 +0900)]
pass: Specify module name on the top of each module

This patch specifies the corerct module name on the top of each module
to improve the readability for each pass module.

Change-Id: Iff2880033bbb0809a512d188c3983c669f225596
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: Rename governor module to pass-gov and add governor helper functions
Chanwoo Choi [Thu, 2 Feb 2017 01:33:56 +0000 (10:33 +0900)]
pass: Rename governor module to pass-gov and add governor helper functions

This patch renames the governor module's filename from pass-core.c
to pass-gov.c beceause pass-core.c includes the governor functions.

And it adds new following governor functions. On previous, other module
,such as pass.c, access the field of struct pass_governor direclty without
any wrapper function.
- int pass_governor_init(struct pass_policy *);
- int pass_governor_exit(struct pass_policy *);
- int pass_governor_update(struct pass_policy *, enum pass_gov_state);

Change-Id: I772edc602325409faf0b747cc741be5d83151c23
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: Replace hal API to handle the h/w resource
Chanwoo Choi [Wed, 1 Feb 2017 08:41:34 +0000 (17:41 +0900)]
pass: Replace hal API to handle the h/w resource

This patch uses the hal interface function to handle the h/w resource
instead of using the legacy pass-plugin.c which access the h/w interface
without hal interface.

Change-Id: If155cb811b342fb3fa3e23cc11f36a0defbc6420
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: Use calloc to initialize the memory instead of malloc
Chanwoo Choi [Wed, 1 Feb 2017 08:29:01 +0000 (17:29 +0900)]
pass: Use calloc to initialize the memory instead of malloc

This patch just uses the calloc() to initialize the memory with zero
insead of malloc.

Change-Id: I1b45cb10101b5e79bad07d73b952a0af31b868b5
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: Redesign the pass in order to use the resource model
Chanwoo Choi [Tue, 24 Jan 2017 07:12:33 +0000 (16:12 +0900)]
pass: Redesign the pass in order to use the resource model

The previous pass didn't consider adding h/w resource. It makes the pass
to add new h/w resource. So, This patch redesigns the pass in order to
use the resource model.

The struct pass_resource includes the all information for each h/w resource.
Each h/w resource is working independently between resources.

[Detailed description for struct pass_resource]
struct pass_resource
- struct pass_conf_data: the parsed data from configuration file from pass.conf.
- struct pass_policy   : the policy data to handle the h/w resource.
- struct pass_resource : the resource instance of each h/w resource
  from pass_get_hw_info().

Change-Id: Idf48c318223e303cdebbf9728222315d5a4c812e
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: Add new helper function to handle the h/w resource through hal interface
Chanwoo Choi [Mon, 23 Jan 2017 10:22:24 +0000 (19:22 +0900)]
pass: Add new helper function to handle the h/w resource through hal interface

This patch adds new helper and wrapper function to handle the hal
interface. The pass core have to call this function to control
the value of each h/w resource.

- Load the h/w resource:
int pass_get_resource(struct pass *pass);

- Following functions to handle the DVFS resource:
int pass_get_curr_governor(struct pass_resource *res, char *governor);
int pass_set_curr_governor(struct pass_resource *res, char *governor);
int pass_get_curr_freq(struct pass_resource *res);
int pass_get_min_freq(struct pass_resource *res);
int pass_set_min_freq(struct pass_resource *res, int freq);
int pass_get_max_freq(struct pass_resource *res);
int pass_set_max_freq(struct pass_resource *res, int freq);
int pass_get_up_threshold(struct pass_resource *res);
int pass_set_up_threshold(struct pass_resource *res, int up_threshold);

- Following functions to handle the CPU Hotpulg resource:
int pass_get_online_state(struct pass_resource *res, int cpu);
int pass_set_online_state(struct pass_resource *res, int cpu, int on);

- Following functions to handle the TMU resource:
int pass_get_temp(struct pass_resource *res);
int pass_get_policy(struct pass_resource *res, char *policy);

* DVFS (Dynamic Voltage & Frequency Scaling)
* TMU (Thermal Management Unit)

Change-Id: I03cbc7dc3debc787d4f4a5cb777db9f7e4bd8f3f
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: hal: Add new hal interface to handle the h/w resource
Chanwoo Choi [Mon, 23 Jan 2017 01:22:40 +0000 (10:22 +0900)]
pass: hal: Add new hal interface to handle the h/w resource

The pass handle the h/w resources such as CPU, Memory Bus and GPU.

This patch adds the new HAL (Hardware Abstract Layer) interface
to support the pass on all h/w boards. This patch defines the
three type of resources.
- struct pass_resrouce_cpu for CPU h/w.
- struct pass_resrouce_bus for Memory bus h/w.
- struct pass_resrouce_gpu for GPU h/w.

The hal-cpu-example.c is just example to help the implementation
of he real HAL.

Change-Id: I09035678cdeac185a67b79492176986f5e01e23b
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: Remove unused structure definitions
Chanwoo Choi [Tue, 17 Jan 2017 10:53:29 +0000 (19:53 +0900)]
pass: Remove unused structure definitions

This patch removes the unused structure definitions.

Change-Id: I7b68bce746f6410bcf2d91df671e9318bbf6e7d1
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: gov: Fix bug radiation governor when the number of load entry is zero
Chanwoo Choi [Thu, 19 Jan 2017 09:46:29 +0000 (18:46 +0900)]
pass: gov: Fix bug radiation governor when the number of load entry is zero

The radiation governor uses the history of CPU utilization
in order to decide the proper pass level. If CPU idle time
is over period time (default 400ms), there is no any history
of cpu utilization. If the number of history is zero,
the governor have to return with previous pass level.

So, this patch handle the error case if the number
of load entry is zero.

Change-Id: If32d334b21059a5c889c866a0e70f41181133ebd
Reported-by: Eunki Hong <eunkiki.hong@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: Remove unneeded pass-util.h
Chanwoo Choi [Thu, 19 Jan 2017 02:52:16 +0000 (11:52 +0900)]
pass: Remove unneeded pass-util.h

This patch removes the unneeded pass-util.h. Instead, pass-core.c
includes "core/log.h" header file.

Change-Id: Ide03d8159575fdae9ce4c178742a6b544b0c4b4b
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: Remove unused code and modify the prefix for pass
Chanwoo Choi [Mon, 16 Jan 2017 07:27:12 +0000 (16:27 +0900)]
pass: Remove unused code and modify the prefix for pass

The pass is developed based on deviced source. There are the specific
features and codes for deviced. This patch removes the unused
features and if there is the used feature for pass, this patch
modifies the naming prefix for pass.

Change-Id: Id078a9070e30b2a1ee87e374bbceaf731ebc7036
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: Split out parser feature from plugin module
Chanwoo Choi [Thu, 12 Jan 2017 11:27:38 +0000 (20:27 +0900)]
pass: Split out parser feature from plugin module

This patch split out the parser feature to parse the configuration
from plugin module because plugin module will be removed and renames
the pmqos-plugin.c to pmqos-parser.c.

Change-Id: Iba89a1293678714114846234c303b5e36570408a
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: Fix the build warnings
Chanwoo Choi [Thu, 12 Jan 2017 08:27:51 +0000 (17:27 +0900)]
pass: Fix the build warnings

This patch fixes the build warnings about following issues:
- pass-plugin.c: warning: unused variable 'level' [-Wunused-variable]
- pass-pmqos.c: warning: implicit declaration of function 'get_time_ms' [-Wimplicit-function-declaration]
- pass-pmqos.c: warning: unused variable 'locked_time' [-Wunused-variable]

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: conf: Modify the pass_compatible name to support TM2 board
Chanwoo Choi [Mon, 9 Jan 2017 07:16:20 +0000 (16:16 +0900)]
pass: conf: Modify the pass_compatible name to support TM2 board

This patch modifies the pass_compatible name for TM2 board as following:
- "draco" -> "tm2" : tm2 is official name for TM2 board.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopmqos: Make PMQoS feature work using EDbus
Wook Song [Thu, 22 Dec 2016 04:41:00 +0000 (13:41 +0900)]
pmqos: Make PMQoS feature work using EDbus

This patch makes the PMQoS feature work on PASS. In order to receive
DBus method call messages related to the PMQoS scenarios, the PMQoS
feature currently relies on EDbus (EFL D-BUS wrapper).

Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agopass: Fix bug in initializing pass_table
Wook Song [Tue, 20 Dec 2016 06:52:57 +0000 (15:52 +0900)]
pass: Fix bug in initializing pass_table

This patch fixes following issue:

I/PASS    (28120): pass-core.c: pass_governor_core_timer(453) > Change
the period of governor timer from 0.400000s to
28684447001453215729166007156692003357432084613448073247205944301959706
06648226909257285691507618049531741760802643920937127227407207970809900
37736192679308348770424336630500142586913989268043480145518076661186128
31491039131628038411330434453835782245089155343230483828779371137532403
45772032.000000s

TODO: This is a temporary patch, which uses a dangerous way to
initialize the dynamically allocated structure array, pass_table.

Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agopass: Initialize the policy->governor instance
Chanwoo Choi [Tue, 6 Dec 2016 05:37:46 +0000 (14:37 +0900)]
pass: Initialize the policy->governor instance

This patch initializes the policy->governor instance to prevenet
the starting issue because policy->governor might have the garbage data.
It cause that pass could not start.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: conf: Modify the min_level of cluster0/1 from 0 to 4 for performance
Chanwoo Choi [Fri, 19 Aug 2016 05:54:05 +0000 (14:54 +0900)]
pass: conf: Modify the min_level of cluster0/1 from 0 to 4 for performance

Change-Id: I1ebaff9aaea369ca411c88f7b2c5277b43d3e552
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopmqos: conf: Add configuration file including the supported scenario list
Chanwoo Choi [Wed, 5 Oct 2016 05:21:15 +0000 (14:21 +0900)]
pmqos: conf: Add configuration file including the supported scenario list

This patch adds the pmqos.conf file which include the supported scenario list.

Change-Id: I331d55a8ce7453a6a9f4c59f961b9a86cf63f970
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
[wook16.song: Make git-am work without any failure]
Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agopass: conf: Add configuration file for TM2
Chanwoo Choi [Fri, 1 Jul 2016 07:32:54 +0000 (16:32 +0900)]
pass: conf: Add configuration file for TM2

This patch adds the TM2's configuration file which include the detailed
PASS level and scenario information.

Change-Id: Ibb07b584d30c4020385a22f20cf4da6a09773d57
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
[wook16.song: Make git-am work without any failure]
Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agopmqos: Fix the build error to remove the non-supported notifier
Chanwoo Choi [Mon, 4 Jul 2016 05:22:33 +0000 (14:22 +0900)]
pmqos: Fix the build error to remove the non-supported notifier

This patch fixs the build error to removethe non-supported notifier
and funcitons.

Change-Id: I70885660d48dc3a7a67e5d62b79828cbae0f04fa
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopmqos: Add the support the PMQOS feature to handle the resource according to scenario
Jiyoung Yun [Mon, 4 Jul 2016 03:52:26 +0000 (12:52 +0900)]
pmqos: Add the support the PMQOS feature to handle the resource according to scenario

This patch adds the support the PMQOS feature to handle the h/w resource
according to scenario. This code move from Tizen 2.4 branch to Tizen 3.0 branch.

Change-Id: Id9c48b7e3b101f00840c31ff37a694f4a32dbd21
Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
[cw00.choi: Move the code from Tizen 2.4 from Tizen 3.0]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
[wook16.song: Make git-am work without any failure]
Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agocore: Add DD_LIST_SORT macro
Chanwoo Choi [Mon, 4 Jul 2016 04:27:26 +0000 (13:27 +0900)]
core: Add DD_LIST_SORT macro

This patch adds the DD_LIST_SORT macro to support the sorting.

Change-Id: Id435a884e14e731b2f4bf7e96ca9bd028571aac0
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: plugin: Add the get/set_freq for CPU/BUS/GPU frequency h/w resource
Chanwoo Choi [Wed, 29 Jun 2016 07:42:26 +0000 (16:42 +0900)]
pass: plugin: Add the get/set_freq for CPU/BUS/GPU frequency h/w resource

This patch adds the funcions to handle the h/w resource of CPU, Memory bus
and GPU frequency. This functions can handle the maximum/minimum/current
frequency of h/w resource.

Change-Id: Icabbc94b94863e109fab2eb664ac4f703da0dc7e
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: pmqos: Split out the pm_qos feature from core driver
Chanwoo Choi [Mon, 20 Jun 2016 11:50:32 +0000 (20:50 +0900)]
pass: pmqos: Split out the pm_qos feature from core driver

This patch split out the pm_qos feature from the core driver of PASS.
The pass-pmqos.c handles the h/w resource according to user scenario.

Change-Id: Iab5880696838394d4c03b8458b910665e9dbe759
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: Remove the unused header file
Chanwoo Choi [Thu, 9 Jun 2016 10:20:38 +0000 (19:20 +0900)]
pass: Remove the unused header file

This patch removes the pass-hotplug.h header file because it is not used.

Change-Id: I8d73e880baeec94d4b9a4c0d08de765ec2b14f48
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: Fix the build warning
Chanwoo Choi [Thu, 9 Jun 2016 08:04:08 +0000 (17:04 +0900)]
pass: Fix the build warning

This patch fixes the all of build warning.

Change-Id: I2425c949093735e9554be1bdad43bb3a7017513d
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: gov: Fix the bug of radiation governor
Chanwoo Choi [Wed, 4 May 2016 11:45:49 +0000 (20:45 +0900)]
pass: gov: Fix the bug of radiation governor

This patch fixes the bug of radiation governor

Change-Id: Iba76f9646149871770a81f8aff39e39b6f673c47
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: plugin: Initialize the pass_table and add debug messages
Chanwoo Choi [Thu, 28 Apr 2016 12:00:18 +0000 (21:00 +0900)]
pass: plugin: Initialize the pass_table and add debug messages

This patch initializes the pass_table and add debug messages.

Change-Id: Ic9ee59d2f05d309b7f6502c30b14e8482be76d63
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: core: Remove the min_freq setting when turn on/off CPUs
Chanwoo Choi [Wed, 4 May 2016 13:11:37 +0000 (22:11 +0900)]
pass: core: Remove the min_freq setting when turn on/off CPUs

This patch removes the min_freq setting to reduce the high power-consumption
when the state of CPUs are changed.

Change-Id: I8bef77cd12da0cced85b8503e33e530eb506bcb7
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: Add the multi-cluster support for big.LITTLE core
Chanwoo Choi [Tue, 30 Jun 2015 09:59:23 +0000 (18:59 +0900)]
pass: Add the multi-cluster support for big.LITTLE core

This patch add the multi-cluser support for big.LITTLE core because previous
PASS (Power Aware System Service) only have supported the only one cluster.

Change-Id: Ib84ddce38ea4b54f25745e9b889f332217bd2ec4
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: Add PASS (Power Aware System Service) to support the power management
Chanwoo Choi [Thu, 2 Jun 2016 04:22:40 +0000 (13:22 +0900)]
pass: Add PASS (Power Aware System Service) to support the power management

This patch adds the support for PASS (Power Aware System Service) which is used
for power management of Tizen platform. PASS uses the CPU utilization, current CPU
frequency and the number of running tasks to determine the required system
resource currently. PASS has the two governors as following:
- Step governor
- Radiation governor

Change-Id: I3c43978701a0ebe02fab7c5b50847e57cc345090
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
[wook16.song: Make git-am work without any failure]
Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agonotifier: Add DEVICE_NOTIFIER_PMQOS type for PASS
Chanwoo Choi [Thu, 2 Jun 2016 03:04:05 +0000 (12:04 +0900)]
notifier: Add DEVICE_NOTIFIER_PMQOS type for PASS

This patch adds the DEVICE_NOTIFIER_PMQOS notifier because PASS uses the
DEVICE_NOTIFIER_PMQOS to support scenario-based power management.

Change-Id: If570675b55a029b37615ce186e0f8daf9aa9ca80
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agopass: Eliminate RPM pacakage dependency of main daemon
Wook Song [Wed, 23 Nov 2016 02:33:20 +0000 (11:33 +0900)]
pass: Eliminate RPM pacakage dependency of main daemon

This patch elminates the RPM package dependency of the main daemon,
currently named pass-X.X.X-X.armv7l.rpm, on the tool for convenience of
the test.

7 years agopass: Change log tag
Wook Song [Tue, 22 Nov 2016 05:21:12 +0000 (14:21 +0900)]
pass: Change log tag

This patch replace the log tag, which is DEVICED, with PASS.

Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agopass: Modify unit configuration file for systemd
Wook Song [Tue, 22 Nov 2016 02:24:50 +0000 (11:24 +0900)]
pass: Modify unit configuration file for systemd

This patch modifies the unit configuration file (normally, the file name
of each systemd unit configuration file ends in .service) to register
the pass daemon to systemd.

Note: at this point, you can build and run this package.

Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agopass: Remove time module
Wook Song [Mon, 21 Nov 2016 07:38:39 +0000 (16:38 +0900)]
pass: Remove time module

This patch removes the time module (time/time-handler.c), which is
currently not referenced by any other modules or the core.

Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agopass: Clean up APIs for removed modules
Wook Song [Mon, 21 Nov 2016 07:20:24 +0000 (16:20 +0900)]
pass: Clean up APIs for removed modules

This patch cleans up the APIs of deviced. Since the modules which are
no longer required by PASS are excluded from the package, APIs that
correspond to these modules are removed.

Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agopass: Remove led module
Wook Song [Mon, 21 Nov 2016 07:09:12 +0000 (16:09 +0900)]
pass: Remove led module

This patch removes the led moudule of deviced.

Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agopass: Remove unnecessary modules
Wook Song [Mon, 21 Nov 2016 05:48:00 +0000 (14:48 +0900)]
pass: Remove unnecessary modules

This patch removes the dispaly, extcon, and power modules of deviced and
applies change 24b34852276fd4d6872e7d6d32387d8d4f8efdf7 ("power: systemd
dbus method and signal are used to check if booting is done") of
deviced to pass. Several dependencies between the core and these modules
are also eliminated.

Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agopass: Remove haptic and touchscreen modules
Wook Song [Mon, 21 Nov 2016 02:09:45 +0000 (11:09 +0900)]
pass: Remove haptic and touchscreen modules

PASS does not require the haptic and touchscreen modules of deviced.
Since there is no dependency between the core and these modules, this
patch removes the haptic and touchscreen moudlues without any changes in
src/core.c. CMakeLists.txt and packaging/pass.spec are slightly
modified and several files (scripts/deviced-vibrator.conf and
systemd/deviced-vibrator.service), which are required by the haptic
module, are deleted.

Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agopass: Remove block module and related features
Wook Song [Fri, 18 Nov 2016 07:35:51 +0000 (16:35 +0900)]
pass: Remove block module and related features

This patch removes the block module, which is not required for pass.
Several features related to the block module including
TIZEN_FEATURE_BLOCK_SET_PERMISION and block_tmpfs are also eliminated as
well.

Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agolibpass: Remove libpass (libdeviced of deviced)
Wook Song [Fri, 18 Nov 2016 06:47:39 +0000 (15:47 +0900)]
libpass: Remove libpass (libdeviced of deviced)

This patch removes libpass packages, which were libdeviced of deviced.
These packages are required to build devicectl. Since devicectl has been
removed, there is no reason to remain these packages at this point.

Now, when the building is successfully done, you can find only following
packages as the results:

- pass-0.0.1-1.armv7l.rpm
- pass-debuginfo-0.0.1-1.armv7l.rpm
- pass-debugsource-0.0.1-1.armv7l.rpm

Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agopass: Remove all usb-related modules and features
Wook Song [Fri, 18 Nov 2016 06:06:46 +0000 (15:06 +0900)]
pass: Remove all usb-related modules and features

This patch mainly removes usb (both client and host) modules, which are
not necessary for pass. Several debug features using usb are also
removed.

Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agodevicectl: Remove devicectl
Wook Song [Fri, 18 Nov 2016 04:23:19 +0000 (13:23 +0900)]
devicectl: Remove devicectl

This patch removes devicectl, which is a helper tool for deviced. When
the stable version of pass is ready and available, it will be refactored
to support pass.

Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agopass: Remove tzip module
Wook Song [Fri, 18 Nov 2016 02:18:50 +0000 (11:18 +0900)]
pass: Remove tzip module

Since PASS does not require the tzip module of deviced, src/tzip is
removed.

Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agopass: Remove battery and ir modules
Wook Song [Fri, 18 Nov 2016 01:39:46 +0000 (10:39 +0900)]
pass: Remove battery and ir modules

PASS does not require the battery and ir modules of deviced. The
src/battery and src/ir directories are deleted. In order to apply these
changes, CMakeLists.txt and packaging/pass.spec files are also modified.

Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agopass: Change names of project and daemon to "pass"
Wook Song [Fri, 18 Nov 2016 00:27:53 +0000 (09:27 +0900)]
pass: Change names of project and daemon to "pass"

This patch simply changes names of this project and the main daemon to
"pass". When the packages are successfully built, you can find the
following files as the results:

- libpass-0.0.1-1.armv7l.rpm
- libpass-devel-0.0.1-1.armv7l.rpm
- pass-debuginfo-0.0.1-1.armv7l.rpm
- pass-tools-0.0.1-1.armv7l.rpm
- libpass-debuginfo-0.0.1-1.armv7l.rpm
- pass-0.0.1-1.armv7l.rpm
- pass-debugsource-0.0.1-1.armv7l.rpm
- pass-tools-debuginfo-0.0.1-1.armv7l.rpm

Note: although those packages can be built without any errors, you
should not install them to your target device since it may cause
conflict with the existing deviced.

Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agopass: Fork from deviced
Wook Song [Thu, 17 Nov 2016 04:21:15 +0000 (13:21 +0900)]
pass: Fork from deviced

This patch adds a bunch of files forked from deviced. In order to make
pass work as a separte systemd daemon, we start from the specific
snapshot of deviced.

Originates from:

ssh://review.tizen.org:29418/platform/core/system/deviced
(branch: accepted/tizen_3.0_mobile)
commit: 41f1d655807502f88027873a4509a50180fb1196

Note: since some of files including CMakeLists.txt,
packaging/deviced.spec are excluded for the technical reasons, you
cannot build it as deviced.

Signed-off-by: Wook Song <wook16.song@samsung.com>
7 years agoInitial empty repository master
Tizen Infrastructure [Mon, 16 Jan 2017 09:28:33 +0000 (01:28 -0800)]
Initial empty repository