[PATCH 1/3] drm/amd: Fix handling of amdgpu.runpm on systems with BOCO

2023-11-28 Thread Mario Limonciello
icies in the -1 or -2 cases. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 80 +++-- 1 file changed, 48 insertions(+), 32 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index b5ebafd

[PATCH 0/3] Obey amdgpu.runpm even on BOCO systems

2023-11-28 Thread Mario Limonciello
I've found that on a system that supports BOCO when I try to override it that it still uses BOCO. This is because module parameter use is intermingled with automatic detection. This series moves automatic detection after module parameter use and makes all callers obey the result.

[PATCH 2/3] drm/amd: Introduce new enum for BAMACO

2023-11-28 Thread Mario Limonciello
Rather than plumbing module parameter deep into IP declare BAMACO runpm mode at amdgpu_driver_set_runtime_pm_mode() and then detect this mode in consumers. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c| 2 +- drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h

[PATCH 3/3] drm/amd: Drop calls for checking "support" for BACO/BOCO/PX

2023-11-28 Thread Mario Limonciello
le that is programmed when device is probed. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 34 -- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 3 +- 3 files changed, 24 insertions(+), 20

Re: [PATCH] drm/amdgpu: Add a new module param to disable d3cold

2023-11-29 Thread Mario Limonciello
On 11/29/2023 02:51, Ma Jun wrote: Some platforms can't resume from d3cold state, So add a new module parameter to disable d3cold state for debugging purpose or workaround. Signed-off-by: Ma Jun --- This patch is essentially an 'amdgpu knob' for d3cold on the root port. At least for debuggin

Re: [PATCH] drm/amdgpu: Restrict extended wait to PSP v13.0.6

2023-11-29 Thread Mario Limonciello
On 11/29/2023 06:36, Lijo Lazar wrote: Only PSPv13.0.6 SOCs take a longer time to reach steady state. Other PSPv13 based SOCs don't need extended wait. Also, reduce PSPv13.0.6 wait time. Signed-off-by: Lijo Lazar Thanks! Reviewed-by: Mario Limonciello When you commit can you please ad

Re: [PATCH v14 1/9] Documentation/driver-api: Add document about WBRF mechanism

2023-11-29 Thread Mario Limonciello
On 11/29/2023 03:13, Ma Jun wrote: Add documentation about AMD's Wifi band RFI mitigation (WBRF) mechanism explaining the theory and how it is used. Signed-off-by: Ma Jun Reviewed-by: Hans de Goede Reviewed-by: Mario Limonciello -- v14: - Fix the format issue (IIpo Jar

Re: [PATCH v14 2/9] platform/x86/amd: Add support for AMD ACPI based Wifi band RFI mitigation feature

2023-11-29 Thread Mario Limonciello
that if no other feedback is needed for the series can be fixed when committing. Reviewed-by: Mario Limonciello -- v11: - fix typo(Simon) v12: - Fix the code logic (Rafael) - Move amd_wbrf.c to drivers/platform/x86/amd/wbrf.c - Updated Evan's email because he's no

Re: [PATCH v14 3/9] cfg80211: expose nl80211_chan_width_to_mhz for wide sharing

2023-11-29 Thread Mario Limonciello
van's work". Otherwise LGTM. Reviewed-by: Mario Limonciello -- v8->v9: - correct typo(Mhz -> MHz) (Johnson) v13: - Fix the format issue (IIpo Jarvinen) --- include/net/cfg80211.h | 9 + net/wireless/chan.c| 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-)

[PATCH] drm/amd/display: Fix NULL pointer dereference at hibernate

2023-11-29 Thread Mario Limonciello
During hibernate sequence the source context might not have a clk_mgr. So don't use it to look for DML2 support. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2980 Fixes: a2815ada8616 ("drm/amd/display: Introduce DML2") Signed-off-by: Mario Limonciello --- drivers/gpu/drm

[PATCH] Revert "drm/amd/display: Adjust the MST resume flow"

2023-12-05 Thread Mario Limonciello
Reported-by: Oliver Schmidt Link: https://bugzilla.kernel.org/show_bug.cgi?id=218211 Link: https://forum.manjaro.org/t/problems-with-external-monitor-wake-up-after-suspend/151840 Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3023 Signed-off-by: Mario Limonciello --- .../gpu/drm/amd/display

Re: [PATCH] drm/amd/display: fix hw rotated modes when PSR-SU is enabled

2023-12-05 Thread Mario Limonciello
On 12/5/2023 14:17, Hamza Mahfooz wrote: We currently don't support dirty rectangles on hardware rotated modes. So, if a user is using hardware rotated modes with PSR-SU enabled, use PSR-SU FFU for all rotated planes (including cursor planes). Here is the email for the original reporter to giv

[PATCH] drm/amd/display: Restore guard against default backlight value < 1 nit

2023-12-06 Thread Mario Limonciello
Kovac Cc: Hamza Mahfooz Fixes: d9e865826c20 ("drm/amd/display: Simplify brightness initialization") Signed-off-by: Mario Limonciello --- .../amd/display/dc/link/protocols/link_edp_panel_control.c| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm

Re: [PATCH] drm/amd/display: fix hw rotated modes when PSR-SU is enabled

