[PATCH 1/2] drm/amd: Make sure image is written to trigger VBIOS image update flow

2023-06-07 Thread Mario Limonciello
valid state. Explicitly check that an image has been written before letting a read succeed. Fixes: 8424f2ccb3c0 ("drm/amdgpu/psp: Add vbflash sysfs interface support") Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +++ 1

[PATCH] drm/amd: Check that a system is a NUMA system before looking for SRAT

2023-06-02 Thread Mario Limonciello
It's pointless on laptops to look for the SRAT table as these are not NUMA. Check the number of possible nodes is > 1 to decide whether to look for SRAT. Suggested-by: Felix Kuehling Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 3 ++- 1 file ch

Re: [PATCH v2 1/2] drm/amd: Disallow s0ix without BIOS support again

2023-05-31 Thread Mario Limonciello
On 5/31/23 08:26, Alex Deucher wrote: On Tue, May 30, 2023 at 6:34 PM Mario Limonciello wrote: commit cf488dcd0ab7 ("drm/amd: Allow s0ix without BIOS support") showed improvements to power consumption over suspend when s0ix wasn't enabled in BIOS and the system didn't sup

[PATCH v2 2/2] drm/amd: Make lack of `ACPI_FADT_LOW_POWER_S0` or `CONFIG_AMD_PMC` louder during suspend path

2023-05-30 Thread Mario Limonciello
bug.cgi?id=217497 Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c index e1b01554e323..fd6e83795873 100644 --- a/d

[PATCH v2 1/2] drm/amd: Disallow s0ix without BIOS support again

2023-05-30 Thread Mario Limonciello
ert commit cf488dcd0ab7 ("drm/amd: Allow s0ix without BIOS support") to make it match the expected behavior again. Cc: Rafael Ávila de Espíndola Link: https://github.com/torvalds/linux/blob/v6.1/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c#L1060 Closes: https://gitlab.freedesktop.org

[PATCH 2/2] drm/amd: Make lack of `ACPI_FADT_LOW_POWER_S0` or `CONFIG_AMD_PMC` louder during suspend path

2023-05-30 Thread Mario Limonciello
bug.cgi?id=217497 Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c index a3523d03d769..f8b117afd5b1 100644 --- a/d

[PATCH 1/2] drm/amd: Disallow s0ix without BIOS support again

2023-05-30 Thread Mario Limonciello
hub.com/torvalds/linux/blob/v6.1/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c#L1060 Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2599 Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-)

[PATCH] drm/amd: Drop debugfs access to the DPCD

2023-05-24 Thread Mario Limonciello
m the same file. Signed-off-by: Mario Limonciello --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 4 - .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 107 -- 2 files changed, 111 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h b/drivers/gpu/dr

Re: [PATCH v4] drm/amd: Flush any delayed gfxoff on suspend entry

2023-05-18 Thread Mario Limonciello
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_SDMA)) continue; Evan -Original Message----- From: amd-gfx On Behalf Of Mario Limonciello Sent: Friday, May 19, 2023 12:53 AM To: amd-gfx@lists.freedesktop.org Cc: Tsao, Anson ; Huang, Tim ; Martinez, Juan ; Limonc

[PATCH v4] drm/amd: Flush any delayed gfxoff on suspend entry

2023-05-18 Thread Mario Limonciello
ut instead processed immediately. This is dead code due to commit 5d70a549d00d ("drm/amdgpu: skip CG/PG for gfx during S0ix") because GFXOFF will now not be explicitly called as part of the suspend entry code. Remove that dead code. Cc: sta...@vger.kernel.org # 6.1+ Suggested-by: T

[PATCH 3/3] drm/amd: Update driver-misc.html for Rembrandt-R

2023-05-18 Thread Mario Limonciello
AMD has added marketing information publicly for Rembrandt-R, so update the APU table with matching versions. Link: https://www.amd.com/en/product/13086 Signed-off-by: Mario Limonciello --- Documentation/gpu/amdgpu/apu-asic-info-table.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 1/3] drm/amd: Update driver-misc.html for Phoenix

2023-05-18 Thread Mario Limonciello
AMD has added marketing information publicly for Phoenix, so update the APU table with matching versions. Link: https://www.amd.com/en/product/13036 Signed-off-by: Mario Limonciello --- Documentation/gpu/amdgpu/apu-asic-info-table.csv | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH 2/3] drm/amd: Update driver-misc.html for Dragon Range

