[PATCH] drm/amd: Don't wake dGPUs while reading sensors

2024-08-19 Thread Mario Limonciello
From: Mario Limonciello If the dGPU is off, then reading the sysfs files with a sensor monitoring application will wake it. Change the behavior to return an error when the dGPU is in D3cold. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 90

Re: [PATCH] drm/amd/display: change the panel power savings level without a modeset

2024-08-19 Thread Mario Limonciello
On 8/9/24 15:42, Hamza Mahfooz wrote: We don't actually need to request that the compositor does a full modeset to modify the panel power savings level, we can instead just make a request to DMUB, to set the new level dynamically. Cc: Harry Wentland Cc: Leo Li Cc: Mario Limonciell

Re: commit 9d8c094ddab0 breaks Xorg/xfce4

2024-08-20 Thread Mario Limonciello
. 9d8c094ddab05db88d183ba82e23be807848cad8 is the first bad commit commit 9d8c094ddab05db88d183ba82e23be807848cad8 Author: Mario Limonciello Date: Wed Jul 3 00:17:22 2024 -0500 drm/amd: Add power_saving_policy drm property to eDP connectors When the `power_saving_policy` property is set to bit mask "Re

Re: [PATCH v5 0/4] drm: Minimum backlight overrides and implementation for amdgpu

2024-08-21 Thread Mario Limonciello
On 8/18/2024 01:56, 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, which is

Re: [PATCH v5 1/4] drm: Add panel backlight quirks

2024-08-21 Thread Mario Limonciello
. Reviewed-by: Mario Limonciello --- Documentation/gpu/drm-kms-helpers.rst| 3 ++ drivers/gpu/drm/Kconfig | 4 ++ drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/drm_panel_backlight_quirks.c | 70 include/drm

Re: [PATCH v5 2/4] drm/amd/display: Add support for minimum backlight quirk

2024-08-21 Thread Mario Limonciello
abilities where necessary. Signed-off-by: Thomas Weißschuh Tested-by: Dustin L. Howett The code looks fine to me but please wait for an ack from someone on the AMD display team. Also, I would like to see comments about the testing with panel power savings enabled to avoid a conflict. Rev

Re: [PATCH v5 3/4] drm: panel-backlight-quirks: Add Framework 13 matte panel

2024-08-21 Thread Mario Limonciello
much lower minimum brightness, which is still visible. Tested on a Framework AMD 13 BIOS 3.05 with the matte panel. Link: https://community.frame.work/t/25711/9 Link: https://community.frame.work/t/47036 Signed-off-by: Thomas Weißschuh Tested-by: Dustin L. Howett Reviewed-by: Mario Limon

Re: [PATCH v5 4/4] drm: panel-backlight-quirks: Add Framework 13 glossy and 2.8k panels

2024-08-21 Thread Mario Limonciello
ur own S-o-b as well. Please add that for v6. Otherwise: Reviewed-by: Mario Limonciello --- drivers/gpu/drm/drm_panel_backlight_quirks.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/drm_panel_backlight_quirks.c b/drivers/gpu/drm/drm_panel_backlight

Re: [PATCH v5 1/4] drm: Add panel backlight quirks

2024-08-22 Thread Mario Limonciello
On 8/22/2024 01:12, Thomas Weißschuh wrote: On 2024-08-21 15:51:17+, Mario Limonciello wrote: On 8/18/2024 01:56, Thomas Weißschuh wrote: Panels using a PWM-controlled backlight source do not have a standard way to communicate their valid PWM ranges. On x86 the ranges are read from ACPI

Re: [PATCH v5 2/4] drm/amd/display: Add support for minimum backlight quirk

2024-08-22 Thread Mario Limonciello
On 8/22/2024 01:14, Thomas Weißschuh wrote: On 2024-08-21 15:54:14+, Mario Limonciello wrote: On 8/18/2024 01:56, Thomas Weißschuh wrote: Not all platforms provide correct PWM backlight capabilities through ATIF. I don't think correct is an accurate term here. How about 

Re: [PATCH] drm/amdgpu: fix OLAND card ip_init failed during kdump caputrue kernel boot

2024-08-22 Thread Mario Limonciello
On 7/23/2024 04:42, Lu Yao wrote: [Why] When running kdump test on a machine with R7340 card, a hang is caused due to the failure of 'amdgpu_device_ip_init()', error message as follows: '[drm:amdgpu_device_ip_init [amdgpu]] *ERROR* hw_init of IP block failed -22' '[drm:uvd_v3_1_hw_init [

Re: [PATCH] drm/amd: Don't wake dGPUs while reading sensors

2024-08-23 Thread Mario Limonciello
On 8/23/2024 08:44, Hamza Mahfooz wrote: On 8/19/24 22:04, Mario Limonciello wrote: From: Mario Limonciello If the dGPU is off, then reading the sysfs files with a sensor monitoring application will wake it. Change the behavior to return an error when the dGPU is in D3cold. Signed-off-by

Re: [PATCH] drm/amd: Don't wake dGPUs while reading sensors

2024-08-23 Thread Mario Limonciello
On 8/23/2024 09:09, Alex Deucher wrote: On Mon, Aug 19, 2024 at 10:30 PM Mario Limonciello wrote: From: Mario Limonciello If the dGPU is off, then reading the sysfs files with a sensor monitoring application will wake it. Change the behavior to return an error when the dGPU is in D3cold