2023-12-06 Thread Mario Limonciello
On 12/6/2023 19:23, Kai-Heng Feng wrote: On Wed, Dec 6, 2023 at 4:29 AM Mario Limonciello wrote: On 12/5/2023 14:17, Hamza Mahfooz wrote: We currently don't support dirty rectangles on hardware rotated modes. So, if a user is using hardware rotated modes with PSR-SU enabled, use PSR-S

Re: [PATCH] drm/amd/display: fix hw rotated modes when PSR-SU is enabled

2023-12-06 Thread Mario Limonciello
On 12/6/2023 20:07, Kai-Heng Feng wrote: On Thu, Dec 7, 2023 at 9:57 AM Mario Limonciello wrote: On 12/6/2023 19:23, Kai-Heng Feng wrote: On Wed, Dec 6, 2023 at 4:29 AM Mario Limonciello wrote: On 12/5/2023 14:17, Hamza Mahfooz wrote: We currently don't support dirty rectangl

Re: [PATCH] drm/amd/display: fix hw rotated modes when PSR-SU is enabled

2023-12-07 Thread Mario Limonciello
rote: On Thu, Dec 7, 2023 at 10:10 AM Mario Limonciello wrote: On 12/6/2023 20:07, Kai-Heng Feng wrote: On Thu, Dec 7, 2023 at 9:57 AM Mario Limonciello wrote: On 12/6/2023 19:23, Kai-Heng Feng wrote: On Wed, Dec 6, 2023 at 4:29 AM Mario Limonciello wrote: On 12/5/2023 14:17, Hamza Mah

Re: [PATCH v2] drm/amd/display: fix hw rotated modes when PSR-SU is enabled

2023-12-07 Thread Mario Limonciello
582d1 ("drm/amd/display: add FB_DAMAGE_CLIPS support") Reported-by: Kai-Heng Feng Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2952 Tested-by: Kai-Heng Feng Tested-by: Bin Li Signed-off-by: Hamza Mahfooz Reviewed-by: Mario Limonciello --- v2: fix style issues and add tags --

Re: [PATCH 1/3] drm/amdgpu/sdma: add begin_use/end_use helpers

2023-12-08 Thread Mario Limonciello
should not impact power as SDMA usage is pretty minimal and GFXOSS should not be active when SDMA is active anyway, this just makes it explicit. Signed-off-by: Alex Deucher --- For the series: Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2220 Reviewed-by: Mario Limonciello Tested-by

Re: [PATCH V2] drm/amdgpu/sdma5.2: add begin/end_use ring callbacks

2023-12-09 Thread Mario Limonciello
://gitlab.freedesktop.org/drm/amd/-/issues/2220 Reviewed-by: Mario Limonciello (v1) Tested-by: Mario Limonciello (v1) Signed-off-by: Alex Deucher As SDMA5.2 is supported back to LTS ~5.15 I suggest also: Cc: sta...@vger.kernel.org # 5.15+ --- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 16

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

2023-12-10 Thread Mario Limonciello
h this TCON, disable PSR-SU again for it until it can be root caused. Cc: sta...@vger.kernel.org Cc: aaron...@canonical.com Cc: bi...@gnome.org Cc: Marc Rossi Cc: Hamza Mahfooz Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/modules/power/power_helpers.c | 2 ++ 1 file changed, 2

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