2023-05-18 Thread Mario Limonciello
AMD has added marketing information publicly for Dragon Range, so update the APU table with matching versions. Link: https://www.amd.com/en/product/13016 Signed-off-by: Mario Limonciello --- Documentation/gpu/amdgpu/apu-asic-info-table.csv | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH v3 4/4] drm/amd: Validate gfxoff state for smu13

2023-05-17 Thread Mario Limonciello
GFXOFF may be flushed at suspend entry and it may be important to ensure it reaches desired target state. In SMU13 designs that use IMU, validate the state is reached. This mirrors the implementation done for SMU10 and SMU12. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu

[PATCH v3 3/4] drm/amd: Validate gfxoff state for smu12

2023-05-17 Thread Mario Limonciello
GFXOFF may be flushed at suspend entry and it may be important to ensure it reaches desired target state. Signed-off-by: Mario Limonciello --- .../gpu/drm/amd/pm/swsmu/smu12/smu_v12_0.c| 26 +++ 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v3 1/4] drm/amd: Flush any delayed gfxoff on suspend entry

2023-05-17 Thread Mario Limonciello
ut instead processed immediately. This is dead code due to commit 5d70a549d00d ("drm/amdgpu: skip CG/PG for gfx during S0ix") because GFXOFF will now not be explicitly called as part of the suspend entry code. Remove that dead code. Cc: sta...@vger.kernel.org # 6.1+ Suggested-by: T

[PATCH v3 2/4] drm/amd: Validate gfxoff state for smu10

2023-05-17 Thread Mario Limonciello
GFXOFF may be flushed at suspend entry and it may be important to ensure it reaches desired target state. Signed-off-by: Mario Limonciello --- .../drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c | 57 +-- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v3 0/4] Fix DCN 3.1.4 hangs on s2idle entry

2023-05-17 Thread Mario Limonciello
prove the robustness. It was tested both with and without those commits present. v2->v3: * Remove dead code * Apply the logic to wait for matching GFXOFF state to more ASICs * Move code for IMU enabled ASICs to other files Mario Limonciello (4): drm/amd: Flush any delayed gfxoff on suspe

[PATCH v2 1/3] drm/amd: Flush any delayed gfxoff on suspend entry

2023-05-16 Thread Mario Limonciello
early in s2idle entry sequence to ensure that it's off when RLC is changed. Cc: sta...@vger.kernel.org # 6.1+ Suggested-by: Tim Huang Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/a

[PATCH v2 3/3] drm/amd: Skip RLC suspend for s0ix on PSP 13.0.4 and 13.0.11

2023-05-16 Thread Mario Limonciello
RLC suspend in s0ix is unncessary as the SMU and IMU jointly manages graphics power state. Suggested-by: Alexander Deucher Signed-off-by: Mario Limonciello --- v1->v2: * Skip RLC all the time instead of adding safety to it --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 4 ++-- 1 file chan

[PATCH v2 0/3] Fix DCN 3.1.4 hangs on s2idle entry

2023-05-16 Thread Mario Limonciello
ually powered off when RLC is turned off. To avoid this issue, flush the workqueue on s2idle entry and ensure that GFX is really in GFXOFF before any sensitive register accesses occur. Mario Limonciello (3): drm/amd: Flush any delayed gfxoff on suspend entry drm/amd: Poll for GFX core to be off

[PATCH v2 2/3] drm/amd: Poll for GFX core to be off

2023-05-16 Thread Mario Limonciello
uring s2idle entry and exit. Cc: sta...@vger.kernel.org # 6.1 Suggested-by: Tim Huang Signed-off-by: Mario Limonciello --- v1->v2: * Only poll in the s0ix case not all GFXOFF cases --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 ++ drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c

[PATCH 2/3] drm/amd: Poll for GFX core to be off

2023-05-16 Thread Mario Limonciello
uring s2idle entry and exit. Cc: sta...@vger.kernel.org # 6.1+ Tested-by: Juan Martinez Tested-by: Anson Tsao Suggested-by: Tim Huang Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 20 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c

[PATCH 3/3] drm/amd: Add safety check to make sure RLC is only turned off while in GFXOFF