Re: [PATCH] drm/amd: Don't wake dGPUs while reading sensors

2024-08-23 Thread Mario Limonciello
On 8/23/2024 09:31, Alex Deucher wrote: On Fri, Aug 23, 2024 at 10:13 AM Mario Limonciello wrote: On 8/23/2024 09:09, Alex Deucher wrote: On Mon, Aug 19, 2024 at 10:30 PM Mario Limonciello wrote: From: Mario Limonciello If the dGPU is off, then reading the sysfs files with a sensor

[PATCH v2 1/2] drm/amd: Reduce sysfs and debugfs attribute boilerplate

2024-08-23 Thread Mario Limonciello
All accesses to attributes have a check for reset/suspend/runpm. Move this code into dedicated functions. No intended functional changes. Signed-off-by: Mario Limonciello --- v1->v2: * Split out to two patches to reduce boilerplate with common functions * Different behavior for sysfs

[PATCH v2 2/2] drm/amd: Don't wake dGPUs while reading sensors

2024-08-23 Thread Mario Limonciello
If the dGPU is off, then reading the sysfs files with a sensor monitoring application will wake it. Change the behavior to return an error when the dGPU is in runtime PM. Leave the behavior the same for debugfs files. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 8

Re: [PATCH] drm/amd: Don't wake dGPUs while reading sensors

2024-08-25 Thread Mario Limonciello
On 8/25/24 15:40, Luna Nova wrote: Raised this as an issue a while back on the bug tracker and it got closed as WONTFIX. https://gitlab.freedesktop.org/drm/amd/-/issues/2229 Been running a patched kernel with a similar patch locally ever since because even figuring out everything on the syst

Re: [PATCH v6 2/4] drm/amd/display: Add support for minimum backlight quirk

2024-08-26 Thread Mario Limonciello
wonder if we need to internally turn off panel power savings in display code when brightness falls a threshold (12 IIRC was the real "minimum" advertised in the table?). Signed-off-by: Thomas Weißschuh Tested-by: Dustin L. Howett Reviewed-by: Mario Limonciello --- driver

Re: [PATCH] amdgpu: disable amdgpu_dpm on THTF-SW831-1W-DS25_MB board

2024-08-28 Thread Mario Limonciello
On 8/28/2024 05:59, WangYuli wrote: From: wenlunpeng The quirk is for reboot-stability. A device reboot stress test has been observed to cause random system hangs when amdgpu_dpm is enabled. Disabling amdgpu_dpm can fix this. However, a boot-param can still overwrite it to enable amdgpu_dpm.

Re: [PATCH] amdgpu: disable amdgpu_dpm on THTF-SW831-1W-DS25_MB board

2024-08-28 Thread Mario Limonciello
On 8/28/2024 11:14, Alex Deucher wrote: On Wed, Aug 28, 2024 at 11:47 AM WangYuli wrote: On 2024/8/28 23:30, Alex Deucher wrote: On Wed, Aug 28, 2024 at 7:28 AM WangYuli wrote: This will disable dpm on all devices that you might install on this platform. If this is specific to a particula

[PATCH v6 00/10] drm/amd/display: Use drm_edid for more code

2024-09-11 Thread Mario Limonciello
From: Mario Limonciello This is the successor of Melissa's v5 series that was posted [1] as well as my series that was posted [2]. Melissa's patches are mostly unmodified from v5, but modified to apply on top of v6.11-rc7 instead. The same limitations she called out with amd-stagin

[PATCH v6 02/10] drm/amd/display: switch to setting physical address directly

2024-09-11 Thread Mario Limonciello
From: Melissa Wen Connectors have source physical address available in display info. Use drm_dp_cec_attach() to use it instead of parsing the EDID again. Signed-off-by: Melissa Wen Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++--- 1 file

[PATCH v6 01/10] drm/amd/display: switch amdgpu_dm_connector to use struct drm_edid

2024-09-11 Thread Mario Limonciello
From: Melissa Wen Replace raw edid handling (struct edid) with the opaque EDID type (struct drm_edid) on amdgpu_dm_connector for consistency. It may also prevent mismatch of approaches in different parts of the driver code. Signed-off-by: Melissa Wen Co-developed-by: Mario Limonciello Signed

[PATCH v6 03/10] drm/amd/display: always call connector_update when parsing freesync_caps

2024-09-11 Thread Mario Limonciello
From: Melissa Wen Update connector caps with drm_edid data before parsing info for freesync. Signed-off-by: Melissa Wen Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu

[PATCH v6 04/10] drm/amd/display: remove redundant freesync parser for DP

2024-09-11 Thread Mario Limonciello
From: Melissa Wen When updating connector under drm_edid infrastructure, many calculations and validations are already done and become redundant inside AMD driver. Remove those driver-specific code in favor of the DRM common code. Signed-off-by: Melissa Wen Co-developed-by: Mario Limonciello

[PATCH v6 05/10] drm/amd/display: use drm_edid_product_id for parsing EDID product info