2023-12-11 Thread Mario Limonciello
On 12/9/2023 14:08, Mario Limonciello wrote: When screen brightness is rapidly changed and PSR-SU is enabled the display hangs on panels with this TCON even on the latest DCN 3.1.4 microcode (0x8002a81 at this time). This was disabled previously as commit 072030b17830 ("drm/amd: Disable P

Re: [GIT PULL] mmutable branch between pdx86 amd wbrf branch and wifi / amdgpu due for the v6.8 merge window

2023-12-11 Thread Mario Limonciello
On 12/11/2023 08:47, Christian König wrote: Am 11.12.23 um 12:02 schrieb Hans de Goede: Hi Wifi and AMDGPU maintainers, Here is a pull-request for the platform-drivers-x86 parts of: https://lore.kernel.org/platform-driver-x86/20231211100630.2170152-1-jun@amd.com/  From my pov the pdx86 bi

Re: [PATCH] Revert "drm/amd/display: Adjust the MST resume flow"

2023-12-11 Thread Mario Limonciello
Ping on this one. On 12/5/2023 13:54, Mario Limonciello wrote: This reverts commit ec5fa9fcdeca69edf7dab5ca3b2e0ceb1c08fe9a. Reports are that this causes problems with external monitors after wake up from suspend, which is something it was directly supposed to help. Cc: Linux Regressions Cc

Re: [GIT PULL] mmutable branch between pdx86 amd wbrf branch and wifi / amdgpu due for the v6.8 merge window

2023-12-11 Thread Mario Limonciello
On 12/11/2023 09:27, Alex Deucher wrote: On Mon, Dec 11, 2023 at 10:20 AM Mario Limonciello wrote: On 12/11/2023 08:47, Christian König wrote: Am 11.12.23 um 12:02 schrieb Hans de Goede: Hi Wifi and AMDGPU maintainers, Here is a pull-request for the platform-drivers-x86 parts of: https

Re: [PATCH] Revert "drm/amd/display: Adjust the MST resume flow"

2023-12-12 Thread Mario Limonciello
one. On 12/5/2023 13:54, Mario Limonciello wrote: This reverts commit ec5fa9fcdeca69edf7dab5ca3b2e0ceb1c08fe9a. Reports are that this causes problems with external monitors after wake up from suspend, which is something it was directly supposed to help. Cc: Linux Regressions Cc: sta...@vger.kern

Re: [GIT PULL] mmutable branch between pdx86 amd wbrf branch and wifi / amdgpu due for the v6.8 merge window

2023-12-12 Thread Mario Limonciello
On 12/12/2023 03:46, Johannes Berg wrote: On Mon, 2023-12-11 at 12:02 +0100, Hans de Goede wrote: Hi Wifi and AMDGPU maintainers, Here is a pull-request for the platform-drivers-x86 parts of: https://lore.kernel.org/platform-driver-x86/20231211100630.2170152-1-jun@amd.com/ From my pov th

[PATCH] drm/amd: Fix a probing order problem on SDMA 2.4

2023-12-12 Thread Mario Limonciello
2_4_init_microcode(). Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3043 Fixes: 751e293f2c99 ("drm/amd: Move microcode init from sw_init to early_init for SDMA v2.4") Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 4 ++-- 1 file changed, 2 inserti

Re: [PATCH] Revert "drm/amd/display: Adjust the MST resume flow"

2023-12-12 Thread Mario Limonciello
On 12/12/2023 18:08, Oliver Schmidt wrote: Hi Wayne, On 12.12.23 17:06, Mario Limonciello wrote: I looked through your bugs related to this and I didn't see a reference to the specific docking station model. The logs mentioned "Thinkpad dock" but no model. Could you share more a

Re: [PATCH] Revert "drm/amd/display: Adjust the MST resume flow"

2023-12-13 Thread Mario Limonciello
On 12/13/2023 08:17, Alex Deucher wrote: On Tue, Dec 12, 2023 at 9:00 PM Mario Limonciello wrote: On 12/12/2023 18:08, Oliver Schmidt wrote: Hi Wayne, On 12.12.23 17:06, Mario Limonciello wrote: I looked through your bugs related to this and I didn't see a reference to the specific do

[PATCH] drm/amd: Add a workaround for GFX11 systems that fail to flush TLB

2023-12-13 Thread Mario Limonciello
retry the flush when detecting running on an older firmware and decrease relevant error messages to debug while workaround is in use. Cc: sta...@vger.kernel.org # 6.1+ Cc: Tim Huang Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3045 Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd

Re: [PATCH] drm/amd: Add a workaround for GFX11 systems that fail to flush TLB

2023-12-13 Thread Mario Limonciello
On 12/13/2023 13:07, Alex Deucher wrote: On Wed, Dec 13, 2023 at 1:00 PM Mario Limonciello wrote: Some systems with MP1 13.0.4 or 13.0.11 have a firmware bug that causes the first MES packet after resume to fail. This packet is used to flush the TLB when GART is enabled. This issue is fixed

Re: [PATCH] drm/amd: Add a workaround for GFX11 systems that fail to flush TLB

2023-12-13 Thread Mario Limonciello
On 12/13/2023 13:12, Mario Limonciello wrote: On 12/13/2023 13:07, Alex Deucher wrote: On Wed, Dec 13, 2023 at 1:00 PM Mario Limonciello wrote: Some systems with MP1 13.0.4 or 13.0.11 have a firmware bug that causes the first MES packet after resume to fail. This packet is used to flush the

[PATCH v2] drm/amd: Add a workaround for GFX11 systems that fail to flush TLB

2023-12-13 Thread Mario Limonciello
that will add an extra dummy read on resume that the result is discarded. Cc: sta...@vger.kernel.org # 6.1+ Cc: Tim Huang Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3045 Signed-off-by: Mario Limonciello --- v1->v2: * Add a dummy read callback instead and use that. --- drivers/gpu/

Re: [GIT PULL] mmutable branch between pdx86 amd wbrf branch and wifi / amdgpu due for the v6.8 merge window

2023-12-14 Thread Mario Limonciello
On 12/14/2023 10:36, Kalle Valo wrote: Hans de Goede writes: Hi Wifi and AMDGPU maintainers, Here is a pull-request for the platform-drivers-x86 parts of: https://lore.kernel.org/platform-driver-x86/20231211100630.2170152-1-jun@amd.com/ From my pov the pdx86 bits are ready and the plat

[PATCH] drm/amd: Make SW CTF handler cope with different read_sensor() results

2023-12-14 Thread Mario Limonciello
ic to catch this circumstance and output a warning. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/

[PATCH] drm/amd/display: Pass errors from amdgpu_dm_init() up

2024-05-19 Thread Mario Limonciello
Errors in amdgpu_dm_init() are silently ignored and dm_hw_init() will succeed. However often these are fatal errors and it would be better to pass them up. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +- 1 file changed, 5 insertions(+), 1

[PATCH 0/2] Add support for Panel Power Savings property

2024-05-19 Thread Mario Limonciello
on will get an -EBUSY return code. When the compositor has restored the value back to "Allowed" then the previous value that would have been programmed will be restored. Mario Limonciello (2): drm: Introduce panel_power_saving drm property drm/amd: Add panel_power_saving drm property

[PATCH 2/2] drm/amd: Add panel_power_saving drm property to eDP connectors

2024-05-19 Thread Mario Limonciello
When the `panel_power_saving` property is set to "Forbidden" ABM should be disabled immediately and any requests by sysfs to update will return an -EBUSY error. When the property is restored to "Allowed" the previous value of ABM will be restored. Signed-off-by: Mario Limon

[PATCH 1/2] drm: Introduce panel_power_saving drm property

2024-05-19 Thread Mario Limonciello
The `panel_power_saving` DRM property is an optional property that can be added to a connector by a driver. This property is for compositors to indicate intent of allowing policy for the driver to use power saving features that may compromise color fidelity. Signed-off-by: Mario Limonciello

[PATCH 1/2] tests/amdgpu/amd_abm: Make set_abm_level return type int

2024-05-19 Thread Mario Limonciello
From: Mario Limonciello In order to bubble of cases of expeted errors on set_abm_level() change the return type to int. Signed-off-by: Mario Limonciello --- tests/amdgpu/amd_abm.c | 33 +++-- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/tests

[PATCH 0/2] Add support for testing panel power saving DRM property

2024-05-19 Thread Mario Limonciello
color fidelity. This set of IGT changes introduces a new subtest that will cover the expected kernel behavior when switching between Allowed and Forbidden. Mario Limonciello (2): tests/amdgpu/amd_abm: Make set_abm_level return type int tests/amdgpu/amd_abm: Add support for panel_power_savin

[PATCH 2/2] tests/amdgpu/amd_abm: Add support for panel_power_saving property

2024-05-19 Thread Mario Limonciello
From: Mario Limonciello When the "panel power saving" property is set to forbidden the compositor has indicated that userspace prefers to have color accuracy and fidelity instead of power saving. Verify that the sysfs file behaves as expected in this situation. Signed-off-by: Mario L

Re: [PATCH] drm/amd/display: Add pixel encoding info to debugfs

2024-05-20 Thread Mario Limonciello
On 5/20/2024 16:07, Rino Andre Johnsen wrote: [Why] For debugging and testing purposes. [How] Create amdgpu_current_pixelencoding debugfs entry. Usage: cat /sys/kernel/debug/dri/1/crtc-0/amdgpu_current_pixelencoding Signed-off-by: Rino Andre Johnsen --- .../amd/display/amdgpu_dm/amdgpu_dm_de

Re: [PATCH 0/2] Add support for Panel Power Savings property

2024-05-21 Thread Mario Limonciello
On 5/21/2024 08:43, Simon Ser wrote: This makes sense to me in general. I like the fact that it's simple and vendor-neutral. Do we want to hardcode "panel" in the name? Are we sure that this will ever only apply to panels? Do we want to use a name which reflects the intent, rather than the mech

Re: [PATCH 0/2] Add support for Panel Power Savings property

2024-05-21 Thread Mario Limonciello
On 5/21/2024 11:14, Xaver Hugl wrote: Am Di., 21. Mai 2024 um 16:00 Uhr schrieb Mario Limonciello : On 5/21/2024 08:43, Simon Ser wrote: This makes sense to me in general. I like the fact that it's simple and vendor-neutral. Do we want to hardcode "panel" in the name? Are we

Re: [PATCH v1 0/3] Add support for ISP interrupts and disable prefetch

2024-05-21 Thread Mario Limonciello
/gpu/drm/amd/amdgpu/isp_v4_1_1.c create mode 100644 drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.h create mode 100644 drivers/gpu/drm/amd/include/ivsrcid/isp/irqsrcs_isp_4_1.h Reviewed-by: Mario Limonciello

Re: [PATCH 0/2] Add support for Panel Power Savings property

2024-05-21 Thread Mario Limonciello
On 5/21/2024 12:27, Leo Li wrote: On 2024-05-21 12:21, Mario Limonciello wrote: On 5/21/2024 11:14, Xaver Hugl wrote: Am Di., 21. Mai 2024 um 16:00 Uhr schrieb Mario Limonciello : On 5/21/2024 08:43, Simon Ser wrote: This makes sense to me in general. I like the fact that it's simple

Re: [PATCH v2] drm/amd/display: Add pixel encoding info to debugfs

2024-05-21 Thread Mario Limonciello
On 5/21/2024 15:06, Rino André Johnsen wrote: What is already there in debugfs is 'bpc' and 'colorspace', but not the pixel encoding/format. I have searched high and low for that to be able to verify that my monitor and computer are using my preferred combination of all those three values. I do

Re: [PATCH v2] drm/amd/display: Add pixel encoding info to debugfs

2024-05-22 Thread Mario Limonciello
ere the colorspace property is created: https://github.com/torvalds/linux/blob/v6.9/drivers/gpu/drm/drm_connector.c#L2147 I would expect you can make another property for the information you're looking for and then can get it from userspace using standard property APIs. Rino On

[PATCH v2 1/2] drm: Introduce 'power saving policy' drm property

2024-05-22 Thread Mario Limonciello
-by: Mario Limonciello --- drivers/gpu/drm/drm_connector.c | 46 + include/drm/drm_connector.h | 2 ++ include/drm/drm_mode_config.h | 5 include/uapi/drm/drm_mode.h | 7 + 4 files changed, 60 insertions(+) diff --git a/drivers/gpu/drm

[PATCH v2 2/2] drm/amd: Add power_saving_policy drm property to eDP connectors

2024-05-22 Thread Mario Limonciello
d be disabled. When the property is restored to an empty bit mask the previous value of ABM and pSR will be restored. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 ++ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 51 +-- .../gpu/drm/a

[PATCH v2 0/2] Add support for 'power saving policy' property

2024-05-22 Thread Mario Limonciello
no requirements then the previous value that would have been programmed will be restored. --- v1->v2: * New property as a bitmask * Handle both ABM and PSR/PSR2 * Add documentation Mario Limonciello (2): drm: Introduce 'power saving policy' drm property drm/amd: Add power_

[PATCH v2 0/4] Add support for testing power saving policy DRM property

2024-05-22 Thread Mario Limonciello
irements. This set of IGT changes introduces a new subtest that will cover the expected kernel behavior when switching between requirements. Mario Limonciello (4): Add support for API for drivers to set power saving policy tests/amdgpu/amd_abm: Make set_abm_level return type int tests/amdg

[PATCH v2 1/4] Add support for API for drivers to set power saving policy

2024-05-22 Thread Mario Limonciello
--- lib/igt_kms.c | 26 ++ lib/igt_kms.h | 6 ++ 2 files changed, 32 insertions(+) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index af63d13b1..4ce5e4a95 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -6581,3 +6581,29 @@ int get_num_scalers(int drm_fd, enum pipe pip

[PATCH v2 4/4] tests/amdgpu/amd_psr: Add support for `power saving policy` property

2024-05-22 Thread Mario Limonciello
Verify that the property has disabled PSR --- tests/amdgpu/amd_psr.c | 74 ++ 1 file changed, 74 insertions(+) diff --git a/tests/amdgpu/amd_psr.c b/tests/amdgpu/amd_psr.c index 9da161a09..a9f4a6aa5 100644 --- a/tests/amdgpu/amd_psr.c +++ b/tests/amdgpu/amd

[PATCH v2 2/4] tests/amdgpu/amd_abm: Make set_abm_level return type int

2024-05-22 Thread Mario Limonciello
From: Mario Limonciello In order to bubble of cases of expeted errors on set_abm_level() change the return type to int. Signed-off-by: Mario Limonciello --- tests/amdgpu/amd_abm.c | 33 +++-- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/tests

[PATCH v2 3/4] tests/amdgpu/amd_abm: Add support for panel_power_saving property

2024-05-22 Thread Mario Limonciello
From: Mario Limonciello When the "panel power saving" property is set to forbidden the compositor has indicated that userspace prefers to have color accuracy and fidelity instead of power saving. Verify that the sysfs file behaves as expected in this situation. Signed-off-by: Mario L

[PATCH] drm/amd: Fix shutdown (again) on some SMU v13.0.4/11 platforms

2024-05-26 Thread Mario Limonciello
kages/issues/50417 Cc: sta...@vger.kernel.org Fixes: cd94d1b182d2 ("dm/amd/pm: Fix problems with reboot/shutdown for some SMU 13.0.4/13.0.11 users") Signed-off-by: Mario Limonciello --- Cc: regressi...@lists.linux.dev --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c | 20 ++-

[PATCH] drm/client: Detect when ACPI lid is closed during initialization

2024-05-27 Thread Mario Limonciello
ucher Reported-by: Chris Bainbridge Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3349 Signed-off-by: Mario Limonciello --- drivers/gpu/drm/drm_client_modeset.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/gpu/drm/drm_client_modeset.c b/driver

Re: [PATCH] drm/amd/amdgpu: Fix 'snprintf' output truncation warning

2024-05-28 Thread Mario Limonciello
ff-by: Pratap Nirujogi As the kernel robot reported this you should add a "Reported-by:" tag for it. Otherwise LGTM (feel free to add that tag when committing). Reviewed-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v2] drm/client: Detect when ACPI lid is closed during initialization

2024-05-28 Thread Mario Limonciello
Chris Bainbridge Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3349 Signed-off-by: Mario Limonciello --- Cc: hughsi...@gmail.com v1->v2: * Match LVDS as well --- drivers/gpu/drm/drm_client_modeset.c | 30 1 file changed, 30 insertions(+) diff --git a/drivers

Re: [PATCH v2] drm/client: Detect when ACPI lid is closed during initialization

2024-05-29 Thread Mario Limonciello
On 5/29/2024 08:55, Alex Deucher wrote: On Wed, May 29, 2024 at 9:51 AM Jani Nikula wrote: On Wed, 29 May 2024, Alex Deucher wrote: On Tue, May 28, 2024 at 5:03 PM Mario Limonciello wrote: If the lid on a laptop is closed when eDP connectors are populated then it remains enabled when the

Re: [PATCH v2] drm/client: Detect when ACPI lid is closed during initialization

2024-05-29 Thread Mario Limonciello
On 5/29/2024 09:14, Ville Syrjälä wrote: On Tue, May 28, 2024 at 04:03:19PM -0500, Mario Limonciello wrote: If the lid on a laptop is closed when eDP connectors are populated then it remains enabled when the initial framebuffer configuration is built. When creating the initial framebuffer

Re: [PATCH v2] drm/client: Detect when ACPI lid is closed during initialization

2024-05-29 Thread Mario Limonciello
If you don't hook into some lid notify event how is one supposed to get the display back to life after opening the lid? I guess in my mind it's a tangential to the "initial modeset". The DRM master can issue a modeset to enable the combination as desired. This code is run whenever there's

[PATCH v3 1/2] drm: Introduce 'power saving policy' drm property

2024-06-05 Thread Mario Limonciello
: Leo Li Signed-off-by: Mario Limonciello --- v2->v3: * Add tag --- drivers/gpu/drm/drm_connector.c | 46 + include/drm/drm_connector.h | 2 ++ include/drm/drm_mode_config.h | 5 include/uapi/drm/drm_mode.h | 7 + 4 files changed, 60 inserti

[PATCH v3 2/2] drm/amd: Add power_saving_policy drm property to eDP connectors

2024-06-05 Thread Mario Limonciello
d be disabled. When the property is restored to an empty bit mask the previous value of ABM and pSR will be restored. Signed-off-by: Mario Limonciello --- v2->v3: * Use `disallow_edp_enter_psr` instead * Drop case in dm_update_crtc_state() --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c |

[PATCH v3 0/2] Add support for 'power saving policy' property

2024-06-05 Thread Mario Limonciello
no requirements then the previous value that would have been programmed will be restored. v2->v3: * Updates from Leo's comments (see individual patches) The matching changes for the igt are here: https://lore.kernel.org/dri-devel/2024050849.33343-1-mario.limoncie...@amd.com/ Mario Limonciell

Re: [syzbot] [mm?] general protection fault in dequeue_hugetlb_folio_nodemask

2024-06-06 Thread Mario Limonciello
/8992fc8fe046/bzImage-0e1980c4.xz The issue was bisected to: commit cd94d1b182d2986378550c9087571991bfee01d4 Author: Mario Limonciello Date: Thu May 2 18:32:17 2024 + dm/amd/pm: Fix problems with reboot/shutdown for some SMU 13.0.4/13.0.11 users bisection log: https

Re: [PATCH v2] drm/amdgpu: Fix the BO release clear memory warning

2024-06-06 Thread Mario Limonciello
On 6/6/2024 15:04, Arunpravin Paneer Selvam wrote: This happens when the amdgpu_bo_release_notify running before amdgpu_ttm_set_buffer_funcs_status set the buffer funcs to enabled. check the buffer funcs enablement before calling the fill buffer memory. v2:(Christian) - Apply it only for GEM

[PATCH] drm/amd/display: Set default brightness according to ACPI

2024-06-06 Thread Mario Limonciello
at should be used if the system is brought up in AC and DC respectively. Use these values to set up the default brightness when the backlight device is registered. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 4 drivers/gpu/drm/amd/display/amdgpu

Re: [PATCH] drm/amd/display: Guard ACPI calls with CONFIG_ACPI

2024-06-10 Thread Mario Limonciello
On 6/10/2024 09:55, sunpeng...@amd.com wrote: From: Leo Li To fix CONFIG_ACPI disabled build error. Fixes: ec6f30c776ad ("drm/amd/display: Set default brightness according to ACPI") Signed-off-by: Leo Li --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++ 1 file changed, 6 i

Re: [PATCH v2] drm/amd/display: Guard ACPI calls with CONFIG_ACPI

2024-06-10 Thread Mario Limonciello
evice *dev, enum amdgpu_ss ss_state) { return 0; } +static inline void amdgpu_acpi_get_backlight_caps(struct amdgpu_dm_backlight_caps *caps) { } #endif #if defined(CONFIG_ACPI) && defined(CONFIG_SUSPEND) Reviewed-by: Mario Limonciello

