Re: [PATCH] drm/mst: Fix NULL pointer dereference at drm_dp_add_payload_part2

2024-05-09 Thread Mario Limonciello
On 5/9/2024 07:43, Linux regression tracking (Thorsten Leemhuis) wrote: On 18.04.24 21:43, Harry Wentland wrote: On 2024-03-07 01:29, Wayne Lin wrote: [Why] Commit: - commit 5aa1dfcdf0a4 ("drm/mst: Refactor the flow for payload allocation/removement") accidently overwrite the commit - commit

[PATCH v2] drm/amd/display: Enable colorspace property for MST connectors

2024-05-08 Thread Mario Limonciello
orary Disable MST DP Colorspace Property"). Reported-and-tested-by: Tyler Schneider Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3353 Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/d

[PATCH 2/2] Revert "drm/amd/display: Temporary Disable MST DP Colorspace Property"

2024-05-08 Thread Mario Limonciello
ses: https://gitlab.freedesktop.org/drm/amd/-/issues/3353 Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display

[PATCH 1/2] drm: Allow mode object properties to be added after a device is registered

2024-05-08 Thread Mario Limonciello
/drm/amd/-/issues/3353 Signed-off-by: Mario Limonciello --- drivers/gpu/drm/drm_mode_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c index 0e8355063eee..b077547a2db4 100644 --- a/drivers/gpu/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

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

2024-03-06 Thread Mario Limonciello
On 3/6/2024 12:59, Harry Wentland wrote: On 2024-03-06 13:02, Mario Limonciello wrote: 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

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 writes

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

Re: [PATCH 2/2] fbcon: Defer console takeover for splash screens to first switch

2024-02-28 Thread Mario Limonciello
is a good idea. Regards, Hans Closes: https://bugs.launchpad.net/bugs/1970069 Cc: Mario Limonciello Signed-off-by: Daniel van Vugt --- drivers/video/fbdev/core/fbcon.c | 32 +--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/core

Re: [PATCH v4 2/2] fbcon: Defer console takeover for splash screens to first switch

2024-02-22 Thread Mario Limonciello
nt so long as the command line requests so. Closes: https://bugs.launchpad.net/bugs/1970069 Cc: Mario Limonciello Signed-off-by: Daniel van Vugt I did test this series on an Ubuntu userspace and it works as you suggest it should. Tested-by: Mario Limonciello It's not clear to me why we s

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:

[PATCH] drm/amd: Drop abm_level property

2024-02-16 Thread Mario Limonciello
Suggested-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] 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

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 master

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

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

2024-02-16 Thread Mario Limonciello
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 Wentland Cc

Re: [PATCH v3 2/2] fbcon: Defer console takeover for splash screens to first switch

2024-02-15 Thread Mario Limonciello
e Kconfig. Closes: https://bugs.launchpad.net/bugs/1970069 Cc: Mario Limonciello Signed-off-by: Daniel van Vugt --- drivers/video/console/Kconfig| 12 + drivers/video/fbdev/core/fbcon.c | 44 +--- 2 files changed, 52 insertions(+), 4 deletions(-) diff -

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

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