2024-09-11 Thread Mario Limonciello
From: Melissa Wen Since [1], we can use drm_edid_product_id to get debug info from drm_edid instead of directly parsing EDID. Link: https://lore.kernel.org/dri-devel/cover.1712655867.git.jani.nik...@intel.com/ [1] Signed-off-by: Melissa Wen Co-developed-by: Mario Limonciello Signed-off-by

[PATCH v6 07/10] drm/amd/display: get SAD from drm_eld when parsing EDID caps

2024-09-11 Thread Mario Limonciello
-by: Melissa Wen Signed-off-by: Mario Limonciello --- v6: - Move changelog to below cutlist v5: - squash with `don't give initial values for sad/b_count` (Alex H) - add more informative commit description (Alex H) --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 20 +-- 1

[PATCH v6 06/10] drm/amd/display: parse display name from drm_eld

2024-09-11 Thread Mario Limonciello
From: Melissa Wen We don't need to parse dc_edid to get the display name since it's already set in drm_eld which in turn had it values updated when updating connector with the opaque drm_edid. Signed-off-by: Melissa Wen Signed-off-by: Mario Limonciello --- .../gpu/drm/amd/display

[PATCH v6 09/10] drm/amd/display: remove dc_edid handler from dm_helpers_parse_edid_caps

2024-09-11 Thread Mario Limonciello
From: Melissa Wen We can parse edid caps from drm_edid and drm_eld and any calls of dm_helpers_parse_edid_caps is made in a state that we have drm_edid set to amdgpu connector. Signed-off-by: Melissa Wen Co-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello --- v6: - Move

[PATCH v6 08/10] drm/amd/display: get SADB from drm_eld when parsing EDID caps

2024-09-11 Thread Mario Limonciello
Wen Signed-off-by: Mario Limonciello --- v6: Move changelog below cutlist v5: add more informative commit description (Alex H) --- .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/display

[PATCH v6 10/10] drm/amd: Fetch the EDID from _DDC if available for eDP

2024-09-11 Thread Mario Limonciello
From: Mario Limonciello Some manufacturers have intentionally put an EDID that differs from the EDID on the internal panel on laptops. Attempt to fetch this EDID if it exists and prefer it over the EDID that is provided by the panel. If a user prefers to use the EDID from the panel, offer a DC

[PATCH v6 10/10] drm/amd/display: Fetch the EDID from _DDC if available for eDP

2024-09-11 Thread Mario Limonciello
From: Mario Limonciello Some manufacturers have intentionally put an EDID that differs from the EDID on the internal panel on laptops. Attempt to fetch this EDID if it exists and prefer it over the EDID that is provided by the panel. If a user prefers to use the EDID from the panel, offer a DC

[PATCH] drm/amd/display: Validate backlight caps are sane

2024-09-13 Thread Mario Limonciello
pread is at least half of the values that amdgpu would use if no ACPI table was found and if not use the amdgpu defaults. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3020 Signed-off-by: Mario Limonciello --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c| 16 1

Re: [PATCH] drm/amd/display: Validate backlight caps are sane

2024-09-13 Thread Mario Limonciello
On 9/13/2024 13:47, Harry Wentland wrote: On 2024-09-13 14:00, Mario Limonciello wrote: Currently amdgpu takes backlight caps provided by the ACPI tables on systems as is. If the firmware sets maximums that are too low this means that users don't get a good experience. To avoid havi

Re: [PATCH] drm/amd/display: Validate backlight caps are sane

2024-09-13 Thread Mario Limonciello
On 9/13/2024 15:36, Alex Deucher wrote: On Fri, Sep 13, 2024 at 2:51 PM Mario Limonciello wrote: On 9/13/2024 13:47, Harry Wentland wrote: On 2024-09-13 14:00, Mario Limonciello wrote: Currently amdgpu takes backlight caps provided by the ACPI tables on systems as is. If the firmware

[PATCH] drm/amd/display: Allow backlight to go below `AMDGPU_DM_DEFAULT_MIN_BACKLIGHT`

2024-09-15 Thread Mario Limonciello
From: Mario Limonciello The issue with panel power savings compatibility below `AMDGPU_DM_DEFAULT_MIN_BACKLIGHT` happens at `AMDGPU_DM_DEFAULT_MIN_BACKLIGHT` as well. That issue will be fixed separately, so don't prevent the backlight brightness from going that low. Cc: Harry Wentlan

[PATCH v2 0/4] Add support for fetching EDID from ACPI _DDC

2024-01-30 Thread Mario Limonciello
more involved amdgpu display driver work that will come separately as part of follow-ups to: https://lore.kernel.org/amd-gfx/20240126163429.56714-1-m...@igalia.com/ Mario Limonciello (4): ACPI: video: Handle fetching EDID that is longer than 256 bytes drm: Add drm_get_acpi_edid() helper drm

[PATCH v2 1/4] ACPI: video: Handle fetching EDID that is longer than 256 bytes

2024-01-30 Thread Mario Limonciello
than necessary. Decrease from info to debug. Link: https://uefi.org/htmlspecs/ACPI_Spec_6_4_html/Apx_B_Video_Extensions/output-device-specific-methods.html#ddc-return-the-edid-for-this-device Signed-off-by: Mario Limonciello --- v1->v2: * Use for loop for acpi_video_get_edid() * Use one of

[PATCH v2 2/4] drm: Add drm_get_acpi_edid() helper