2023-05-16 Thread Mario Limonciello
On GFX11 if RLC is stopped when not in GFXOFF the system will hang. Prevent this case from ever happening. Tested-by: Juan Martinez Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH 1/3] drm/amd: Flush any delayed gfxoff on suspend entry

2023-05-16 Thread Mario Limonciello
early in s2idle entry sequence to ensure that it's off when RLC is changed. Cc: sta...@vger.kernel.org # 6.1+ Tested-by: Juan Martinez Tested-by: Anson Tsao Suggested-by: Tim Huang Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + 1 file changed, 1 inse

[PATCH 0/3] Fix DCN 3.1.4 hangs on s2idle entry

2023-05-16 Thread Mario Limonciello
and driver for whether GFX is actually powered off when RLC is turned off. To avoid this issue, flush the workqueue on s2idle entry and ensure that GFX is really in GFXOFF before any sensitive register accesses occur. Mario Limonciello (3): drm/amd: Flush any delayed gfxoff on suspend entry drm

Re: [PATCH v3] drm/amd/pm: parse pp_handle under appropriate conditions

2023-05-07 Thread Mario Limonciello
, and update Fixes tag Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2541 Fixes: eb4900aa4c49("drm/amdgpu: Fix kernel NULL pointer dereference in dpm functions") Suggested-by: Mario Limonciello Signed-off-by: Guchun Chen Reviewed-by: Mario Limonciello --- drivers/gpu/

[PATCH] drm/amd: Downgrade message about watermarks table after s0i3 to debug

2023-04-28 Thread Mario Limonciello
This message shows up on s0i3 resume for DCN31 and DCN314 platforms but it has been decided that this flow won't be changed and the message is expected behavior. Downgrade the message to debug. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_smu.c

Re: [PATCH v2] drm/amd/amdgpu: Fix trivial style errors

2023-04-05 Thread Mario Limonciello
tian) Suggested-by: Christian König Cc: Alex Deucher Cc: Mario Limonciello Signed-off-by: Srinivasan Shanmugam --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgp

[PATCH] drm/amd: Fix an out of bounds error in BIOS parser

2023-04-02 Thread Mario Limonciello
cases not covered by it. Fix those as well. Reported-by: erhar...@mailbox.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=214853 Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2473 Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 7 ++---

Re: [PATCH 1/2] drm/amdgpu: Reset GPU on S0ix when device supports BOCO

2023-03-29 Thread Mario Limonciello
On 3/29/23 22:36, Kai-Heng Feng wrote: On Wed, Mar 29, 2023 at 9:23 PM Mario Limonciello wrote: On 3/29/23 04:59, Kai-Heng Feng wrote: When the power is lost due to ACPI power resources being turned off, the driver should reset the GPU so it can work anew. First, _PR3 support of the

Re: [PATCH 1/2] drm/amdgpu: Reset GPU on S0ix when device supports BOCO

2023-03-29 Thread Mario Limonciello
On 3/29/23 04:59, Kai-Heng Feng wrote: When the power is lost due to ACPI power resources being turned off, the driver should reset the GPU so it can work anew. First, _PR3 support of the hierarchy needs to be found correctly. Since the GPU on some discrete GFX cards is behind a PCIe switch, c

Re: [PATCH 2/2] drm/amdgpu: Remove ASPM workaround on VI and NV

2023-03-29 Thread Mario Limonciello
On 3/29/23 08:08, Gong, Richard wrote: On 3/29/2023 4:59 AM, Kai-Heng Feng wrote: Since the original issue is resolved by a new fix, the ASPM workaround can be dropped. What is the new fix? Can you elaborate more or add the new fix commit here? It's his first patch in the series, but yes I

Re: [PATCH v3 2/2] drm/amd/pm: vangogh: send the SMT enable message to pmfw

2023-03-28 Thread Mario Limonciello
On 3/28/23 20:51, Wenyou Yang wrote: When the CPU SMT status is changed in the fly, sent the SMT enable message to pmfw to notify it that the SMT status changed. Add the support to send PPSMC_MSG_SetCClkSMTEnable(0x58) message to pmfw for vangogh. Signed-off-by: Wenyou Yang --- drivers/gpu

[PATCH] drm/amd: Fix initialization mistake for NBIO 7.3.0