Re: [PATCH] drm/amd: force min_input_signal to 0 on Framework AMD 13/16

2024-06-10 Thread Mario Limonciello
+Kieran On 6/10/2024 14:26, Thomas Weißschuh wrote: The value of "min_input_signal" returned from ATIF on a Framework AMD 13 is "12". This leads to a fairly bright minimum display backlight. Introduce a quirk to override "min_input_signal" to "0" which leads to a much lower minimum brightness,

Re: [PATCH] drm/amd: force min_input_signal to 0 on Framework AMD 13/16

2024-06-10 Thread Mario Limonciello
On 6/10/2024 15:12, Thomas Weißschuh wrote: On 2024-06-10 14:58:02+, Mario Limonciello wrote: +Kieran On 6/10/2024 14:26, Thomas Weißschuh wrote: The value of "min_input_signal" returned from ATIF on a Framework AMD 13 is "12". This leads to a fairly bright minim

[PATCH v3] drm/fb-helper: Detect when lid is closed during initialization

2024-06-12 Thread Mario Limonciello
ue to monitor for any future lid events. Suggested-by: Dmitry Torokhov Reported-by: Chris Bainbridge Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3349 Signed-off-by: Mario Limonciello --- v2->v3: * Use input device instead of ACPI device * Detect lid open/close events --- drivers