2024-01-30 Thread Mario Limonciello
Some manufacturers have intentionally put an EDID that differs from the EDID on the internal panel on laptops. Drivers can call this helper to attempt to fetch the EDID from the BIOS's ACPI _DDC method. Signed-off-by: Mario Limonciello --- v1->v2: * Split code from previous amdgpu

[PATCH v2 4/4] drm/nouveau: Use drm_get_acpi_edid() helper

2024-01-30 Thread Mario Limonciello
Rather than inventing a wrapper to acpi_video_get_edid() use the one provided by drm. This fixes two problems: 1. A memory leak that the memory provided by the ACPI call was never freed. 2. Validation of the BIOS provided blob. Signed-off-by: Mario Limonciello --- v1->v2: * New pa

[PATCH v2 3/4] drm/amd: Fetch the EDID from _DDC if available for eDP

2024-01-30 Thread Mario Limonciello
Some manufacturers have intentionally put an EDID that differs from the EDID on the internal panel on laptops. Attempt to fetch this EDID if it exists and prefer it over the EDID that is provided by the panel. Signed-off-by: Mario Limonciello --- v2: * Use drm helper which will run more

[PATCH v3 3/5] drm/amd: Fetch the EDID from _DDC if available for eDP

2024-02-01 Thread Mario Limonciello
Some manufacturers have intentionally put an EDID that differs from the EDID on the internal panel on laptops. Attempt to fetch this EDID if it exists and prefer it over the EDID that is provided by the panel. Signed-off-by: Mario Limonciello --- v2: * Use drm helper which will run more

[PATCH v3 1/5] ACPI: video: Handle fetching EDID that is longer than 256 bytes

2024-02-01 Thread Mario Limonciello
than necessary. Decrease from info to debug. Link: https://uefi.org/htmlspecs/ACPI_Spec_6_4_html/Apx_B_Video_Extensions/output-device-specific-methods.html#ddc-return-the-edid-for-this-device Signed-off-by: Mario Limonciello --- v1->v2: * Use for loop for acpi_video_get_edid() * Use one of

[PATCH v3 4/5] drm/nouveau: Use drm_get_acpi_edid() helper

2024-02-01 Thread Mario Limonciello
Rather than inventing a wrapper to acpi_video_get_edid() use the one provided by drm. This fixes two problems: 1. A memory leak that the memory provided by the ACPI call was never freed. 2. Validation of the BIOS provided blob. Signed-off-by: Mario Limonciello --- v1->v2: * New pa

[PATCH v3 2/5] drm: Add drm_get_acpi_edid() helper

2024-02-01 Thread Mario Limonciello
Some manufacturers have intentionally put an EDID that differs from the EDID on the internal panel on laptops. Drivers can call this helper to attempt to fetch the EDID from the BIOS's ACPI _DDC method. Signed-off-by: Mario Limonciello --- v1->v2: * Split code from previous amdgpu

[PATCH v3 5/5] drm: Drop unneeded selects in DRM drivers

2024-02-01 Thread Mario Limonciello
All of the selects on ACPI_VIDEO are unnecessary when DRM does the select for ACPI_VIDEO as it provides a helper for acpi based EDID. Signed-off-by: Mario Limonciello --- v2->v3: * new patch --- drivers/gpu/drm/amd/amdgpu/Kconfig | 7 --- drivers/gpu/drm/gma500/Kconfig

[PATCH v3 0/5] Add support for fetching EDID from ACPI _DDC

2024-02-01 Thread Mario Limonciello
O' from the DRM drivers Mario Limonciello (5): ACPI: video: Handle fetching EDID that is longer than 256 bytes drm: Add drm_get_acpi_edid() helper drm/amd: Fetch the EDID from _DDC if available for eDP drm/nouveau: Use drm_get_acpi_edid() helper drm: Drop unneeded selects in DRM dr

Re: [PATCH v3 2/5] drm: Add drm_get_acpi_edid() helper

2024-02-02 Thread Mario Limonciello
On 2/2/2024 04:29, Jani Nikula wrote: On Thu, 01 Feb 2024, Mario Limonciello wrote: Some manufacturers have intentionally put an EDID that differs from the EDID on the internal panel on laptops. Drivers can call this helper to attempt to fetch the EDID from the BIOS's ACPI _DDC method.

Re: [PATCH v3 1/5] ACPI: video: Handle fetching EDID that is longer than 256 bytes

2024-02-02 Thread Mario Limonciello
On 2/2/2024 10:07, Rafael J. Wysocki wrote: On Thu, Feb 1, 2024 at 11:11 PM Mario Limonciello wrote: The ACPI specification allows for an EDID to be up to 512 bytes but the _DDC EDID fetching code will only try up to 256 bytes. Modify the code to instead start at 512 bytes and work it'

Re: [PATCH v2] drm/amd/display: add panel_power_savings sysfs entry to eDP connectors

2024-02-02 Thread Mario Limonciello
a new "panel_power_savings" sysfs attribute. Cc: Mario Limonciello Signed-off-by: Hamza Mahfooz Reviewed-by: Mario Limonciello Tested-by: Mario Limonciello --- v2: hide ABM_LEVEL_IMMEDIATE_DISABLE in the read case, force an atomic commit when setting the value, call sysfs_re