2023-03-02 Thread Mario Limonciello
required. Reported-by: Thomas Glanzmann Cc: Basavaraj Natikar Link: https://lore.kernel.org/linux-usb/y%2fz9gdhjpyf2r...@glanzmann.de/T/#u Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/nbio_v7_2.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a

[PATCH v2 2/3] drm/amd: Don't always set s3 for dGPUs in all sleep modes

2023-02-27 Thread Mario Limonciello
dGPUs that will be using BACO or BOCO shouldn't be put into S3 when the system is being put into s2idle. Cc: Peter Kopec Signed-off-by: Mario Limonciello --- v1->v2: * Whitespace --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(

[PATCH v2 3/3] drm/amd: Add special handling for system s0ix state w/ dGPUs

2023-02-27 Thread Mario Limonciello
-off-by: Mario Limonciello --- v1->v2: * New patch drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 12 +++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amd

[PATCH v2 1/3] drm/amd: Allow dGPUs that support BACO to use smart suspend

2023-02-27 Thread Mario Limonciello
If a dGPU is already runtime suspended using BACO, there is no point to waking it up to run regular suspend callbacks. Cc: Peter Kopec Signed-off-by: Mario Limonciello --- v1->v2: * Simplify prepare call --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 32 - 1 f

[PATCH v2 0/3] Adjust dGPU handling for BACO

2023-02-27 Thread Mario Limonciello
do runtime suspend first, and if it fails do system suspend Mario Limonciello (3): drm/amd: Allow dGPUs that support BACO to use smart suspend drm/amd: Don't always set s3 for dGPUs in all sleep modes drm/amd: Add special handling for system s0ix state w/ dGPUs drivers/gpu/drm/am

Re: [PATCH] amdgpu: add a filter condition when set brightness

2023-02-27 Thread Mario Limonciello
On 2/27/23 01:39, Yuanzhi Wang wrote: When the laptop is plugged into AC or DC power supply, the brightness obtained ACPI may be smaller than current brightness.As a result the screen becomes dark,this is not what people want. Do you have a matching bug report with more information included?

Re: [PATCH 3/3] drm/amd: Don't always set s3 for dGPUs in all sleep modes

2023-02-21 Thread Mario Limonciello
On 2/21/23 07:25, Lazar, Lijo wrote: On 2/21/2023 1:46 AM, Mario Limonciello wrote: dGPUs that will be using BACO or BOCO shouldn't be put into S3 when the system is being put into s2idle. Cc: Peter Kopec Signed-off-by: Mario Limonciello ---   drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.

[PATCH 1/3] drm/amd: Allow dGPUs that support BACO to use smart suspend

2023-02-20 Thread Mario Limonciello
If a dGPU is already runtime suspended using BACO, there is no point to waking it up to run regular suspend callbacks. Cc: Peter Kopec Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a

[PATCH 3/3] drm/amd: Don't always set s3 for dGPUs in all sleep modes

2023-02-20 Thread Mario Limonciello
dGPUs that will be using BACO or BOCO shouldn't be put into S3 when the system is being put into s2idle. Cc: Peter Kopec Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gp

[RFC 0/3] Adjust suspend flow for dGPUs

2023-02-20 Thread Mario Limonciello
ly suspended via PMFW and lack of video or audio, but this policy doesn't apply to them. Furthermore even if a dGPU is runtime suspended the system wide suspend callbacks always wake them even if the power rails won't be cut. This series adjust the flow around runtime suspend handling

[PATCH 2/3] drm/amd: Use runtime suspend in lieu regular suspend on supported dGPUs

2023-02-20 Thread Mario Limonciello
spend from Linux may cause a mismatch of behavior. To avoid this, only run the runtime suspend and resume callbacks when the dGPU supports BACO or BOCO and the smart flags didn't return to skip these stages (because already runtime suspended). Cc: Peter Kopec Signed-off-by: Mario L

[PATCH] drm/amd: Fix initialization for nbio 7.5.1

2023-02-20 Thread Mario Limonciello
A mistake has been made in the BIOS for some ASICs with NBIO 7.5.1 where some NBIO registers aren't properly setup. Ensure that they're set during initialization. Tested-by: Richard Gong Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/nbio_v7_2.c | 5 + 1 file

[PATCH v2] drm/amd: Don't allow s0ix on APUs older than Raven

