<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/platform/x86/amd, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/platform/x86/amd?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/platform/x86/amd?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-10-24T09:27:35Z</updated>
<entry>
<title>platform/x86/amd: pmc: Read SMU version during suspend on Cezanne systems</title>
<updated>2022-10-24T09:27:35Z</updated>
<author>
<name>Mario Limonciello</name>
<email>mario.limonciello@amd.com</email>
</author>
<published>2022-10-20T11:37:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0b6e6e149c136677f1cc859d4185b5a2db50ffbf'/>
<id>urn:sha1:0b6e6e149c136677f1cc859d4185b5a2db50ffbf</id>
<content type='text'>
commit b0c07116c894 ("platform/x86: amd-pmc: Avoid reading SMU version at
probe time") adjusted the behavior for amd-pmc to avoid reading the SMU
version at startup but rather on first use to improve boot time.

However the SMU version is also used to decide whether to place a timer
based wakeup in the OS_HINT message. If the idlemask hasn't been read
before this message was sent then the SMU version will not have been
cached.

Ensure the SMU version has been read before deciding whether or not to
run this codepath.

Cc: stable@vger.kernel.org # 6.0
Reported-by: You-Sheng Yang &lt;vicamo.yang@canonical.com&gt;
Tested-by: Anson Tsao &lt;anson.tsao@amd.com&gt;
Fixes: b0c07116c894 ("platform/x86: amd-pmc: Avoid reading SMU version at probe time")
Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Link: https://lore.kernel.org/r/20221020113749.6621-2-mario.limonciello@amd.com
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
</entry>
<entry>
<title>platform/x86: use PLATFORM_DEVID_NONE instead of -1</title>
<updated>2022-10-03T07:40:04Z</updated>
<author>
<name>Barnabás Pőcze</name>
<email>pobrn@protonmail.com</email>
</author>
<published>2022-09-30T10:59:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8d05fc039456517d2c246c7b202891188ba40c4d'/>
<id>urn:sha1:8d05fc039456517d2c246c7b202891188ba40c4d</id>
<content type='text'>
Use the `PLATFORM_DEVID_NONE` constant instead of
hard-coding -1 when creating a platform device.

No functional changes are intended.

Signed-off-by: Barnabás Pőcze &lt;pobrn@protonmail.com&gt;
Link: https://lore.kernel.org/r/20220930104857.2796923-1-pobrn@protonmail.com
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
</entry>
<entry>
<title>platform/x86/amd: pmc: Dump idle mask during "check" stage instead</title>
<updated>2022-10-03T07:39:55Z</updated>
<author>
<name>Mario Limonciello</name>
<email>mario.limonciello@amd.com</email>
</author>
<published>2022-09-29T21:50:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c928df03bde92d70babeb22d500f528256758aee'/>
<id>urn:sha1:c928df03bde92d70babeb22d500f528256758aee</id>
<content type='text'>
The idle mask is dumped during the "prepare" and "restore" stage
right now, which helps to demonstrate issues only related to the
first s2idle entry.

If the system has entered s2idle once, but was woken up never
breaking the s2idle loop but also never went back to sleep we
might still have another issue to deal with however.

Move the dynamic debugging message here so that we'll catch it on
each iteration.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=216516
Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Link: https://lore.kernel.org/r/20220929215042.745-1-mario.limonciello@amd.com
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
</entry>
<entry>
<title>platform/x86/amd: pmc: remove CONFIG_DEBUG_FS checks</title>
<updated>2022-09-27T13:17:09Z</updated>
<author>
<name>Shyam Sundar S K</name>
<email>Shyam-sundar.S-k@amd.com</email>
</author>
<published>2022-09-22T17:56:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b37fe34c83099ba5105115f8287c5546af1f0a05'/>
<id>urn:sha1:b37fe34c83099ba5105115f8287c5546af1f0a05</id>
<content type='text'>
Since linux/debugfs.h already has the stubs for the used debugfs
functions when debugfs is not enabled, remove the #ifdef CONFIG_DEBUG_FS
checks.

Signed-off-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
Link: https://lore.kernel.org/r/20220922175608.630046-1-Shyam-sundar.S-k@amd.com
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'platform-drivers-x86-amd-pmf' into review-hans</title>
<updated>2022-09-27T12:57:38Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2022-09-27T12:57:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a283781baa0c38a8e9c7b26780e3ee7a91a4f186'/>
<id>urn:sha1:a283781baa0c38a8e9c7b26780e3ee7a91a4f186</id>
<content type='text'>
</content>
</entry>
<entry>
<title>platform/x86/amd/pmf: Remove unused power_delta instances</title>
<updated>2022-09-27T12:53:36Z</updated>
<author>
<name>Shyam Sundar S K</name>
<email>Shyam-sundar.S-k@amd.com</email>
</author>
<published>2022-09-22T16:51:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=9732f9c7b4a0c18820cbf9c74f7c8abde60f2834'/>
<id>urn:sha1:9732f9c7b4a0c18820cbf9c74f7c8abde60f2834</id>
<content type='text'>
Initial version of the PMF ACPI documentation had the concept
of "power_delta" which is removed in the recent revisions.

So the entire cnqf_power_delta structure is never used/updated.
Hence removing it.

Fixes: 1738061c9ec8 ("platform/x86/amd/pmf: Add support for CnQF")
Signed-off-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
Link: https://lore.kernel.org/r/20220922165118.163165-1-Shyam-sundar.S-k@amd.com
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
</entry>
<entry>
<title>platform/x86/amd/pmf: install notify handler after acpi init</title>
<updated>2022-09-27T12:45:21Z</updated>
<author>
<name>Shyam Sundar S K</name>
<email>Shyam-sundar.S-k@amd.com</email>
</author>
<published>2022-09-23T13:17:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=22ee98cb696e95b05a188756d479d382d93559ef'/>
<id>urn:sha1:22ee98cb696e95b05a188756d479d382d93559ef</id>
<content type='text'>
It is observed that when thinkpad_acpi driver loads before amd-pmf
driver, thinkpad_acpi driver sends the AMT "on" event and the request
immediately will be part of the PMF BIOS "pending requests".

With the current amd-pmf code, as soon as the amd-pmf driver gets
probed, it calls apmf_acpi_init() where the notify handler will be
installed. Handler callback would call amd_pmf_handle_amt() where the
amd_pmf_set_automode() shall update the auto-mode thermals.
In this case, the auto-mode config_store shall have "zeros", as the
auto mode init gets called during the later stage.

To fix this, change the order of the acpi notifer install and call it
after the auto mode initialization is done.

Fixes: 7d77dcc83ada ("platform/x86/amd/pmf: Handle AMT and CQL events for Auto mode")
Cc: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Cc: Mark Pearson &lt;markpearson@lenovo.com&gt;
Cc: Patil Rajesh Reddy &lt;Patil.Reddy@amd.com&gt;
Signed-off-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
Reviewed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Link: https://lore.kernel.org/r/20220923131724.1812685-1-Shyam-sundar.S-k@amd.com
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
</entry>
<entry>
<title>platform/x86/amd/pmf: Add sysfs to toggle CnQF</title>
<updated>2022-09-22T15:42:53Z</updated>
<author>
<name>Shyam Sundar S K</name>
<email>Shyam-sundar.S-k@amd.com</email>
</author>
<published>2022-09-22T13:12:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3dae5825295d7b3284fc349cd6bfa641f4033e16'/>
<id>urn:sha1:3dae5825295d7b3284fc349cd6bfa641f4033e16</id>
<content type='text'>
Whether to turn CnQF on/off by default upon driver load would be decided
by a BIOS flag. Add a sysfs node to provide a way to the user whether to
use static slider or CnQF .

Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
Link: https://lore.kernel.org/r/20220922131202.56529-3-Shyam-sundar.S-k@amd.com
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
</entry>
<entry>
<title>platform/x86/amd/pmf: Add support for CnQF</title>
<updated>2022-09-22T15:42:53Z</updated>
<author>
<name>Shyam Sundar S K</name>
<email>Shyam-sundar.S-k@amd.com</email>
</author>
<published>2022-09-22T13:12:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1738061c9ec854db2db76be8bb968f550d9bdddc'/>
<id>urn:sha1:1738061c9ec854db2db76be8bb968f550d9bdddc</id>
<content type='text'>
CnQF (a.k.a Cool and Quiet Framework) extends the static slider concept.
PMF dynamically manages system power limits and fan policy based on system
power trends which is representative of workload trend.

Static slider and CnQF controls are mutually exclusive for system power
budget adjustments. CnQF supports configurable number of modes which can
be unique for AC and DC. Every mode is representative of a system state
characterized by unique steady state and boost behavior.

OEMs can configure the different modes/system states and how the
transition to a mode happens. Whether to have CnQF manage system power
budget dynamically in AC or DC or both is also configurable. Mode changes
due to CnQF don't result in slider position change.

The default OEM values are obtained after evaluating the PMF ACPI function
idx 11 &amp; 12 for AC and DC respectively. Whether to turn ON/OFF by default
is guided by a "flag" passed by the OEM BIOS.

Signed-off-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
Link: https://lore.kernel.org/r/20220922131202.56529-2-Shyam-sundar.S-k@amd.com
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
</entry>
<entry>
<title>platform/x86/amd: pmc: Fix build without debugfs</title>
<updated>2022-09-22T15:42:25Z</updated>
<author>
<name>Nathan Chancellor</name>
<email>nathan@kernel.org</email>
</author>
<published>2022-09-22T15:31:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=9af48b262675561eefd6edc11b4b02854e6a18ae'/>
<id>urn:sha1:9af48b262675561eefd6edc11b4b02854e6a18ae</id>
<content type='text'>
Without CONFIG_DEBUG_FS, the following build error occurs:

  drivers/platform/x86/amd/pmc.c:984:17: error: use of undeclared identifier 'pmc_groups'; did you mean 'set_groups'?
                  .dev_groups = pmc_groups,
                                ^~~~~~~~~~
                                set_groups
  ./include/linux/cred.h:65:13: note: 'set_groups' declared here
  extern void set_groups(struct cred *, struct group_info *);
              ^
  drivers/platform/x86/amd/pmc.c:984:17: error: incompatible pointer types initializing 'const struct attribute_group **' with an expression of type 'void (struct cred *, struct group_info *)' [-Werror,-Wincompatible-pointer-types]
                  .dev_groups = pmc_groups,
                                ^~~~~~~~~~
  2 errors generated.

pmc_groups was only defined inside a CONFIG_DEBUG_FS block but
commit 7f1ea75d499a ("platform/x86/amd: pmc: Add sysfs files for SMU")
intended for these sysfs files to be available outside of debugfs.
Shuffle the necessary functions out of the CONFIG_DEBUG_FS block so that
the file always builds.

Fixes: 7f1ea75d499a ("platform/x86/amd: pmc: Add sysfs files for SMU")
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Reviewed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Link: https://lore.kernel.org/r/20220922153100.324922-1-nathan@kernel.org
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
</entry>
</feed>
