| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On start dbus configuration will look for profiles. If any exist it
will attempt to find the thermal mode interface:
https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Control/ThermalMode.interface.yaml
This can be anywhere on d-bus, tested placement was in settingsd. Based
on the selected profile(s) it will create a 'whitelist' of controllers,
and will remove any not in that whitelist.
Tested-by: Added and removed curves based on acoustic or
performance mode
Change-Id: I9e83a77d71d7fcfe691cc4beb700b8a67024c64f
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
Put rest of conf.hpp in the conf namespace. This is
largely a sed replace, and wrapping from_json in
conf namespace as it failed to build.
Change-Id: I9fe5c7b2fface44618c43af2367035afc39bcb64
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
| |
The minThermalRPM is only an RPM by the fact that
that is the units of the PID. As the PID units can
be anything, change this to minThermalOutput to allow
for different units (i.e. percent).
Change-Id: Ic53fef1159ade5a413e5d519d407947f3023d8e3
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For tachs it is beneficial to deal in percent so that
multiple controllers can be used with different fan
types without having to recalculate. This starts using
the unused min and max fields to be able to scale readings.
Since max and min are commonly on the value interface, the
special value of <int64_t>::lowest() allows these to be gathered
from dbus instead of having to enter them manually.
Tested-by: Moved pid control to percent and printed
outputs
Change-Id: I9496eb92a18b68a7cd7f034d41d40ef5175c6974
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add a stepwise ceiling type, this is used as a
upper clipping curve to limit the max output based
on a temperature sensor. This is commonly used for
quiet fan mode where CPU throttling is allowed to
preserve a max fan noise.
Change-Id: I181d5913c92e5498a34e6d3f67cf99b67471479c
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
| |
Setting this value to zero so we can limit d-bus
traffic and not send updates unless there is one.
Tested-by: fan control worked normally after
Change-Id: Ie8bd7fbfd86c1643ea5bf76cf49a087923db0ccf
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Initialize cache on start adds all sensors to failsafe.
Without being able to hit the removal in updatesensors
this causes the system to go into failsafe and never
remove.
Closes #8
Change-Id: I83f495adb1475abc27dba1734022f28d89e03d8f
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
| |
Fixup spelling mistake for configuration field name.
Change-Id: I92d0af06f4e15f4408dd10f0dd9cd71099b77f4f
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revert the removal of the /100 because that caused
90% to be passed as 90 instead of .9. To counter-act
this multiply the stepwise controller by 100 so that
setting 50 is 50%.
Tested-by: Used sensor override to make stepwise jump
threshold and got desired pwm result.
Change-Id: I629bf0d4b0b3bc77660c09fccae82b1bdac4c578
|
|
|
|
|
|
|
|
| |
phosphor-pid-control now only supports json configurations and no longer
builds from a YAML configuration.
Change-Id: I25fa7766399a1345dca89aac20e7b49caa46797e
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Override the yaml built objects if there is a configuration file.
Change-Id: Id7b21fa171f5f133b2d888b4095047551b3d65b9
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
If swampd is compiled to check for its configuration at run-time, it
will check one specific path.
Change-Id: I5c37ccbb2229db742c0f43b3d9ee0c368df19479
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
Use the defaults in the pkg check where the default error message is
sufficient to identify which package is missing.
Change-Id: I8db71f0c975d9c3078b1c6be7faf75667d0a223e
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
| |
phosphor-host-ipmid now exposes a library along with headers for
interfacing with the ipmi daemon. Compile and link against the new
library.
Change-Id: I747c3a585d646c7ff54efb14968c8f04daafe071
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
| |
Check for the json header during configuration.
Change-Id: I15c04b0f4892ce6498b4f171abe34a9b0944014e
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Parse the configuration file as json and not libconfig++.
Change-Id: Ic3e71cc810195387617b545566cf757c61c71942
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
Add json verificiation for configurations. A configuration is lightly
validated.
Change-Id: I42361daf6ad21d3480e92c3808f5fc8ab8318e0b
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
The configuration exception will be thrown for configuration errors.
Change-Id: Ibf9e220826ede46a5de748e73aa328300ed01f79
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Add support to build zones and PIDs from a json configuration file.
Change-Id: If8608dcd3e084cebabb71fc39851044df4d5d7c2
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Remove the dash from set-point, such that it's one word: setpoint.
Change-Id: I4c3033f3c2432a53d850e8f5defbe2ac1510daf8
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
Convert all PID configuration details are now camelCase instead of snake
case.
Change-Id: Id132053f122dfcd8abaace17df91c99758eb2b0c
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Fix camelCase styling on sysfswrite.
Change-Id: I6dec7f46687a1276e756687bc9669ab163b5fdc4
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
Rename the readpath and writepath for camelcase styling to make all
configuration variables consistent.
Change-Id: I33f475075c8f40cd2029a5c0bfda950846cd5d44
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Rename the zone variables to make them camelCase as a step towards
making all configuration variables camelCase for consistency.
Note: This patchset requires a change to your yaml configuration if
you're using it, or libconfig if you're using it.
Change-Id: If9cf1d7eb8227d305a1625275f2f7082c0d6905a
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
Use full names and camelcase for the variables in the pid loop to
improve readability and consistency.
Change-Id: I86be69d94d3008faa497eace050d1f3b9b6a9ff4
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Rename the struct components to camelCase.
Change-Id: I0e76c4bd5aed0ec2d78edd31ddef66f852ddc71e
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
The daemon needs to validate the json configuration, either immediately
after it's parsed or when objects are built from it.
Change-Id: I52b5a558657ba1420bc4589de793cc496392f318
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Add support to build sensors from a json configuration file.
Change-Id: Ic5bcbcd01e085ab0d4efaed314af8dc7e82b0b9d
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
| |
This just a style change, remove variant_ns
in favor of std.
Tested-by: it built
Change-Id: Id5a075e8b73a7724cbc5153fb7dfcf369e79c483
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
Add a central method for grabbing the default timeout for a sensor.
This is required to allow for a configuration to leave out an
unnecessary field.
Change-Id: I29ecd9db67b1eb1e66e60ef49859926cf14a4542
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add hysteresis to pid controllers to lower pwm changes.
It is defaulted to 0 so it should be transparent
to any controller that choses not to implement it.
This is the same pattern used by the stepwise controller.
Tested-by: Unit tests passed
Change-Id: Ib47114285b0017258b7f77eaf067d310f95a0c60
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add regex support to sensors when defining PIDs
so that we don't have to type all elements of a
single type, for instance all Cores of a CPU.
Tested-by: Added a configuration with inputs
"Inputs": [
"Core \\d+ CPU0"
],
And saw all Cores added when debug printing was turned
on.
Change-Id: I21c60d1cfc83b12aaa12039f09227f22f2b1d2b9
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
| |
In the entity-manager configuration files having a
outlimitmax of 10000 is confusing as this looks like
a tach reading, but is actually 100 percent * 100.
Back this out when dealing with dbusconfiguration.
Change-Id: I13609573fcf1c9da50afd270ea9aad0411b5768b
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
| |
Add the details for a basic margin thermal example.
Change-Id: I0a73851ba021ed727c7361c5677ae7a0b12782d0
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Add a missing verbatim wrap to make the "diagram" look more as-intended.
Change-Id: I3f6b8c430a3b3833356e5c235c3752bf3042e5cb
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Move the README file into the markdown README file.
Change-Id: I9ddce7584fb1bc6f7cdf37b851441ced467a7dfb
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Drop TOC element as github doesn't recognize it.
Change-Id: I9ba4cc6119e67d5221d15fe44bc89bed6c31a3bb
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
new_default now returns a reference to a single bus,
phosphor-pid-control uses multiple busses so we do not
want that. This was the way it was implemented prior to
https://github.com/openbmc/sdbusplus/commit/8ca6025eed193c252149b2908c3d5e37b00b0107
Tested-by: swampd ran normally
These errors go away:
Jan 28 18:28:45 swampd[1760]: terminate called after throwing an instance of 'sdbusplus::exception::SdBusError'
Jan 28 18:28:45 swampd[1760]: what(): sd_bus_request_name: org.freedesktop.DBus.Error.InconsistentMessage: Bad message
Change-Id: I708cd5e6c45509f27d4fe783c0b0cfb52ff10336
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When you create multiple zones, they are added to multiple
threads. Doing so causes multiple threads to access the
single bus object, which is illegal in sd_bus and
occasionally causes a crash on start like the below.
Assertion 'IN_SET(bus->state, BUS_RUNNING, BUS_HELLO)' failed at
../git/src/libsystemd/sd-bus/sd-bus.c:1720, function dispatch_wqueue().
Aborting.
Aborted (core dumped)
Tested-by: Started swampd multiple times and crash went away.
Change-Id: Ic44b93e51ecf3d39cd8b846bb3003516cdaf7816
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
| |
Change from Reviewer to Maintainer
Change-Id: Ic28ddc8f7cc0991990e46720069ee6054d25c90c
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
Cleanup the configure script package include lines. There isn't a set
style for this yet, but this is an attempt to improve readability
whereas it's often one long line per library.
Change-Id: Ib15cb4e60c3ee047d96a75038e72539d95356f3d
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
| |
New sdbusplus changes remove apply_visitor.
Tested-by: Manually checked out latest sdbusplus and
made sure it built.
Change-Id: I4418cf29339c61df7a172c1b44a6347b5f20a6ea
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
| |
The tests now require phosphor-logging to be included as a library.
Change-Id: Ie85d7bc9f6ff687f80064c2a499e934f7bcf2616
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
| |
Cleanup a few macro definitions to make it easier to read. The changes
in this patchset specifically don't touch openbmc package macros pending
a change to how the CI detects openbmc packages.
Change-Id: I1372f0545254a880b856a1b9b23fbbebdb4e7c65
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
Set the version specified in the configure_ac to match the recipe in
meta-phosphor.
Change-Id: I23092297cc5a305b4a89c7a38f656849a2a1f31f
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
| |
Drop unused headers from main.cpp:
- experimental/any
- mutex
Change-Id: I1bd0180e8582bc9c80e67bbb5e3bb5d040c218cc
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Drop commented out line to use libmapper.
Change-Id: Iaefcd8f1c0dc985f421f9df21ade545da88e807c
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
| |
Add helper methods for thermal controller types, such as checking if a
string is a supported thermal type and which type that string
corresponds to.
Change-Id: I3c782f5825e7726f264dd186df583bde0a0dc861
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This code was duplicated throughout the file and the index
calculation was wrong as .size() gave us greater than the
last index.
Tested-by: Added two zones and set DEBUG = true to notice
all pids in the correct zone.
Change-Id: I8eaff89ffcbd75e68abca1e79ab9cfd67db0c03c
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use std::max to determine which input value to apply.
Also start throwing when inputs are empty as otherwise
there will be a nullptr dereference.
Tested-by: Added multiple inputs and application no longer
segfaults and verifed max was being used. Also added unit
tests.
Change-Id: I7c8eda45b99247b8e92e629f036c9a46c98d9fe2
Signed-off-by: James Feist <james.feist@linux.intel.com>
|