2023-02-13 Thread Mario Limonciello
sers try to run s0ix on anything older than Raven it will just skip suspend of the GPU. Fixes: cf488dcd0ab7 ("drm/amd: Allow s0ix without BIOS support") Suggested-by: Alexander Deucher Signed-off-by: Mario Limonciello --- v1->v2: * Don't run any suspend code or resume code in t

[PATCH] drm/amd: Don't allow s0ix on APUs older than Raven

2023-02-10 Thread Mario Limonciello
sers try to run s0ix on anything older than Raven it will just skip suspend of the GPU. Fixes: cf488dcd0ab7 ("drm/amd: Allow s0ix without BIOS support") Suggested-by: Alexander Deucher Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 3 +++ drivers/gpu/dr

[PATCH] drm/amd: Fix initialization for nbio 4.3.0

2023-01-30 Thread Mario Limonciello
A mistake has been made on some boards with NBIO 4.3.0 where some NBIO registers aren't properly set by the hardware. Ensure that they're set during initialization. Cc: Natikar Basavaraj Tested-by: Satyanarayana ReddyTVN Tested-by: Rutvij Gajjar Signed-off-by: Mario Limonciello --

[PATCH] drm/amd: Allow s0ix without BIOS support

2023-01-25 Thread Mario Limonciello
try to fix the underlying behavior that makes graphics fail after resume without underlying platform support. Reported-by: Rafael Ávila de Espíndola Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2364 Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 8 ++

[PATCH] Documentation: gpu: Fix number of columns in APU IP versions table

2023-01-19 Thread Mario Limonciello
A new column was added for MP0 version, but the table is imported into an RST file and that needs to be accounted for. Fixes: 393c5b8fa8d85 ("Documentation/gpu: Add MP0 version to apu-asic-info-table") Signed-off-by: Mario Limonciello --- Documentation/gpu/amdgpu/driver-misc.rst | 2

[PATCH] drm/amd: Don't look for SRAT on systems without NUMA

2023-01-18 Thread Mario Limonciello
Laptops that have NUMA won't have an SRAT. Only look for SRAT when it should be there. Suggested-by: Felix Kuehling Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/a

[PATCH 2/3] drm/amd: Decrease warning about missing SRAT table to debug

2023-01-18 Thread Mario Limonciello
As OEMs will control what ACPI tables are on their systems, SRAT might not be present. To avoid making an assumption that it is there but still be useful for debugging a missing table decrease warning about missing table to debug. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdkfd

[PATCH 3/3] drm/amd: decrease message about missing PSP runtime database to debug

2023-01-18 Thread Mario Limonciello
Laptops with APUs from a variety of manufacturers and generations show a warning about a missing PSP runtime database. As it's not required for PSP to dump this database into framebuffer, decrease messages about it missing to debug. Signed-off-by: Mario Limonciello --- drivers/gpu/dr

[PATCH 1/3] drm/amd/display: Decrease messaging about DP alt mode state to debug

2023-01-18 Thread Mario Limonciello
Currently plugging in a USB-C device that issues an HPD will emit a warning level message `DP Alt mode state on HPD: %d`. This is needlessly noisy for most people, decrease it to debug so that it can be turned on by dynamic debug as needed. Signed-off-by: Mario Limonciello --- drivers/gpu/drm

[PATCH 0/3] Quiet down some warnings on laptops

2023-01-18 Thread Mario Limonciello
Looking at Cezanne laptops from a few manufacturers I've noticed a few harmless warnings are emitted to the logs. I looked through them and think they can all be decreased to debug. Mario Limonciello (3): drm/amd/display: Decrease messaging about DP alt mode state to debug drm/amd: Dec

[PATCH 2/4] Documentation/gpu: Update lines for GREEN_SARDINE and YELLOW_CARP

2023-01-18 Thread Mario Limonciello
-mobile-processors/ba-p/543985 Signed-off-by: Mario Limonciello --- Documentation/gpu/amdgpu/apu-asic-info-table.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/gpu/amdgpu/apu-asic-info-table.csv b/Documentation/gpu/amdgpu/apu-asic-info-table.csv index

[PATCH 4/4] Documentation/gpu: Add Raphael to apu-asic-info-table