[PATCH] drm/amd/display: Clear phantom stream count and plane count

2024-02-02 Thread Mario Limonciello
When dc_state_destruct() was refactored the new phantom_stream_count and phantom_plane_count members weren't cleared. Fixes: 012a04b1d6af ("drm/amd/display: Refactor phantom resource allocation") Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/dc/core/dc_state.c

[PATCH] drm/amd/display: Force full frame updates on DP 38-ec-11

2024-02-03 Thread Mario Limonciello
The 38-ec-11 TCON contained in some AUO panels will hang when used with PSR-SU and changing the brightness. Forcing a full frame update works around the issue, so add a quirk for this panel to do just that. Reported-by: aaron...@canonical.com Signed-off-by: Mario Limonciello --- Cc: hamza.mahf

[PATCH] drm/amd/display: Disable PSR-SU on Parade 08-01 TCON too

2024-02-05 Thread Mario Limonciello
/drm/amd/uploads/8f13ff3b00963c833e23e68aa8116959/output.log [2] Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2645 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

[PATCH] drm/amd: Set s0i3/s3 in prepare() callback instead of suspend() callback

2024-02-06 Thread Mario Limonciello
lleter Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3132#note_2271038 Fixes: 5095d5418193 ("drm/amd: Evict resources during PM ops prepare() callback") Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 14 -- 1 file changed, 4 insertions(+), 10 deletio

Re: [PATCH] drm/amd: Set s0i3/s3 in prepare() callback instead of suspend() callback

2024-02-06 Thread Mario Limonciello
On 2/6/2024 16:00, Deucher, Alexander wrote: [AMD Official Use Only - General] -Original Message- From: amd-gfx On Behalf Of Mario Limonciello Sent: Tuesday, February 6, 2024 4:32 PM To: amd-gfx@lists.freedesktop.org Cc: Limonciello, Mario ; Jürg Billeter Subject: [PATCH] drm/amd

[PATCH v2 2/2] drm/amd: Stop evicting resources on APUs in suspend

2024-02-07 Thread Mario Limonciello
s prepare() callback") Signed-off-by: Mario Limonciello --- v1->v2: * Add and use new in_prepare member --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 46 -- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 21 ++ 3

[PATCH v2 1/2] Revert "drm/amd: flush any delayed gfxoff on suspend entry"

2024-02-07 Thread Mario Limonciello
Users report that by using GNOME to suspend the lockscreen trigger will cause SDMA traffic and the system can deadlock. This reverts commit 0dee726395333fea833eaaf838bc80962df886c8. Fixes: ab4750332dbe ("drm/amdgpu/sdma5.2: add begin/end_use ring callbacks") Signed-off-by: Mario Limonci

Re: [PATCH v2 2/2] drm/amd: Stop evicting resources on APUs in suspend

2024-02-07 Thread Mario Limonciello
On 2/7/2024 16:34, Alex Deucher wrote: On Wed, Feb 7, 2024 at 3:48 PM Mario Limonciello wrote: commit 5095d5418193 ("drm/amd: Evict resources during PM ops prepare() callback") intentionally moved the eviction of resources to earlier in the suspend process, but this introduce

[PATCH v4 0/3] Add drm_get_acpi_edid() helper

2024-02-07 Thread Mario Limonciello
drm_edid. There will be a follow up patch to amdgpu after Melissa Wen finishes that effort [2]. https://lore.kernel.org/dri-devel/20240201221119.42564-1-mario.limoncie...@amd.com/ [1] https://lore.kernel.org/amd-gfx/20240126163429.56714-1-m...@igalia.com/ [2] Mario Limonciello (3): drm: Add

[PATCH v4 2/3] drm/nouveau: Use drm_get_acpi_edid() helper

2024-02-07 Thread Mario Limonciello
drm_edid at the same time. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/nouveau/nouveau_acpi.c | 27 - drivers/gpu/drm/nouveau/nouveau_acpi.h | 2 -- drivers/gpu/drm/nouveau/nouveau_connector.c | 20 +++ 3 files changed, 9 insertions(+), 40

[PATCH v4 3/3] drm: Drop unneeded selects in DRM drivers

2024-02-07 Thread Mario Limonciello
All of the selects on ACPI_VIDEO are unnecessary when DRM does the select for ACPI_VIDEO as it provides a helper for acpi based EDID. Reviewed-by: Pranjal Ramajor Asha Kanojiya Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/Kconfig | 7 --- drivers/gpu/drm/gma500/Kconfig

[PATCH v4 1/3] drm: Add drm_get_acpi_edid() helper

2024-02-07 Thread Mario Limonciello
Some manufacturers have intentionally put an EDID that differs from the EDID on the internal panel on laptops. Drivers can call this helper to attempt to fetch the EDID from the BIOS's ACPI _DDC method. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/Kconfig| 5 +++ drivers/gp

[PATCH v4 1/3] Revert "drm/amd: flush any delayed gfxoff on suspend entry"

2024-02-07 Thread Mario Limonciello
Users report that by using GNOME to suspend the lockscreen trigger will cause SDMA traffic and the system can deadlock. This reverts commit 0dee726395333fea833eaaf838bc80962df886c8. Acked-by: Alex Deucher Fixes: ab4750332dbe ("drm/amdgpu/sdma5.2: add begin/end_use ring callbacks") Si