Re: [PATCH v3] drm/fb-helper: Detect when lid is closed during initialization

2024-06-14 Thread Mario Limonciello
On 6/14/2024 03:15, Thomas Zimmermann wrote: Hi Mario Am 13.06.24 um 07:17 schrieb Mario Limonciello: If the lid on a laptop is closed when eDP connectors are populated then it remains enabled when the initial framebuffer configuration is built. When creating the initial framebuffer

Re: [PATCH v3] drm/fb-helper: Detect when lid is closed during initialization

2024-06-14 Thread Mario Limonciello
On 6/14/2024 09:17, Thomas Zimmermann wrote: Hi Am 14.06.24 um 15:47 schrieb Mario Limonciello: On 6/14/2024 03:15, Thomas Zimmermann wrote: Hi Mario Am 13.06.24 um 07:17 schrieb Mario Limonciello: If the lid on a laptop is closed when eDP connectors are populated then it remains enabled

[PATCH 1/2] drm/amdgpu/pptable: Fix __counted_by attribute

2024-06-14 Thread Mario Limonciello
The attribute is not helpful if commented out. Cc: Tasos Sahanidis Fixes: c6c4dd540125 ("drm/amdgpu/pptable: Fix UBSAN array-index-out-of-bounds") Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/include/pptable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH 2/2] drm/amd/pm: powerplay: Add `__counted_by` attribute for flexible arrays