2023-01-18 Thread Mario Limonciello
Raphael launched in 2022 but was missed to add to this table. Signed-off-by: Mario Limonciello --- Documentation/gpu/amdgpu/apu-asic-info-table.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/gpu/amdgpu/apu-asic-info-table.csv b/Documentation/gpu/amdgpu/apu-asic-info

[PATCH 3/4] Documentation/gpu: Add Mendocino to apu-asic-info-table

2023-01-18 Thread Mario Limonciello
Mendocino launched in 2023 and uses the new naming scheme for APU processors. Link: https://community.amd.com/t5/corporate/announcing-new-model-numbers-for-2023-mobile-processors/ba-p/543985 Signed-off-by: Mario Limonciello --- Documentation/gpu/amdgpu/apu-asic-info-table.csv | 1 + 1 file

[PATCH 1/4] Documentation/gpu: Add MP0 version to apu-asic-info-table

2023-01-18 Thread Mario Limonciello
MP0 version is useful to know to figure out which firmware is intended for a platform. Add a column for all supported APUs. Signed-off-by: Mario Limonciello --- Documentation/gpu/amdgpu/apu-asic-info-table.csv | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a

[PATCH 0/4] Update AMD APU IP version docs

2023-01-18 Thread Mario Limonciello
ts as well as products launching this year that don't have IP version changes. Mario Limonciello (4): Documentation/gpu: Add MP0 version to apu-asic-info-table Documentation/gpu: Update lines for GREEN_SARDINE and YELLOW_CARP Documentation/gpu: Add Mendocino to apu-asic-info-table Do

[PATCH 1/3] drm/amd: Adjust legacy IP discovery for Picasso/Raven/Raven2

2023-01-15 Thread Mario Limonciello
The switch/case statement currently combines 10.0.0 and 10.0.1, but 10.0.1 is only used for Raven 2. So split the two cases up to make this clearer. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 12 1 file changed, 4 insertions(+), 8 deletions

[PATCH 3/3] drm/amd: Evaluate early init for all IP blocks even if one fails

2023-01-15 Thread Mario Limonciello
block and report a single failure if not all passed. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH 2/3] drm/amd: Remove needless break for legacy IP discovery MP0 9.0.0

2023-01-15 Thread Mario Limonciello
There is already a "default" case in the switch block, so there is no need to have a break after the switch block. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_

[PATCH] drm/amd: Fix renoir/green sardine MP0 IP version detection