[PATCH v4 3/3] drm/amd: Drop unneeded functions to check if s3/s0ix active

2024-02-07 Thread Mario Limonciello
amdgpu_acpi_is_s0ix_active() and amdgpu_acpi_is_s0ix_active() aren't needed to be checked multiple times in a suspend cycle. Checking and setting up policy one time in the prepare() callback is sufficient. Signed-off-by: Mario Limonciello --- v4: New patch --- drivers/gpu/drm/amd/a

[PATCH v4 2/3] drm/amd: Stop evicting resources on APUs in suspend

2024-02-07 Thread Mario Limonciello
t resources during PM ops prepare() callback") Signed-off-by: Mario Limonciello --- v3->v4: * New function to set s0ix/s3 and explicitly unset in cleanup v2->v3: * Whitespace v1->v2: * Add and use new in_prepare member --- drivers/gpu/drm/amd/amdgpu/amdgpu.h

Re: [PATCH] drm/buddy: Fix alloc_range() error handling code

2024-02-08 Thread Mario Limonciello
https://gitlab.freedesktop.org/drm/amd/-/issues/3097 Syntax should be "Closes: $URL" Fixes: 0a1844bf0b53 ("drm/buddy: Improve contiguous memory allocation") Signed-off-by: Arunpravin Paneer Selvam Tested-by: Mario Limonciello Acked-by: Christian König CC: stable.. ? I will

Re: [PATCH v4 3/3] drm/amd: Drop unneeded functions to check if s3/s0ix active

2024-02-08 Thread Mario Limonciello
On 2/8/2024 00:54, Christian König wrote: Am 08.02.24 um 06:52 schrieb Mario Limonciello: amdgpu_acpi_is_s0ix_active() and amdgpu_acpi_is_s0ix_active() aren't needed to be checked multiple times in a suspend cycle.  Checking and setting up policy one time in the prepare() callback is suffi

Re: [PATCH v4 1/3] drm: Add drm_get_acpi_edid() helper

2024-02-08 Thread Mario Limonciello
On 2/8/2024 08:31, Jani Nikula wrote: On Thu, 08 Feb 2024, Maxime Ripard wrote: On Thu, Feb 08, 2024 at 11:57:11AM +0200, Jani Nikula wrote: On Wed, 07 Feb 2024, Mario Limonciello wrote: Some manufacturers have intentionally put an EDID that differs from the EDID on the internal panel on

Re: [PATCH] drm/amdgpu: make damage clips support configurable

2024-02-08 Thread Mario Limonciello
for PSR-SU displays. Cc: Mario Limonciello Signed-off-by: Hamza Mahfooz I think this with this patch in place you could also revert 571c2fa26aa6 ("drm/amd/display: Disable PSR-SU on Parade 0803 TCON again") One minor nit below otherwise LGTM. Reviewed-by: Mario Limonciello ---

Re: [PATCH v4 1/3] drm: Add drm_get_acpi_edid() helper

2024-02-09 Thread Mario Limonciello
On 2/9/2024 05:07, Daniel Vetter wrote: On Thu, Feb 08, 2024 at 11:57:11AM +0200, Jani Nikula wrote: On Wed, 07 Feb 2024, Mario Limonciello wrote: Some manufacturers have intentionally put an EDID that differs from the EDID on the internal panel on laptops. Drivers can call this helper to

Re: [PATCH] drm/amdgpu: respect the abmlevel module parameter value if it is set

2024-02-10 Thread Mario Limonciello
level that they want to use. So, prevent user space from changing the ABM level if the module parameter is set to a non-auto value. Signed-off-by: Hamza Mahfooz Reviewed-by: Mario Limonciello Tested-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drive

Re: [PATCH v4 1/3] drm: Add drm_get_acpi_edid() helper

2024-02-10 Thread Mario Limonciello
On 2/9/2024 12:57, Daniel Vetter wrote: On Fri, Feb 09, 2024 at 09:34:13AM -0600, Mario Limonciello wrote: On 2/9/2024 05:07, Daniel Vetter wrote: On Thu, Feb 08, 2024 at 11:57:11AM +0200, Jani Nikula wrote: On Wed, 07 Feb 2024, Mario Limonciello wrote: Some manufacturers have intentionally

[PATCH v5 0/3] Add support for getting EDID over ACPI to DRM

2024-02-11 Thread Mario Limonciello
This series adds the ability to fetch the EDID through ACPI for laptop panels. Drivers need to opt into the behavior. In this series it's enabled by default for all eDP or LVDS panels with AMDGPU and certain panels for Nouveau. Mario Limonciello (3): drm: Add support to get EDID from

[PATCH v5 2/3] drm/amd: Fetch the EDID from _DDC if available for eDP

2024-02-11 Thread Mario Limonciello
disable this. Signed-off-by: Mario Limonciello --- v4->v5: * rebase on v5 changes --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c| 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 driv

[PATCH v5 3/3] drm/nouveau: Use drm_edid_read_acpi() helper

2024-02-11 Thread Mario Limonciello
drm_edid at the same time. Signed-off-by: Mario Limonciello --- v1->v2: * New patch v3->v4: * Rebase on v4 changes v4->v5: * Rebase on v5 changes --- drivers/gpu/drm/nouveau/nouveau_acpi.c | 27 drivers/gpu/drm/nouveau/nouveau_acpi.h | 2 -- drivers/gpu/dr