2024-06-14 Thread Mario Limonciello
This attribute is used to hint the length of flexible arrays to compiler and sanitizers. Signed-off-by: Mario Limonciello --- .../drm/amd/pm/powerplay/hwmgr/pptable_v1_0.h | 36 +- drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h | 38 +-- 2 files changed, 37

Re: [PATCH 2/2] drm/radeon: fix UBSAN warning in kv_dpm.c

2024-06-14 Thread Mario Limonciello
On 6/14/2024 13:33, Alex Deucher wrote: Adds bounds check for sumo_vid_mapping_entry. Signed-off-by: Alex Deucher Reviewed-by: Mario Limonciello --- drivers/gpu/drm/radeon/sumo_dpm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/radeon/sumo_dpm.c b/drivers/gpu

Re: [PATCH 1/2] drm/amdgpu: fix UBSAN warning in kv_dpm.c

2024-06-14 Thread Mario Limonciello
On 6/14/2024 13:33, Alex Deucher wrote: Adds bounds check for sumo_vid_mapping_entry. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3392 Signed-off-by: Alex Deucher Reviewed-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 2 ++ 1 file changed, 2

[PATCH] drm/amd: Don't initialize ISP hardware without FW

2024-06-18 Thread Mario Limonciello
block doesn't go through the other init and fini sequences. Also decrease the message about firmware load failure to debug so it's not as alarming to users. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-