2023-01-13 Thread Mario Limonciello
Cc: Alex Hung Fixes: 994a97447e38 ("drm/amd: Parse both v1 and v2 TA microcode headers using same function") Fixes: 54a3e032340e ("drm/amd: Add a legacy mapping to "amdgpu_ucode_ip_version_decode") Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_

[PATCH] drm/amd: fix some dead code in `gfx_v9_0_init_cp_compute_microcode`

2023-01-12 Thread Mario Limonciello
ot;drm/amd: Use `amdgpu_ucode_*` helpers for GFX9") Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

[PATCH] drm/amd: Avoid ASSERT for some message failures

2023-01-11 Thread Mario Limonciello
atches the behavior utilized for failures with `VBIOSSMC_MSG_TransferTableDram2Smu` configuration. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dc

[PATCH] drm/amd: Only load TA microcode for psp v12_0 once

2023-01-10 Thread Mario Limonciello
During rebase from patch series accidentally ended up with two calls to load TA microcode for psp v12_0. Only one is needed, so remove the second. Fixes: f1efed401badb ("drm/amd: Parse both v1 and v2 TA microcode headers using same function") Signed-off-by: Mario Limonciello --- d

[PATCH v7 42/45] drm/amd: Use `amdgpu_ucode_*` helpers for DMCU

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- drivers/gpu

[PATCH v7 45/45] drm/amd: make amdgpu_ucode_validate static

2023-01-05 Thread Mario Limonciello
No consumers outside of amdgpu_ucode.c use amdgpu_ucode_validate anymore, so make the function static. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 1 - 2

[PATCH v7 43/45] drm/amd: Use `amdgpu_ucode_release` helper for powerplay

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_release` helper is replacing all calls to release_firmware. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->v6: * Adjust for amdgpu_ucode_release argument change --- drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c | 3 +-- 1 f

[PATCH v7 36/45] drm/amd: Use `amdgpu_ucode_*` helpers for SDMA3.0

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

[PATCH v7 44/45] drm/amd: Use `amdgpu_ucode_release` helper for si

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_release` helper is replacing all calls to release_firmware. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->v6: * Adjust for amdgpu_ucode_release argument change --- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 11 ++-

[PATCH v7 28/45] drm/amd: Optimize SRIOV switch/case for PSP microcode load

2023-01-05 Thread Mario Limonciello
Now that IP version decoding is used, a number of case statements can be combined. Reviewed-by: Alex Deucher Reviewed-by: Christian König Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 8 +--- 1 file changed, 1 insertion(+), 7

[PATCH v7 39/45] drm/amd: Use `amdgpu_ucode_*` helpers for VCE

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

[PATCH v7 41/45] drm/amd: Use `amdgpu_ucode_*` helpers for GPU info bin

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

[PATCH v7 37/45] drm/amd: Use `amdgpu_ucode_*` helpers for SDMA on CIK

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

[PATCH v7 34/45] drm/amd: Use `amdgpu_ucode_*` helpers for GMC8

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

[PATCH v7 40/45] drm/amd: Use `amdgpu_ucode_*` helpers for CGS

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

[PATCH v7 35/45] drm/amd: Use `amdgpu_ucode_*` helpers for SDMA2.4

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

[PATCH v7 38/45] drm/amd: Use `amdgpu_ucode_*` helpers for UVD

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

[PATCH v7 32/45] drm/amd: Use `amdgpu_ucode_*` helpers for GMC6

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

[PATCH v7 22/45] drm/amd: Load PSP microcode during early_init

2023-01-05 Thread Mario Limonciello
. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v6->v7: * rebase on earlier patches --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 120 +-- drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 12 --- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c |

[PATCH v7 31/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX8

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

[PATCH v7 25/45] drm/amd: Use `amdgpu_ucode_release` helper for DMUB

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->v6: * Adjust for amdgpu_ucode_release argument change --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 +++--- 1 f

[PATCH v7 30/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX7

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

[PATCH v7 20/45] drm/amd: Parse both v1 and v2 TA microcode headers using same function

2023-01-05 Thread Mario Limonciello
Several IP versions duplicate code and can't use the common helpers. Move this code into a single function so that the helpers can be used. Signed-off-by: Mario Limonciello --- v6->v7: * Drop tags * Only set adev->psp.securedisplay_context.context on PSPv12 Renoir and PSP v10 wh

[PATCH v7 27/45] drm/amd: Load SMU microcode during early_init

2023-01-05 Thread Mario Limonciello
This will ensure that the microcode is available before the firmware framebuffer has been destroyed. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions

[PATCH v7 29/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX6

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

[PATCH v7 26/45] drm/amd: Use `amdgpu_ucode_*` helpers for SMU

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

[PATCH v7 33/45] drm/amd: Use `amdgpu_ucode_*` helpers for GMC7

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

[PATCH v7 24/45] drm/amd/display: Load DMUB microcode during early_init

2023-01-05 Thread Mario Limonciello
-off-by: Mario Limonciello --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 89 --- 1 file changed, 58 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 4829b5431e4c

[PATCH v7 23/45] drm/amd: Use `amdgpu_ucode_*` helpers for PSP

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

[PATCH v7 19/45] drm/amd: Load GFX11 microcode during early_init

2023-01-05 Thread Mario Limonciello
ucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->v6: * Rebase on earlier changes --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 26 +++--- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers

[PATCH v7 17/45] drm/amd: Load GFX10 microcode during early_init

2023-01-05 Thread Mario Limonciello
: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 84 ++ 1 file changed, 18 insertions(+), 66 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c index

[PATCH v7 21/45] drm/amd: Avoid BUG() for case of SRIOV missing IP version

2023-01-05 Thread Mario Limonciello
No need to crash the kernel. AMDGPU will now fail to probe. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH v7 18/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX11

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper will provide symmetery on unload. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

[PATCH v7 16/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX10

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unload. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->v6: * Adj

[PATCH v7 15/45] drm/amd: Load GFX9 microcode during early_init

2023-01-05 Thread Mario Limonciello
If GFX9 microcode is required but not available during early init, the firmware framebuffer will have already been released and the screen will freeze. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 58

[PATCH v7 14/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX9

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper will provide symmetry on unload. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

<    1   2   3   4   5   6   7   8   9   >