Re: [PATCH V5 1/9] drivers core: Add support for Wifi band RF mitigations

2023-07-05 Thread Mario Limonciello
On 7/5/23 21:58, Quan, Evan wrote: [AMD Official Use Only - General] Hi Andrew, I discussed with Mario about your proposal/concerns here. We believe some changes below might address your concerns. - place/move the wbrf_supported_producer check inside acpi_amd_wbrf_add_exclusion and

[RFC 2/2] drm/amd: Extend ASPM disablement for Intel Sapphire rapids host + AMD dGPU

2023-07-05 Thread Mario Limonciello
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2663 Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index

[RFC 1/2] drm/amd: Extend Intel ASPM quirk to all dGPUs

2023-07-05 Thread Mario Limonciello
More failures are reported across additional products and so it seems unless we have a handle on the fundmental ASPM incompatibilities with Intel host and AMD dGPU, we should not allow them on problematic hosts. Fixes: 0064b0ce85bb ("drm/amd/pm: enable ASPM by default") Signed-off

[PATCH] drm/amd: Avoid running psp_ras_initialize() on HW without RAS

2023-07-05 Thread Mario Limonciello
running the rest of the function is RAS is not available. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1415 Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2673 Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +++ 1 file changed, 3 insertions(+) diff

Re: [PATCH V5 1/9] drivers core: Add support for Wifi band RF mitigations

2023-07-03 Thread Mario Limonciello
exclusions on receiving an ACPI notification for a new frequency change. Co-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello Co-developed-by: Evan Quan Signed-off-by: Evan Quan -- v4->v5: - promote this to be a more generic solution with input argument tak

[PATCH] drm/amd: Restore flashing support for PSP 13.0.10

2023-06-30 Thread Mario Limonciello
This was accidentally lost by commit e6e3bee0bc9a3 ("drm/amd: Use attribute groups for PSP flashing attributes") Fixes: e6e3bee0bc9a ("drm/amd: Use attribute groups for PSP flashing attributes") Reported-by: likun@amd.com Signed-off-by: Mario Limonciello --- driver

[PATCH v2 2/2] drm/amd: adjust whitespace for amdgpu_psp.h

2023-06-27 Thread Mario Limonciello
Adjust the whitespace to be consistent with the rest of the `struct psp_context` structure. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h b

[PATCH v2 1/2] drm/amd: Detect IFWI or PD upgrade support in psp_early_init()

2023-06-27 Thread Mario Limonciello
Rather than evaluating the IP version for visibility, evaluate it at the same time as the IP is initialized. Suggested-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v1->v2: * Move to psp_context --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 45 ++--- drivers/gpu/

[PATCH] drm/amd: Detect IFWI or PD upgrade support in psp_early_init()

2023-06-27 Thread Mario Limonciello
Rather than evaluating the IP version for visibility, evaluate it at the same time as the IP is initialized. Suggested-by: Lijo Lazar Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 45 ++--- 2

[PATCH 5/5] drm/amd: Add documentation for how to flash a dGPU

2023-06-26 Thread Mario Limonciello
Signed-off-by: Mario Limonciello --- Documentation/gpu/amdgpu/flashing.rst | 33 + Documentation/gpu/amdgpu/index.rst | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 16 3 files changed, 50 insertions(+) create mode 100644 Documentation/gpu/amdgpu

[PATCH 2/5] drm/amd: Use attribute groups for PSP flashing attributes

2023-06-26 Thread Mario Limonciello
Individually creating attributes can be racy, instead make attributes using attribute groups and control their visibility with an is_visible callback to only show when using appropriate products. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 - drivers/gpu

[PATCH 4/5] drm/amd: Convert USB-C PD F/W attributes into groups

2023-06-26 Thread Mario Limonciello
Rather than special casing the creation of the file, special case the visibility to the supported dGPUs. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 40 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 1 - 2 files changed, 9 insertions

[PATCH 3/5] drm/amd: Make flashing messages quieter

2023-06-26 Thread Mario Limonciello
Debug messages related to the kernel process of flashing an updated IFWI are needlessly noisy and also confusing. Downgrade them to debug instead and clarify what they are actually doing. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 8 1 file changed

[PATCH 1/5] drm/amd: Don't initialize PSP twice for Navi3x

2023-06-26 Thread Mario Limonciello
PSP functions are already set by psp_early_init() so initializing them a second time is unnecessary. No intended functional changes. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH] drm/amd: Fix a documentation warning about excess parameters

2023-06-26 Thread Mario Limonciello
Move to common indirect reg access helper") Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 65fe0f3488679..

[PATCH v2 4/4] Revert "drm/amd: Disable PSR-SU on Parade 0803 TCON"