[PATCH v5 1/3] drm: Add support to get EDID from ACPI

2024-02-11 Thread Mario Limonciello
ff-by: Mario Limonciello --- v1->v2: * Split code from previous amdgpu specific helper to generic drm helper. v2->v3: * Add an extra select to fix a variety of randconfig errors found from LKP robot. v3->v4: * Return struct drm_edid v4->v5: * Rename to drm_edid_read_acp

Re: [PATCH v5 1/3] drm: Add support to get EDID from ACPI

2024-02-12 Thread Mario Limonciello
On 2/10/2024 23:50, Mario Limonciello wrote: Some manufacturers have intentionally put an EDID that differs from the EDID on the internal panel on laptops. Drivers that prefer to fetch this EDID can set a bit on the drm_connector to indicate that the DRM EDID helpers should try to fetch it and

Re: [PATCH v5 1/3] drm: Add support to get EDID from ACPI

2024-02-12 Thread Mario Limonciello
On 2/12/2024 10:31, Mario Limonciello wrote: On 2/10/2024 23:50, Mario Limonciello wrote: Some manufacturers have intentionally put an EDID that differs from the EDID on the internal panel on laptops.  Drivers that prefer to fetch this EDID can set a bit on the drm_connector to indicate that

[PATCH v6 0/5] Add support for getting EDID over ACPI to DRM

2024-02-14 Thread Mario Limonciello
This series adds the ability to fetch the EDID through ACPI for laptop panels. Drivers need to opt into the behavior. In this series it's enabled by default for all eDP or LVDS panels with AMDGPU and certain panels for Nouveau. Mario Limonciello (5): drm: Stop using `select ACPI_VIDEO` i

[PATCH v6 1/5] drm: Stop using `select ACPI_VIDEO` in all drivers

2024-02-14 Thread Mario Limonciello
Many DRM drivers (ab)use `select ACPI_VIDEO` and to avoid problems will then select all the dependencies for ACPI_VIDEO. This creates a soft dependency, but makes it very hard to use ACPI_VIDEO in DRM core. Switch everything else over to use `depends on ACPI_VIDEO` instead. Signed-off-by: Mario

[PATCH v6 3/5] drm: Add support to get EDID from ACPI

2024-02-14 Thread Mario Limonciello
ff-by: Mario Limonciello --- drivers/gpu/drm/Kconfig | 1 + drivers/gpu/drm/drm_edid.c | 109 +--- include/drm/drm_connector.h | 6 ++ include/drm/drm_edid.h | 1 + 4 files changed, 109 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/Kcon

[PATCH v6 5/5] drm/nouveau: Use drm_edid_read_acpi() helper

2024-02-14 Thread Mario Limonciello
drm_edid at the same time. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/nouveau/nouveau_acpi.c | 27 drivers/gpu/drm/nouveau/nouveau_acpi.h | 2 -- drivers/gpu/drm/nouveau/nouveau_connector.c | 35 + 3 files changed, 14 insertions(+), 50

[PATCH v6 2/5] drm: Stop using `select BACKLIGHT_CLASS_DEVICE`

2024-02-14 Thread Mario Limonciello
Many drivers ab(use) `select BACKLIGHT_CLASS_DEVICE` to avoid dependency problems. This however makes it impossible for DRM core to be able to add a dependency on ACPI_VIDEO. Switch users of `select BACKLIGHT_CLASS_DEVICE` to `depends on BACKLIGHT_CLASS_DEVICE`. Signed-off-by: Mario Limonciello

[PATCH v6 4/5] drm/amd: Fetch the EDID from _DDC if available for eDP

2024-02-14 Thread Mario Limonciello
disable this. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c| 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 drivers/gpu/drm/amd/display/amdgpu_dm

Re: [PATCH v5 1/3] drm: Add support to get EDID from ACPI

2024-02-15 Thread Mario Limonciello
On 2/15/2024 08:01, Jani Nikula wrote: On Sat, 10 Feb 2024, Mario Limonciello wrote: Some manufacturers have intentionally put an EDID that differs from the EDID on the internal panel on laptops. Drivers that prefer to fetch this EDID can set a bit on the drm_connector to indicate that the

Re: [PATCH v2] drm/amd/display: add panel_power_savings sysfs entry to eDP connectors

2024-02-15 Thread Mario Limonciello
On 2/15/2024 11:54, Harry Wentland wrote: On 2024-02-02 11:20, Mario Limonciello wrote: On 2/2/2024 09:28, Hamza Mahfooz wrote: We want programs besides the compositor to be able to enable or disable panel power saving features. However, since they are currently only configurable through DRM

Re: [PATCH v6 3/5] drm: Add support to get EDID from ACPI

2024-02-15 Thread Mario Limonciello
On 2/14/2024 17:13, Ville Syrjälä wrote: On Wed, Feb 14, 2024 at 03:57:54PM -0600, Mario Limonciello wrote: Some manufacturers have intentionally put an EDID that differs from the EDID on the internal panel on laptops. Drivers that prefer to fetch this EDID can set a bit on the drm_connector

Re: [PATCH v6 3/5] drm: Add support to get EDID from ACPI