Re: [PATCH v2 3/4] tests/amdgpu/amd_abm: Add support for panel_power_saving property

2024-06-18 Thread Mario Limonciello
On 6/18/2024 15:20, Leo Li wrote: Thanks for the tests! FYI IGT patches should also cc igt-...@lists.freedesktop.org Some comments inline: On 2024-05-22 18:08, Mario Limonciello wrote: From: Mario Limonciello When the "panel power saving" property is set to forbidden the comp

Re: [PATCH v2 4/4] tests/amdgpu/amd_psr: Add support for `power saving policy` property

2024-06-18 Thread Mario Limonciello
On 6/18/2024 15:20, Leo Li wrote: On 2024-05-22 18:08, Mario Limonciello wrote: Verify that the property has disabled PSR ---   tests/amdgpu/amd_psr.c | 74 ++   1 file changed, 74 insertions(+) diff --git a/tests/amdgpu/amd_psr.c b/tests/amdgpu

Re: [PATCH v3 2/2] drm/amd: Add power_saving_policy drm property to eDP connectors

2024-06-18 Thread Mario Limonciello
On 6/18/2024 17:36, Leo Li wrote: On 2024-06-05 22:04, Mario Limonciello wrote: When the `power_saving_policy` property is set to bit mask "Require color accuracy" ABM should be disabled immediately and any requests by sysfs to update will return an -EBUSY error.

Re: [PATCH v2 1/3] drm: Add panel backlight quirks

2024-06-23 Thread Mario Limonciello
On 6/23/2024 03:51, Thomas Weißschuh wrote: Panels using a PWM-controlled backlight source without an do not have a standard way to communicate their valid PWM ranges. On x86 the ranges are read from ACPI through driver-specific tables. The built-in ranges are not necessarily correct, or may grow

Re: [PATCH v2 1/3] drm: Add panel backlight quirks

2024-06-24 Thread Mario Limonciello
On 6/23/2024 15:55, Hans de Goede wrote: Hi, On 6/23/24 10:20 PM, Mario Limonciello wrote: On 6/23/2024 03:51, Thomas Weißschuh wrote: Panels using a PWM-controlled backlight source without an do not have a standard way to communicate their valid PWM ranges. On x86 the ranges are read from

[PATCH 1/2] Documentation/amdgpu: Add Ryzen AI 300 series processors

2024-06-24 Thread Mario Limonciello
These have been announced so add them to the table. Link: https://www.amd.com/en/products/processors/laptop/ryzen/300-series/amd-ryzen-ai-9-hx-370.html Signed-off-by: Mario Limonciello --- Documentation/gpu/amdgpu/apu-asic-info-table.csv | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH 2/2] Documentation/amdgpu: Add Ryzen 9000 series processors