2023-06-23 Thread Mario Limonciello
This reverts commit 33eec907ce0eb50a56dca621aa7310f7fa904b93. This is no longer necessary when using newer DMUB F/W. Cc: Sean Wang Cc: Marc Rossi Cc: Hamza Mahfooz Cc: Tsung-hua (Ryan) Lin Reviewed-by: Leo Li Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/modules/power

[PATCH v2 1/4] drm/amd/display: Correct `DMUB_FW_VERSION` macro

2023-06-23 Thread Mario Limonciello
The `DMUB_FW_VERSION` macro has a mistake in that the revision field is off by one byte. The last byte is typically used for other purposes and not a revision. Cc: Sean Wang Cc: Marc Rossi Cc: Hamza Mahfooz Cc: Tsung-hua (Ryan) Lin Reviewed-by: Leo Li Signed-off-by: Mario Limonciello

[PATCH v2 2/4] drm/amd/display: Set minimum requirement for using PSR-SU on Rembrandt

2023-06-23 Thread Mario Limonciello
Mahfooz Cc: Tsung-hua (Ryan) Lin Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2443 Signed-off-by: Mario Limonciello --- v1->v2: * Fix a s/dcn314/dcn31/ mixup --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 3 ++- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c |

[PATCH v2 3/4] drm/amd/display: Set minimum requirement for using PSR-SU on Phoenix

2023-06-23 Thread Mario Limonciello
The same parade TCON issue can potentially happen on Phoenix, and the same PSR resilience changes have been ported into the DMUB firmware. Don't allow running PSR-SU unless on the newer firmware. Cc: Sean Wang Cc: Marc Rossi Cc: Hamza Mahfooz Cc: Tsung-hua (Ryan) Lin Signed-off-by: Mario

[PATCH v2 0/4] Add checks for enabling PSR-SU

2023-06-23 Thread Mario Limonciello
Rossi Cc: Hamza Mahfooz Cc: Tsung-hua (Ryan) Lin Mario Limonciello (4): drm/amd/display: Correct `DMUB_FW_VERSION` macro drm/amd/display: Set minimum requirement for using PSR-SU on Rembrandt drm/amd/display: Set minimum requirement for using PSR-SU on Phoenix Revert "drm/amd: Disabl

[PATCH] drm/amd: Don't try to enable secure display TA multiple times

2023-06-22 Thread Mario Limonciello
ek Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2633 Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 89a62df76a12..c4

[PATCH 4/4] Revert "drm/amd: Disable PSR-SU on Parade 0803 TCON"

2023-06-22 Thread Mario Limonciello
This reverts commit 33eec907ce0eb50a56dca621aa7310f7fa904b93. This is no longer necessary when using newer DMUB F/W. Cc: Sean Wang Cc: Marc Rossi Cc: Hamza Mahfooz Cc: Tsung-hua (Ryan) Lin Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/modules/power/power_helpers.c | 2

[PATCH 0/4] Add checks for enabling PSR-SU

2023-06-22 Thread Mario Limonciello
Rossi Cc: Hamza Mahfooz Cc: Tsung-hua (Ryan) Lin Mario Limonciello (4): drm/amd/display: Correct `DMUB_FW_VERSION` macro drm/amd/display: Set minimum requirement for using PSR-SU on Rembrandt drm/amd/display: Set minimum requirement for using PSR-SU on Phoenix Revert "drm/amd: Disabl

[PATCH 3/4] drm/amd/display: Set minimum requirement for using PSR-SU on Phoenix

2023-06-22 Thread Mario Limonciello
The same parade TCON issue can potentially happen on Phoenix, and the same PSR resilience changes have been ported into the DMUB firmware. Don't allow running PSR-SU unless on the newer firmware. Cc: Sean Wang Cc: Marc Rossi Cc: Hamza Mahfooz Cc: Tsung-hua (Ryan) Lin Signed-off-by: Mario

[PATCH 2/4] drm/amd/display: Set minimum requirement for using PSR-SU on Rembrandt

2023-06-22 Thread Mario Limonciello
Mahfooz Cc: Tsung-hua (Ryan) Lin Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2443 Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 3 ++- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 7 +++ drivers/gpu/drm/amd/display/dc

[PATCH 1/4] drm/amd/display: Correct `DMUB_FW_VERSION` macro

2023-06-22 Thread Mario Limonciello
The `DMUB_FW_VERSION` macro has a mistake in that the revision field is off by one byte. The last byte is typically used for other purposes and not a revision. Cc: Sean Wang Cc: Marc Rossi Cc: Hamza Mahfooz Cc: Tsung-hua (Ryan) Lin Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd

[PATCH] drm/amd: Disable PSR-SU on Parade 0803 TCON

2023-06-19 Thread Mario Limonciello
Cc: Marc Rossi Cc: Hamza Mahfooz Suggested-by: Tsung-hua (Ryan) Lin Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2443 Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/modules/power/power_helpers.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd

Re: [PATCH V3 7/7] drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.7

2023-06-18 Thread Mario Limonciello
On 6/16/23 01:57, Evan Quan wrote: Fulfill the SMU13.0.7 support for Wifi RFI mitigation feature. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 59 +++ 1 file changed, 59 insertions(+) diff --git a/drivers

Re: [PATCH V3 6/7] drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.0

2023-06-18 Thread Mario Limonciello
On 6/16/23 01:57, Evan Quan wrote: Fulfill the SMU13.0.0 support for Wifi RFI mitigation feature. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 3 + drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 3 +- drivers/gpu/drm/amd

Re: [PATCH V3 5/7] drm/amd/pm: add flood detection for wbrf events

2023-06-18 Thread Mario Limonciello
On 6/16/23 01:57, Evan Quan wrote: To protect PMFW from being overloaded. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 28 --- drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 7 + 2 files changed, 31

Re: [PATCH V3 4/7] drm/amd/pm: setup the framework to support Wifi RFI mitigation feature

2023-06-18 Thread Mario Limonciello
WBRF feature functional, the kernel needs to be configured with CONFIG_ACPI_WBRF and the platform is equipped with necessary ACPI based mechanism to get amdgpu driver notified. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 26

Re: [PATCH V3 3/7] drm/amd/pm: update driver_if and ppsmc headers for coming wbrf feature

2023-06-18 Thread Mario Limonciello
On 6/16/23 01:57, Evan Quan wrote: Add those data structures to support Wifi RFI mitigation feature. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello --- .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h | 14 +- .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h

Re: [PATCH V3 2/7] wifi: mac80211: Add support for ACPI WBRF

2023-06-18 Thread Mario Limonciello
On 6/16/23 01:57, Evan Quan wrote: From: Mario Limonciello To support AMD's WBRF interference mitigation mechanism, Wifi adapters utilized in the system must register the frequencies in use(or unregister those frequencies no longer used) via the dedicated APCI calls. So that, other drivers

Re: [PATCH V3 1/7] drivers/acpi: Add support for Wifi band RF mitigations

2023-06-18 Thread Mario Limonciello
On 6/16/23 01:57, Evan Quan wrote: From: Mario Limonciello Due to electrical and mechanical constraints in certain platform designs there may be likely interference of relatively high-powered harmonics of the (G-)DDR memory clocks with local radio module frequency bands used by Wifi 6/6e/7

[PATCH 2/2] drm/amd: Tighten permissions on VBIOS flashing attributes

2023-06-07 Thread Mario Limonciello
Non-root users shouldn't be able to try to trigger a VBIOS flash or query the flashing status. This should be reserved for users with the appropriate permissions. Fixes: 8424f2ccb3c0 ("drm/amdgpu/psp: Add vbflash sysfs interface support") Reviewed-by: Alex Deucher Signed-off

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

2023-06-07 Thread Mario Limonciello
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 file

[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 changed

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 support S3.

[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
=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/drivers/gpu

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

2023-05-30 Thread Mario Limonciello
"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/drm/amd/-/issues/2599 Si

[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
=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/drivers/gpu

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

2023-05-30 Thread Mario Limonciello
ux/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(-) diff --git a/driver

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

2023-05-24 Thread Mario Limonciello
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/drm/amd

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 ; Limonciello

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

2023-05-18 Thread Mario Limonciello
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: Tim Huang

[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

[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

[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
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: Tim Huang

[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 suspend en

[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/amdgpu

[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
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 drm

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

2023-05-16 Thread Mario Limonciello
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
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 | 18

[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 insertion

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

2023-05-16 Thread Mario Limonciello
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/amd: Poll

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 | 2

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

2023-04-05 Thread Mario Limonciello
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/amdgpu_drv.c index e652ffb2c68e..25

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

2023-04-02 Thread Mario Limonciello
ther 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

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,

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

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 ---

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

2023-03-02 Thread Mario Limonciello
will be 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

[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(-) d

[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/amd/amd

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.c | 9

[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

[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/gpu/drm

[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 for dGPUs.

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

2023-02-20 Thread Mario Limonciello
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 Limonciello

[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 changed, 5

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

2023-02-13 Thread Mario Limonciello
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 this case -

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

2023-02-10 Thread Mario Limonciello
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/drm/amd

[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 --- drivers

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

2023-01-25 Thread Mario Limonciello
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 ++-- 1 file changed, 2

[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/amdkfd

[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/drm/amd

[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: Decrease

[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

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

2023-01-18 Thread Mario Limonciello
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 Documentation/gpu

[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
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_ucode

<    1   2   3   4   5   6   7   8   9   >