2024-02-15 Thread Mario Limonciello
On 2/15/2024 12:47, Ville Syrjälä wrote: On Thu, Feb 15, 2024 at 12:20:56PM -0600, Mario Limonciello wrote: On 2/14/2024 17:13, Ville Syrjälä wrote: On Wed, Feb 14, 2024 at 03:57:54PM -0600, Mario Limonciello wrote: Some manufacturers have intentionally put an EDID that differs from the EDID

[PATCH] drm/amd: Change `jpeg_v4_0_5_start_dpg_mode()` to void

2024-02-15 Thread Mario Limonciello
peg: add support for jpeg DPG mode") Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c index 3602738874ee..

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

2024-02-16 Thread Mario Limonciello
Also introduce a Kconfig option that allows distributions to choose the default policy that is appropriate for them. Fixes: f97e4303da16 ("drm/amd/display: add panel_power_savings sysfs entry to eDP connectors") Signed-off-by: Mario Limonciello --- Cc: Hamza Mahfooz Cc: Harry Wentlan

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

2024-02-16 Thread Mario Limonciello
On 2/16/2024 08:38, Christian König wrote: Am 16.02.24 um 15:07 schrieb Mario Limonciello: By exporting ABM to sysfs it's possible that DRM master and software controlling the sysfs file fight over the value programmed for ABM. Adjust the module parameter behavior to control who contro

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

2024-02-16 Thread Mario Limonciello
On 2/16/2024 09:05, Harry Wentland wrote: On 2024-02-16 09:47, Christian König wrote: Am 16.02.24 um 15:42 schrieb Mario Limonciello: On 2/16/2024 08:38, Christian König wrote: Am 16.02.24 um 15:07 schrieb Mario Limonciello: By exporting ABM to sysfs it's possible that DRM maste

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

2024-02-16 Thread Mario Limonciello
On 2/16/2024 09:41, Christian König wrote: Am 16.02.24 um 16:12 schrieb Mario Limonciello: On 2/16/2024 09:05, Harry Wentland wrote: On 2024-02-16 09:47, Christian König wrote: Am 16.02.24 um 15:42 schrieb Mario Limonciello: On 2/16/2024 08:38, Christian König wrote: Am 16.02.24 um 15:07

[PATCH] drm/amd: Drop abm_level property

2024-02-16 Thread Mario Limonciello
ggested-by: Harry Wentland Signed-off-by: Mario Limonciello -- Cc: Hamza Mahfooz Cc: Sun peng (Leo) Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 2 -- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 ---

Re: [PATCH v2] drm/amd/display: add panel_power_savings sysfs entry to eDP connectors

2024-02-16 Thread Mario Limonciello
On 2/16/2024 10:13, Harry Wentland wrote: On 2024-02-16 11:11, Harry Wentland wrote: On 2024-02-16 10:42, Pekka Paalanen wrote: On Fri, 16 Feb 2024 09:33:47 -0500 Harry Wentland wrote: On 2024-02-16 03:19, Pekka Paalanen wrote: On Fri, 2 Feb 2024 10:28:35 -0500 Hamza Mahfooz wrote:

Re: [PATCH] drm/amdgpu: Fix the runtime resume failure issue

2024-02-21 Thread Mario Limonciello
On 2/21/2024 03:35, Ma Jun wrote: Don't set power state flag when system enter runtime suspend, or it may cause runtime resume failure issue. Signed-off-by: Ma Jun Reviewed-by: Mario Limonciello Please add a fixes tag for 3a9626c816db901def438dc2513622e281186d39 when commi

Re: [PATCH 25/34] drm/amd/display: Set the power_down_on_boot function pointer to null

2024-02-28 Thread Mario Limonciello
xpect the function to be called for APU. Perhaps, should we be making the same change for other APUs? It seems a few others call dcn10_power_down_on_boot() for the callback. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Nicholas Kazlauskas Acked-by: Alex

[PATCH] drm/amd/display: Use freesync when `DRM_EDID_FEATURE_CONTINUOUS_FREQ` found

2024-03-05 Thread Mario Limonciello
work_16_on/ Closes: https://www.reddit.com/r/framework/comments/1b6vzcy/framework_16_variable_refresh_rate/ Closes: https://community.frame.work/t/resolved-no-vrr-freesync-with-amd-version/42338 Link: https://gist.github.com/superm1/e8fbacfa4d0f53150231d3a3e0a13faf [1] Signed-off-by: Mario L

Re: [PATCH] drm/amd: Drop abm_level property

2024-03-06 Thread Mario Limonciello
On 3/6/2024 11:08, Xaver Hugl wrote: Like already mentioned in the power profiles daemon repository, I don't think this makes sense. This is a display setting, which compositors have interest in controlling, for example to: - disable it in a bright environment, because afaiu it reduces the maximu

Re: [PATCH] drm/amd: Drop abm_level property

2024-03-06 Thread Mario Limonciello
On 3/6/2024 12:00, Xaver Hugl wrote: Am Mi., 6. März 2024 um 18:19 Uhr schrieb Mario Limonciello : So the idea being if the compositor isn't using it we let power-profiles-daemon (or any other software) take control via sysfs and if the compositor does want to control it then it then it w

  1   2   3   4   5   6   7   8   9   10   >