[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

[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 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
-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/Kconfig b

[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` in all

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

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

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

2024-02-11 Thread Mario Limonciello
-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_acpi *

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

[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

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

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

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

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

2024-02-08 Thread Mario Limonciello
://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 chec

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

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

Re: [PATCH v2 2/2] fbcon: Defer console takeover for splash screens to first switch

2024-02-07 Thread Mario Limonciello
On 2/7/2024 03:51, Daniel Vetter wrote: On Wed, Feb 07, 2024 at 10:03:10AM +0800, Daniel van Vugt wrote: On 6/2/24 23:41, Mario Limonciello wrote: On 2/6/2024 08:21, Daniel Vetter wrote: On Tue, Feb 06, 2024 at 06:10:51PM +0800, Daniel van Vugt wrote: Until now, deferred console takeover

Re: [PATCH v2 2/2] fbcon: Defer console takeover for splash screens to first switch

2024-02-06 Thread Mario Limonciello
screen. So check the command line for the expectation of userspace splash and if present then extend the deferral until after the first switch. V2: Added Kconfig option instead of hard coding "splash". Closes: https://bugs.launchpad.net/bugs/1970069 Cc: Mario Limonciello Signed-off-

Re: [PATCH 2/2] fbcon: Defer console takeover for splash screens to first switch

2024-02-02 Thread Mario Limonciello
r (as used by Plymouth) and if present then extend the deferral until the first switch. Closes: https://bugs.launchpad.net/bugs/1970069 Cc: Mario Limonciello Signed-off-by: Daniel van Vugt --- drivers/video/fbdev/core/fbcon.c | 32 +--- 1 file changed, 29 insertions(+), 3

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

2024-02-02 Thread Mario Limonciello
"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

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's way

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. I'm

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

[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 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 1/5] ACPI: video: Handle fetching EDID that is longer than 256 bytes

2024-02-01 Thread Mario Limonciello
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 Rafae

[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 0/5] Add support for fetching EDID from ACPI _DDC

2024-02-01 Thread Mario Limonciello
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 drivers drivers/acpi

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

[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 1/4] ACPI: video: Handle fetching EDID that is longer than 256 bytes

2024-01-30 Thread Mario Limonciello
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 Rafae

[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

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

2024-01-29 Thread Mario Limonciello
On 1/29/2024 10:46, Jani Nikula wrote: On Mon, 29 Jan 2024, Mario Limonciello wrote: On 1/29/2024 03:39, Jani Nikula wrote: On Fri, 26 Jan 2024, Mario Limonciello wrote: diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c index

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

2024-01-29 Thread Mario Limonciello
On 1/29/2024 07:54, Rafael J. Wysocki wrote: On Fri, Jan 26, 2024 at 7:55 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's way

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

2024-01-29 Thread Mario Limonciello
On 1/29/2024 03:39, Jani Nikula wrote: On Fri, 26 Jan 2024, Mario Limonciello wrote: 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

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

2024-01-27 Thread Mario Limonciello
On 1/26/2024 16:34, Mario Limonciello wrote: On 1/26/2024 16:22, 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 properties, that isn't possible. So

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

2024-01-26 Thread Mario Limonciello
"panel_power_savings" sysfs attribute. Cc: Mario Limonciello Signed-off-by: Hamza Mahfooz --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 59 +++ 1 file changed, 59 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display

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

2024-01-26 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 --- drivers/gpu/drm/amd/amdgpu/amdgpu.h

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

2024-01-26 Thread Mario Limonciello
-specific-methods.html#ddc-return-the-edid-for-this-device Signed-off-by: Mario Limonciello --- drivers/acpi/acpi_video.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c index 62f4364e4460

[PATCH 0/2] Fetch EDID from ACPI _DDC method if available

2024-01-26 Thread Mario Limonciello
that when an eDP panel is found the BIOS is checked first for an EDID and that used as a preference if found. Mario Limonciello (2): ACPI: video: Handle fetching EDID that is longer than 256 bytes drm/amd: Fetch the EDID from _DDC if available for eDP drivers/acpi/acpi_video.c

Re: [RFC PATCH 0/2] drm/amd/display: switch amdgpu_dm_connector to

2024-01-26 Thread Mario Limonciello
On 1/26/2024 10:28, Melissa Wen wrote: Hi, I'm debugging a null-pointer dereference when running igt@kms_connector_force_edid and the way I found to solve the bug is to stop using raw edid handler in amdgpu_connector_funcs_force and create_eml_sink in favor of managing resouces via sruct

Re: [git pull] drm for 6.8

2024-01-24 Thread Mario Limonciello
On 1/24/2024 11:52, Mario Limonciello wrote: On 1/24/2024 11:51, Thorsten Leemhuis wrote: Linus, if you have a minute, I'd really like to know... On 24.01.24 17:41, Mario Limonciello wrote: On 1/24/2024 10:24, Vlastimil Babka wrote: On 1/24/24 16:31, Donald Carr wrote: On Wed, Jan 24, 2024

Re: [git pull] drm for 6.8

2024-01-24 Thread Mario Limonciello
On 1/24/2024 11:51, Thorsten Leemhuis wrote: Linus, if you have a minute, I'd really like to know... On 24.01.24 17:41, Mario Limonciello wrote: On 1/24/2024 10:24, Vlastimil Babka wrote: On 1/24/24 16:31, Donald Carr wrote: On Wed, Jan 24, 2024 at 7:06 AM Vlastimil Babka wrote: When

Re: [git pull] drm for 6.8

2024-01-24 Thread Mario Limonciello
On 1/24/2024 10:24, Vlastimil Babka wrote: On 1/24/24 16:31, Donald Carr wrote: On Wed, Jan 24, 2024 at 7:06 AM Vlastimil Babka wrote: When testing the rc1 on my openSUSE Tumbleweed desktop, I've started experiencing "frozen desktop" (KDE/Wayland) issues. The symptoms are that everything

Re: [RFC] Revert "drm/sched: Split free_job into own work item"

2024-01-24 Thread Mario Limonciello
On 1/24/2024 10:26, Vlastimil Babka wrote: On 1/23/24 03:11, Mario Limonciello wrote: commit f7fe64ad0f22 ("drm/sched: Split free_job into own work item") causes graphics hangs at GDM or right after logging in on a Framework 13 AMD laptop (containing a Phoenix APU). This reve

Re: regression/bisected/6.8 commit f7fe64ad0f22ff034f8ebcfbd7299ee9cc9b57d7 leads to GPU hang when I open GNOME activities

2024-01-24 Thread Mario Limonciello
On 1/24/2024 08:37, Mikhail Gavrilov wrote: On Wed, Jan 24, 2024 at 7:19 AM Mikhail Gavrilov wrote: Who could dig into it, please? You decided to revert it? https://lkml.org/lkml/2024/1/22/1866 It's not a straight "git revert" on 6.8-rc1 because of some other contextual changes. I

Re: [RFC] Revert "drm/sched: Split free_job into own work item"

2024-01-23 Thread Mario Limonciello
On 1/22/2024 20:11, Mario Limonciello wrote: commit f7fe64ad0f22 ("drm/sched: Split free_job into own work item") causes graphics hangs at GDM or right after logging in on a Framework 13 AMD laptop (containing a Phoenix APU). This reverts commit f7fe64ad0f22ff034f8ebcfbd7299ee9cc9b57

[RFC] Revert "drm/sched: Split free_job into own work item"

2024-01-22 Thread Mario Limonciello
Split free_job into own work item") Signed-off-by: Mario Limonciello --- This is a regression introduced in 6.8-rc1, bisected from 6.7. This revert done on top of 6.8-rc1 fixes the issue. I'm happy to gather any data to use to properly debug if that is preferable to a revert. --- drive

Re: [PATCH v3 7/7] PCI: Exclude PCIe ports used for virtual links in pcie_bandwidth_available()

2023-11-15 Thread Mario Limonciello
On 11/15/2023 11:04, Mario Limonciello wrote: On 11/14/2023 21:23, Lazar, Lijo wrote: On 11/15/2023 1:37 AM, Mario Limonciello wrote: The USB4 spec specifies that PCIe ports that are used for tunneling PCIe traffic over USB4 fabric will be hardcoded to advertise 2.5GT/s and behave as a PCIe

Re: [PATCH v3 5/7] PCI: ACPI: Detect PCIe root ports that are used for tunneling

2023-11-15 Thread Mario Limonciello
On 11/15/2023 04:40, Mika Westerberg wrote: Hi Mario, On Tue, Nov 14, 2023 at 02:07:53PM -0600, Mario Limonciello wrote: USB4 routers support a feature called "PCIe tunneling". This allows PCIe traffic to be transmitted over USB4 fabric. PCIe root ports that are used in this f

Re: [PATCH v3 7/7] PCI: Exclude PCIe ports used for virtual links in pcie_bandwidth_available()

2023-11-15 Thread Mario Limonciello
On 11/14/2023 21:23, Lazar, Lijo wrote: On 11/15/2023 1:37 AM, Mario Limonciello wrote: The USB4 spec specifies that PCIe ports that are used for tunneling PCIe traffic over USB4 fabric will be hardcoded to advertise 2.5GT/s and behave as a PCIe Gen1 device. The actual performance

[PATCH v3 5/7] PCI: ACPI: Detect PCIe root ports that are used for tunneling

2023-11-14 Thread Mario Limonciello
Signed-off-by: Mario Limonciello --- v2->v3: * Use is_virtual_link to be future proof to other types of virtual links. * Update commit message --- drivers/pci/pci-acpi.c | 16 include/linux/pci.h| 1 + 2 files changed, 17 insertions(+) diff --git a/drivers/pci/pci-acpi.c

[PATCH v3 7/7] PCI: Exclude PCIe ports used for virtual links in pcie_bandwidth_available()

2023-11-14 Thread Mario Limonciello
pcie_bandwidth_available() logic. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2925#note_2145860 Link: https://www.usb.org/document-library/usb4r-specification-v20 USB4 V2 with Errata and ECN through June 2023 Section 11.2.1 Signed-off-by: Mario Limonciello --- v2->v3: * Split f

[PATCH v3 6/7] PCI: Split up some logic in pcie_bandwidth_available() to separate function

2023-11-14 Thread Mario Limonciello
The logic to calculate bandwidth limits may be used at multiple call sites so split it up into its own static function instead. No intended functional changes. Suggested-by: Ilpo Järvinen Signed-off-by: Mario Limonciello --- v2->v3: * Split from previous patch version --- drivers/pci/pc

[PATCH v3 4/7] PCI: pciehp: Move check for is_thunderbolt into a quirk

2023-11-14 Thread Mario Limonciello
e` because that means that any controller that identifies as thunderbolt would set NoCompl+ even if it doesn't suffer this deficiency. As that commit helpfully specifies all the controllers with the problem, move them into a PCI quirk. Signed-off-by: Mario Limonciello --- v2->v3: * Reword c

[PATCH v3 3/7] PCI: Drop pci_is_thunderbolt_attached()

2023-11-14 Thread Mario Limonciello
All callers have switched to dev_is_removable() for detecting hotpluggable PCIe devices. Signed-off-by: Mario Limonciello --- v2->v3: * No changes --- include/linux/pci.h | 22 -- 1 file changed, 22 deletions(-) diff --git a/include/linux/pci.h b/include/linux/pci.h in

[PATCH v3 2/7] drm/radeon: Switch from pci_is_thunderbolt_attached() to dev_is_removable()

2023-11-14 Thread Mario Limonciello
. Signed-off-by: Mario Limonciello --- v2->v3: * Update commit message --- drivers/gpu/drm/radeon/radeon_device.c | 4 ++-- drivers/gpu/drm/radeon/radeon_kms.c| 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/rad

[PATCH v3 1/7] drm/nouveau: Switch from pci_is_thunderbolt_attached() to dev_is_removable()

2023-11-14 Thread Mario Limonciello
. Signed-off-by: Mario Limonciello --- v2->v3: * Update commit message --- drivers/gpu/drm/nouveau/nouveau_vga.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_vga.c b/drivers/gpu/drm/nouveau/nouveau_vga.c index f8bf0ec26844..14215b7ca

[PATCH v3 0/7] Improvements to pcie_bandwidth_available() for eGPUs

2023-11-14 Thread Mario Limonciello
SEC and USB4 devices together, introduce is_virtual_link instead * Drop unnecessary patches Mario Limonciello (7): drm/nouveau: Switch from pci_is_thunderbolt_attached() to dev_is_removable() drm/radeon: Switch from pci_is_thunderbolt_attached() to dev_is_removable() PCI: D

Re: [PATCH v2 8/9] PCI: Exclude PCIe ports used for tunneling in pcie_bandwidth_available()

2023-11-06 Thread Mario Limonciello
On 11/6/2023 12:10, Lukas Wunner wrote: On Fri, Nov 03, 2023 at 02:07:57PM -0500, Mario Limonciello wrote: The USB4 spec specifies that PCIe ports that are used for tunneling PCIe traffic over USB4 fabric will be hardcoded to advertise 2.5GT/s and behave as a PCIe Gen1 device. The actual

Re: [PATCH v2 6/9] PCI: Rename is_thunderbolt to is_tunneled

2023-11-06 Thread Mario Limonciello
On 11/5/2023 11:39, Lukas Wunner wrote: On Fri, Nov 03, 2023 at 02:07:55PM -0500, Mario Limonciello wrote: The `is_thunderbolt` bit has been used to indicate that a PCIe device contained the Intel VSEC which is used by various parts of the kernel to change behavior. To later allow usage

Re: [PATCH v2 8/9] PCI: Exclude PCIe ports used for tunneling in pcie_bandwidth_available()

2023-11-06 Thread Mario Limonciello
On 11/6/2023 06:52, Ilpo Järvinen wrote: On Fri, 3 Nov 2023, Mario Limonciello wrote: The USB4 spec specifies that PCIe ports that are used for tunneling PCIe traffic over USB4 fabric will be hardcoded to advertise 2.5GT/s and behave as a PCIe Gen1 device. The actual performance of these ports

Re: [PATCH v2 5/9] PCI: pciehp: Move check for is_thunderbolt into a quirk

2023-11-06 Thread Mario Limonciello
On 11/6/2023 06:41, Ilpo Järvinen wrote: On Fri, 3 Nov 2023, Mario Limonciello wrote: commit 493fb50e958c ("PCI: pciehp: Assume NoCompl+ for Thunderbolt ports") added a check into pciehp code to explicitly set NoCompl+ for all Intel Thunderbolt controllers, including those that

Re: [PATCH v2 1/9] drm/nouveau: Switch from pci_is_thunderbolt_attached() to dev_is_removable()

2023-11-06 Thread Mario Limonciello
On 11/6/2023 10:47, Mika Westerberg wrote: On Mon, Nov 06, 2023 at 02:25:24PM +0200, Ilpo Järvinen wrote: On Fri, 3 Nov 2023, Mario Limonciello wrote: pci_is_thunderbolt_attached() only works for Intel TBT devices. Switch to using dev_is_removable() to be able to detect USB4 devices as well

Re: [PATCH v2 3/9] PCI: Drop pci_is_thunderbolt_attached()

2023-11-06 Thread Mario Limonciello
On 11/6/2023 06:33, Ilpo Järvinen wrote: On Fri, 3 Nov 2023, Mario Limonciello wrote: All callers have switched to dev_is_removable() for detecting hotpluggable PCIe devices. Signed-off-by: Mario Limonciello --- include/linux/pci.h | 22 -- 1 file changed, 22 deletions

[PATCH v2 9/9] PCI: Add a quirk to mark 0x8086 : 0x9a23 as supporting PCIe tunneling

2023-11-03 Thread Mario Limonciello
devices incorrectly as a result. Add a quirk to mark the device as tunneling so that it will be skipped in pcie_bandwidth_available() like other TBT3/USB4 root ports and bridges. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2885 Signed-off-by: Mario Limonciello --- drivers/pci/quirks.c

[PATCH v2 8/9] PCI: Exclude PCIe ports used for tunneling in pcie_bandwidth_available()

2023-11-03 Thread Mario Limonciello
duplicating pcie_bandwidth_available() logic. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2925#note_2145860 Link: https://www.usb.org/document-library/usb4r-specification-v20 USB4 V2 with Errata and ECN through June 2023 Section 11.2.1 Signed-off-by: Mario Limonciello

[PATCH v2 7/9] PCI: ACPI: Detect PCIe root ports that are used for tunneling

2023-11-03 Thread Mario Limonciello
ink: https://www.usb.org/document-library/usb4r-specification-v20 USB4 V2 with Errata and ECN through June 2023 Section 2.2.10.3 Link: https://learn.microsoft.com/en-us/windows-hardware/design/component-guidelines/usb4-acpi-requirements#port-mapping-_dsd-for-usb-3x-and-pcie Signed-off

[PATCH v2 6/9] PCI: Rename is_thunderbolt to is_tunneled

2023-11-03 Thread Mario Limonciello
The `is_thunderbolt` bit has been used to indicate that a PCIe device contained the Intel VSEC which is used by various parts of the kernel to change behavior. To later allow usage with USB4 controllers as well, rename this to `is_tunneled`. Signed-off-by: Mario Limonciello --- drivers/pci

[PATCH v2 5/9] PCI: pciehp: Move check for is_thunderbolt into a quirk

2023-11-03 Thread Mario Limonciello
e` because that means that any controller that identifies as thunderbolt would set NoCompl+ even if it doesn't suffer this deficiency. As that commit helpfully specifies all the controllers with the problem, move them into a PCI quirk. Signed-off-by: Mario Limonciello --- drivers/pci/hotplug/pc

[PATCH v2 3/9] PCI: Drop pci_is_thunderbolt_attached()

2023-11-03 Thread Mario Limonciello
All callers have switched to dev_is_removable() for detecting hotpluggable PCIe devices. Signed-off-by: Mario Limonciello --- include/linux/pci.h | 22 -- 1 file changed, 22 deletions(-) diff --git a/include/linux/pci.h b/include/linux/pci.h index b56417276042..530b0a360514

[PATCH v2 4/9] PCI: Move the `PCI_CLASS_SERIAL_USB_USB4` definition to common header

2023-11-03 Thread Mario Limonciello
`PCI_CLASS_SERIAL_USB_USB4` may be used by code outside of thunderbolt. Move the declaration into the common pci_ids.h header. Acked-by: Mika Westerberberg Signed-off-by: Mario Limonciello --- drivers/thunderbolt/nhi.h | 2 -- include/linux/pci_ids.h | 1 + 2 files changed, 1 insertion(+), 2

[PATCH v2 2/9] drm/radeon: Switch from pci_is_thunderbolt_attached() to dev_is_removable()

2023-11-03 Thread Mario Limonciello
pci_is_thunderbolt_attached() only works for Intel TBT devices. Switch to using dev_is_removable() to be able to detect USB4 devices as well. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/radeon/radeon_device.c | 4 ++-- drivers/gpu/drm/radeon/radeon_kms.c| 2 +- 2 files changed, 3

[PATCH v2 1/9] drm/nouveau: Switch from pci_is_thunderbolt_attached() to dev_is_removable()

2023-11-03 Thread Mario Limonciello
pci_is_thunderbolt_attached() only works for Intel TBT devices. Switch to using dev_is_removable() to be able to detect USB4 devices as well. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/nouveau/nouveau_vga.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

  1   2   3   4   >