b1225b26 | 28-Oct-2022 |
Harvey.Wu <Harvey.Wu@quantatw.com> |
meson: Add meson and meson_option files
Tested: compile and run successfully
tests log using run-unit-test-docker.sh : 1/14 dbus_active_unittest OK 0.03s 2/14 dbus
meson: Add meson and meson_option files
Tested: compile and run successfully
tests log using run-unit-test-docker.sh : 1/14 dbus_active_unittest OK 0.03s 2/14 dbus_util_unittest OK 0.02s 3/14 json_parse_unittest OK 0.02s 4/14 pid_json_unittest OK 0.02s 5/14 pid_stepwisecontroller_unittest OK 0.03s 6/14 pid_fancontroller_unittest OK 0.04s 7/14 pid_thermalcontroller_unittest OK 0.03s 8/14 dbus_passive_unittest OK 0.05s 9/14 sensor_pluggable_unittest OK 0.02s 10/14 sensor_manager_unittest OK 0.02s 11/14 sensor_host_unittest OK 0.03s 12/14 sensors_json_unittest OK 0.01s 13/14 util_unittest OK 0.01s 14/14 pid_zone_unittest OK 0.04s
Ok: 14 Expected Fail: 0 Fail: 0 Unexpected Pass: 0 Skipped: 0 Timeout: 0
systemctl status phosphor-pid-control.service * phosphor-pid-control.service - Phosphor-Pid-Control Margin-based Fan Control Daemon Loaded: loaded (/lib/systemd/system/phosphor-pid-control.service; enabled; preset: enabled) Drop-In: /lib/systemd/system/phosphor-pid-control.service.d `-service-override.conf Active: active (running) since Fri 2018-03-09 04:36:30 PST; 1min 37s ago Process: 2561 ExecStartPre=/usr/bin/fan-table-init.sh (code=exited, status=0/SUCCESS) Main PID: 2633 (swampd) CGroup: /system.slice/phosphor-pid-control.service `-2633 /usr/bin/swampd
Mar 09 04:36:45 qbmc swampd[2633]: PID name: pwm 5 Mar 09 04:36:45 qbmc swampd[2633]: inputs: fan2_tachfan5_pwm, fan3_tachfan5_pwm, fan5_tachfan5_pwm, Mar 09 04:36:45 qbmc swampd[2633]: PID name: tray_dt PID Mar 09 04:36:45 qbmc swampd[2633]: inputs: tray_dt, Mar 09 04:36:45 qbmc swampd[2633]: pushing zone 2 Mar 09 04:36:45 qbmc swampd[2633]: PID Zone 2 max SetPoint 4200 requested by CPU0 PID fan0_tachfan4_pwm fan1_tachfan4_pwm fan2_tachfan5_pwm fan3_tachfan5_pwm fan4_tachfan4_pwm fan5_tachfan5_pwm Mar 09 04:36:45 qbmc swampd[2633]: pushing zone 1 Mar 09 04:36:45 qbmc swampd[2633]: PID Zone 1 max SetPoint 4200 requested by CPU1 PID fan2_tachfan2_pwm fan3_tachfan3_pwm Mar 09 04:36:45 qbmc swampd[2633]: pushing zone 0 Mar 09 04:36:45 qbmc swampd[2633]: PID Zone 0 max SetPoint 4200 requested by CPU0 PID fan0_tachfan0_pwm fan1_tachfan1_pwm
Signed-off-by: Harvey.Wu <Harvey.Wu@quantatw.com> Change-Id: I779fed7a5deef262a0e65d4eb00116072beb28e8
show more ...
|
3dcfd546 | 31-Oct-2022 |
Harvey Wu <Harvey.Wu@quantatw.com> |
Change folder name build to buildjson
- If change to use meson build, meson will automake build folder, and this will overwrite the origin folder and miss the buildjson files.
Signed-off-by: Ha
Change folder name build to buildjson
- If change to use meson build, meson will automake build folder, and this will overwrite the origin folder and miss the buildjson files.
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com> Change-Id: Idfc4852bf56ed8f6c04e1b4be78ce40e08539132
show more ...
|
a1ae4fa1 | 28-Oct-2022 |
Harvey.Wu <Harvey.Wu@quantatw.com> |
fix compile warning when meson build
- Fix compile warning: [-Werror=unused-variable], [-Werror=sign-compare] and deprecated INSTANTIATE_TEST_CASE_P
Signed-off-by: Harvey.Wu <Harvey.Wu@quantatw
fix compile warning when meson build
- Fix compile warning: [-Werror=unused-variable], [-Werror=sign-compare] and deprecated INSTANTIATE_TEST_CASE_P
Signed-off-by: Harvey.Wu <Harvey.Wu@quantatw.com> Change-Id: If8713f0b938cd5306bbe19a9078731db0c3667dc
show more ...
|
bcdeb83c | 15-Aug-2022 |
Brandon Kim <brandonkim@google.com> |
Add --strict-failsafe-pwm compile flag
This build flag is used to set the fans strictly at the failsafe percent when in failsafe mode, even when the calculated PWM is higher than failsafe PWM. Witho
Add --strict-failsafe-pwm compile flag
This build flag is used to set the fans strictly at the failsafe percent when in failsafe mode, even when the calculated PWM is higher than failsafe PWM. Without this enabled, the PWM is calculated and set to the calculated PWM the failsafe PWM, whichever is higher.
Added a unit test that can test this new build flag code path if the compile flag is defined.
Tested:
Verified on an internal machine that by adding the following to the bbappend:
EXTRA_OECONF:append = " --enable-strict-failsafe-pwm=yes"
With flag: ipmitool sensor list fan_pwm | 89.768
Without flag: ipmitool sensor list fan_pwm | 99.960
We can see that the fan pwm was limited to the failsafe percentage when in failsafe mode with the flag. Without the flag, it ran at 100%
Bug-Id: openbmc/phosphor-pid-control#17 Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: I72a1e5aab8d3e5b0e3716f0b3720d704a6f05008
show more ...
|
b228bc30 | 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_t
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ie36d234f4580029a7832a0cd179f3bb78a1a403f
show more ...
|
ccc8bb62 | 17-Feb-2022 |
Nirav Shah <nirav.j2.shah@intel.com> |
For each zone log sensor name with max setpoint
Add sensor name that has the maximum setpoint for a PID zone. Log a debug message when the sensor is changed. The name is also added to the log file f
For each zone log sensor name with max setpoint
Add sensor name that has the maximum setpoint for a PID zone. Log a debug message when the sensor is changed. The name is also added to the log file for each log record.
Tested: Override one CPU temperature sensor busctl set-property xyz.openbmc_project.CPUSensor /xyz/openbmc_project/sensors/temperature/DTS_CPU1 xyz.openbmc_project.Sensor.Value Value d 82 Observed log message: swampd[443]: PID Zone 0 max SetPoint 34.5546 requested by DTS_CPU1
Signed-off-by: Nirav Shah <nirav.j2.shah@intel.com> Signed-off-by: Zhikui Ren <zhikui.ren@intel.com> Change-Id: Ifc12cb9a106da1bf41dd35697210f74ba1b589db
show more ...
|
a4146eb1 | 01-Oct-2020 |
Josh Lehan <krellan@google.com> |
pid/zone: Restore PWM when fans returned to auto
This makes use of the improved write() interface, to allow the PID-loop-determined PWM to be restored, when the fan is returned to automatic mode.
W
pid/zone: Restore PWM when fans returned to auto
This makes use of the improved write() interface, to allow the PID-loop-determined PWM to be restored, when the fan is returned to automatic mode.
Without this fix, a fan set to manual mode, then manually set to a different speed, would not properly return to the correct speed, when transitioning back to automatic from manual.
This patch also adds a stub to allow the caller to learn the raw PWM value written as output, another useful write() interface improvement. Although not the topic of this change, it is included here, to avoid later patch conflicts.
Tested: I can now correctly toggle between automatic, and manual, fan control. Upon resuming automatic control, after a few seconds, the fan PWM is now properly restored, to what the PID loop wanted it to be at.
Signed-off-by: Josh Lehan <krellan@google.com> Signed-off-by: Jason Ling <jasonling@google.com> Change-Id: I46fc65d6b931755d51093ea475c64cf5e3e6bacb
show more ...
|
8f73ad76 | 06-Oct-2021 |
Alex.Song <zheng.song@intel.com> |
Make specific UNA sensors not trigger failsafe
By convention, sensors at some states like 'not present', 'power state not matching' are marked as 'unavailable' on dbus. At such states, some specific
Make specific UNA sensors not trigger failsafe
By convention, sensors at some states like 'not present', 'power state not matching' are marked as 'unavailable' on dbus. At such states, some specific sensors should not be considered as failed and trigger pid 'failsafe'.
A typical example is when a system is powered-off, its CPU/DIMM temp sensors are 'unavailable', these sensors should not be treated as 'failed' and trigger pid 'failsafe'. This is necessary for systems whose Fans will keep working when the CPU is off.
This feature is configurable per sensor (valid on thermal sensors). It can be enabled by setting the Pid controller option "InputUnavailableAsFailed" to 'false' when one configuring the PID module via entity-manager, or by setting the sensor option "unavailableAsFailed" to 'false' when one configuring the PID module via JSON. (These options are optional and default to 'true')
Tested: 1. On a Fan 'always-on' system, enabale this feature on CPU temp sensors, poweroff the system, 'unavailable' CPU temp sensors do not trigger the failsafe mode. 2. 'Unavailable' Fans still trigger the failsafe mode. 3. 'Unfunctional' or 'failed' sensors still trigger the failsafe mode.
Signed-off-by: Zheng Song <zheng.song@intel.com> Change-Id: I1dd1d76466f43e7dcf51c161c96714f1bcfae88d
show more ...
|
7a8d5a17 | 21-Oct-2020 |
Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> |
Fix regex in findSensors
swampd crashs while reading configuration. Root caused that it is introduced by incorrect finding sensors. For an example, when it searches 'Fan_1' for inputs, it finds thes
Fix regex in findSensors
swampd crashs while reading configuration. Root caused that it is introduced by incorrect finding sensors. For an example, when it searches 'Fan_1' for inputs, it finds these two sensors:
Fan_1 Pwm_PSU1_Fan_1
where 'Pwm_PSU1_Fan_1' is an unexpected search result, so it causes crash after printing out this message:
"sensor at dbus path [/xyz/openbmc_project/control/fanpwm/Pwm_PSU1_Fan_1] has an interface [xyz.openbmc_project.Control.FanPwm] that does not match the expected interface of xyz.openbmc_project.Sensor.Value"
To fix this issue, this commit modifies regex string in findSensors function. Unit test is updated to reflect the new behavior.
Tested: The crash was not observed. Updated unit test passed.
Signed-off-by: Zhikui Ren <zhikui.ren@intel.com> Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> Change-Id: I4e45fac3a3242a6f3655d6873fd63ef22fd0c4dd
show more ...
|
841931d2 | 24-Feb-2021 |
Hao Jiang <jianghao@google.com> |
Modify function signature for unit test.
sdbusplus changed the function signature of sd_bus_emit_properties_changed_strv. Modify unit test according.
Signed-off-by: Hao Jiang <jianghao@google.com>
Modify function signature for unit test.
sdbusplus changed the function signature of sd_bus_emit_properties_changed_strv. Modify unit test according.
Signed-off-by: Hao Jiang <jianghao@google.com> Change-Id: I372543425db822ad4c8c48b5f93a72f291d69d11
show more ...
|
1df9e879 | 08-Oct-2020 |
Patrick Venture <venture@google.com> |
drop struct keyword for non-packed objects
As a style decision, struct is often used with packed structures to indicate they are used like C-structs. Cleanup this codebase to not use the extra stru
drop struct keyword for non-packed objects
As a style decision, struct is often used with packed structures to indicate they are used like C-structs. Cleanup this codebase to not use the extra struct keyword throughout.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I2f83bb1989e4d1f2f843ba3e45fb82e04f0fa61c
show more ...
|
b8cfc642 | 07-Oct-2020 |
Patrick Venture <venture@google.com> |
dbus: move zone indexing to util
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ia6560a0e0f976dcf9f05004de68f74f5e313950b |
1a7c49f9 | 06-Oct-2020 |
Patrick Venture <venture@google.com> |
dbus: Move findSensors to dbus util
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I2ba4d3c430200eb58cb4364dcce694a080531846 |
8b4478cc | 06-Oct-2020 |
Patrick Venture <venture@google.com> |
dbus: add unit-tests for dbusutil: getSensorPath
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Iabb2df7a725da1b70cb6a907d19c451e7bba609d |
7a98c19a | 12-Aug-2020 |
Patrick Venture <venture@google.com> |
use ZoneInterface pointers where Dbus aspect not important
The implementation of the ZoneInterface used is the DbusPidZone, however using the ZoneInterface when the Dbus aspect is unimportant provid
use ZoneInterface pointers where Dbus aspect not important
The implementation of the ZoneInterface used is the DbusPidZone, however using the ZoneInterface when the Dbus aspect is unimportant provides for trivial support of other implementations.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I0ed87322904e7f87e5b5c8a50c01144f3d843a10
show more ...
|
597ebd67 | 11-Aug-2020 |
Patrick Venture <venture@google.com> |
s/PIDZone/DbusPidZone/g
Renamed PIDZone to DbusPidZone because this object builds in via inheritance a Dbus implementation of the Mode control interface.
Signed-off-by: Patrick Venture <venture@goo
s/PIDZone/DbusPidZone/g
Renamed PIDZone to DbusPidZone because this object builds in via inheritance a Dbus implementation of the Mode control interface.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ifc6c11db4952de5909f0e556c41ec25eee217408
show more ...
|
1a153794 | 11-Aug-2020 |
Patrick Venture <venture@google.com> |
pid/zone: split zone interface into its own header
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I8f516353ddf7777ec750549e748c96afa211ea6e |
9b93692d | 10-Aug-2020 |
Patrick Venture <venture@google.com> |
dbushelper: drop obsolete parameter from interface
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Idebae41e021f54c3670cc22aa6c784549a361c23 |
8729eb98 | 10-Aug-2020 |
Patrick Venture <venture@google.com> |
Make the dbushelper own its own bus handle.
The dbushelper implements an interface that should not be sdbusplus specific. By making the implementation own the sdbusplus aspects, an alternate impleme
Make the dbushelper own its own bus handle.
The dbushelper implements an interface that should not be sdbusplus specific. By making the implementation own the sdbusplus aspects, an alternate implementation can be swapped in.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I4109772499421e2e6497a0fcad663ebbd1210a7c
show more ...
|
aadb30dd | 10-Aug-2020 |
Patrick Venture <venture@google.com> |
move dbus helper interface into its own file
This is step 1 to improving the interface to be more generic and drop requirements on dbus.
Signed-off-by: Patrick Venture <venture@google.com> Change-I
move dbus helper interface into its own file
This is step 1 to improving the interface to be more generic and drop requirements on dbus.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I7835ea8242bfb7189cabc1a4084e5f84143d40f6
show more ...
|
a076487a | 08-Aug-2020 |
Patrick Venture <venture@google.com> |
sensors/zones: place in namespace and cleanup
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I527dbc8477a232945f696227a7b0b2adbee45175 |
cdd61349 | 07-Aug-2020 |
Patrick Venture <venture@google.com> |
Move the sensor utils into their own module
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I22f6a951921095660fd2be502e59a38161565a95 |
a83a3ecc | 04-Aug-2020 |
Patrick Venture <venture@google.com> |
update clang-format from Latest in docs
Updates the clang-format file and then applies it.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ia9faf13ce171f90bf07547efd781139bee23e8c7 |
0709e2f1 | 08-Jul-2020 |
James Feist <james.feist@linux.intel.com> |
Fix unit test
Now that scale is gone, reading should match the value written.
Change-Id: I63a3ec0dc50ee5eacc08b23d0669fa065961abd2 Signed-off-by: James Feist <james.feist@linux.intel.com> |
6b9f5999 | 10-Sep-2019 |
Patrick Venture <venture@google.com> |
conf: add ignoreDbusMinMax option
Add an optional field to the sensor configuration, s.t. it'll tell a dbus passive sensor to ignore the MinValue and MaxValue properties from dbus.
Signed-off-by: P
conf: add ignoreDbusMinMax option
Add an optional field to the sensor configuration, s.t. it'll tell a dbus passive sensor to ignore the MinValue and MaxValue properties from dbus.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ia6a8c802c2dc5bf41e5e860b21d7764cc09e6b6b
show more ...
|