2024-06-24 Thread Mario Limonciello
These have been announced so add them to the table. Link: https://www.amd.com/en/products/processors/desktops/ryzen/9000-series/amd-ryzen-9-9950x.html Signed-off-by: Mario Limonciello --- Documentation/gpu/amdgpu/apu-asic-info-table.csv | 1 + 1 file changed, 1 insertion(+) diff --git a

Re: [PATCH] drm/amd/display: use vmalloc for struct dc_state

2024-06-26 Thread Mario Limonciello
On 6/26/2024 16:45, Alex Deucher wrote: This is a big structure so use vmalloc as malloc can fail when there is memory pressure. vmalloc can be a bit slower, but I think it's fine for this context and better to handle memory pressure more nicely. Reviewed-by: Mario Limonciello C

Re: [PATCH v3 2/2] drm/amd: Add power_saving_policy drm property to eDP connectors

2024-07-01 Thread Mario Limonciello
On 7/1/2024 13:47, Xaver Hugl wrote: Am Do., 20. Juni 2024 um 22:22 Uhr schrieb Xaver Hugl : Merging can only happen once a real world userspace application has implemented support for it. I'll try to do that sometime next week in KWin Here's the promised implementation: https://invent.kde.org

Re: [PATCH v2 0/3] drm: backlight quirk infrastructure and lower minimum for Framework AMD 13

2024-07-02 Thread Mario Limonciello
On 6/23/2024 3:51, Thomas Weißschuh wrote: The value of "min_input_signal" returned from ATIF on a Framework AMD 13 is "12". This leads to a fairly bright minimum display backlight. Add a generic quirk infrastructure for backlight configuration to override the settings provided by the firmware.

Re: [PATCH v3 2/2] drm/amd: Add power_saving_policy drm property to eDP connectors

2024-07-02 Thread Mario Limonciello
On 7/1/2024 17:34, Xaver Hugl wrote: Am Mo., 1. Juli 2024 um 21:02 Uhr schrieb Mario Limonciello : Hmm I'm a bit surprised the IGT tests I did didn't catch this. Are you working on a system with two GPUs by chance (like a Framework 16)? If so; can you try the "other GPU"?

[PATCH v4 0/2] Add support for 'power saving policy' property

2024-07-02 Thread Mario Limonciello
no requirements then the previous value that would have been programmed will be restored. v3->v4: * Fixup for Xaver's reported issue v2->v3: * Updates from Leo's comments (see individual patches) Mario Limonciello (2): drm: Introduce 'power saving policy' drm property

[PATCH v4 1/2] drm: Introduce 'power saving policy' drm property

2024-07-02 Thread Mario Limonciello
: Leo Li Signed-off-by: Mario Limonciello --- v3->v4: * Handle -ENOMEM case too --- drivers/gpu/drm/drm_connector.c | 48 + include/drm/drm_connector.h | 2 ++ include/drm/drm_mode_config.h | 5 include/uapi/drm/drm_mode.h | 7 + 4 files chan

[PATCH v4 2/2] drm/amd: Add power_saving_policy drm property to eDP connectors

2024-07-02 Thread Mario Limonciello
d be disabled. When the property is restored to an empty bit mask ABM and PSR can be enabled again. Signed-off-by: Mario Limonciello --- v3->v4: * Fix enabling again after disable (Xaver) --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 ++ .../gpu/drm/amd/display/amd

[PATCH] drm/amd: Fail the suspend sequence if the GPU doesn't use S3 or S0i3

2024-07-10 Thread Mario Limonciello
Really we don't want this flow to be possible. Fail the sequence if the dGPU won't be suspended using either method. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3476 Link: https://github.com/systemd/systemd/issues/25151 Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amd

Re: amdgpu [drm] *ERROR* dc_dmub_srv_log_diagnostic_data: DMCUB error - collecting diagnostic data

2024-07-11 Thread Mario Limonciello
On 7/10/2024 13:03, Thomas Glanzmann wrote: Hello, * Thomas Glanzmann [2024-07-10 07:19]: [ 11.902016] amdgpu :0b:00.0: [drm] *ERROR* dc_dmub_srv_log_diagnostic_data: DMCUB error - collecting diagnostic data I resolved the issue by updating my firmware: git clone https://git.kernel.

[PATCH] drm/amd: Flush GFXOFF requests in prepare stage

2024-03-21 Thread Mario Limonciello
From: Mario Limonciello If the system hasn't entered GFXOFF when suspend starts it can cause hangs accessing GC and RLC during the suspend stage. Cc: # 6.1.y: 5095d5418193 ("drm/amd: Evict resources during PM ops prepare() callback") Cc: # 6.1.y: cb11ca3233aa ("drm

Re: [PATCH] drm/amd: Only allow one entity to control ABM

2024-04-26 Thread Mario Limonciello
On 4/13/2024 03:51, Gergo Koteles wrote: Hi> ABM will reduce the backlight and compensate by adjusting brightness and contrast of the image. It has 5 levels: 0, 1, 2, 3, 4. 0 means off. 4 means maximum backlight reduction. IMO, 1 and 2 look okay. 3 and 4 can be quite impactful, both to power

<    1   2   3   4   5   6   7   8   9   >