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

[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 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 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 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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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

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

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

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

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

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

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

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

[Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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

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

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

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

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

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

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

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

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

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

[Nouveau] [PATCH v2 0/9] Improvements to pcie_bandwidth_available() for eGPUs

2023-11-03 Thread Mario Limonciello
Add quirk for Tiger Lake Mario Limonciello (9): 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: Drop pci_is_thunderbolt_attached() PCI: Move the `PCI_CLASS_SERIAL_USB_U