[PATCH 0/2] Recover from failure to probe GPU

2022-12-22 Thread Mario Limonciello
re-load the driver or re-attach using sysfs and it gracefully recovers. [ 665.080480] [drm] Initialized amdgpu 3.49.0 20150101 for :63:00.0 on minor 0 [ 665.090075] fbcon: amdgpudrmfb (fb0) is primary device [ 665.090248] [drm] DSC precompute is not needed. Mario Limonciello (2): firmware: sysfb:

[PATCH 2/2] drm/amd: Re-create firmware framebuffer on failure to probe

2022-12-22 Thread Mario Limonciello
firmware. So when probe fails, re-create the system framebuffer so that the user at least has basic graphics support. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b

Re: [PATCH v2] drm/amdgpu: skip mes self test after s0i3 resume for MES IP v11.0

2022-12-19 Thread Mario Limonciello
-by: Tim Huang Reviewed-by: Mario Limonciello v2: make the comment clean and use adev->in_s0ix instead of adev->suspend --- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c b/drivers/g

[PATCH v3 3/3] ACPI: video: Don't enable fallback path for creating ACPI backlight by default

2022-12-08 Thread Mario Limonciello
. This was intended as a safety mechanism with the backlight overhaul that occurred in kernel 6.1, but as it doesn't appear necesssary set it to be disabled by default. Suggested-by: Hans de Goede Signed-off-by: Mario Limonciello Reviewed-by: Hans de Goede --- v2->v3: * Add Hans' R-b v1->v2: * New

[PATCH v3 1/3] ACPI: video: Allow GPU drivers to report no panels

2022-12-08 Thread Mario Limonciello
panels were found. Allow using this information to factor in whether to enable the fallback logic for making an acpi_video0 backlight device. Suggested-by: Hans de Goede Signed-off-by: Mario Limonciello Reviewed-by: Hans de Goede --- v2->v3: * Add Hans' R-b * Add missing declaration for

[PATCH v3 2/3] drm/amd/display: Report to ACPI video if no panels were found

2022-12-08 Thread Mario Limonciello
Signed-off-by: Mario Limonciello Reviewed-by: Hans de Goede --- v2->v3: * Add Hans' R-b v1->v2: * No changes --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/d

[PATCH v3 0/3] Adjust ACPI video detection fallback path

2022-12-08 Thread Mario Limonciello
. If this turns out to be mistake and this part is reverted, the other patches for preventing desktop problems will avoid regressions on desktops. Mario Limonciello (3): ACPI: video: Allow GPU drivers to report no panels drm/amd/display: Report to ACPI video if no panels were found ACPI: video: Don't

[PATCH v2 2/3] drm/amd/display: Report to ACPI video if no panels were found

2022-12-07 Thread Mario Limonciello
Signed-off-by: Mario Limonciello --- v1->v2: * No changes drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 512c32327

[PATCH v2 3/3] ACPI: video: Don't enable fallback path for creating ACPI backlight by default

2022-12-07 Thread Mario Limonciello
. This was intended as a safety mechanism with the backlight overhaul that occurred in kernel 6.1, but as it doesn't appear necesssary set it to be disabled by default. Suggested-by: Hans de Goede Signed-off-by: Mario Limonciello --- v1->v2: * New patch drivers/acpi/acpi_video.c | 6 +- 1 file chan

[PATCH v2 1/3] ACPI: video: Allow GPU drivers to report no panels

2022-12-07 Thread Mario Limonciello
panels were found. Allow using this information to factor in whether to enable the fallback logic for making an acpi_video0 backlight device. Suggested-by: Hans de Goede Signed-off-by: Mario Limonciello --- v1->v2: * Cancel registration for backlight device instead (Hans) * drop desktop ch

[PATCH v2 0/3] Adjust ACPI video detection fallback path

2022-12-07 Thread Mario Limonciello
. If this turns out to be mistake and this part is reverted, the other patches for preventing desktop problems will avoid regressions on desktops. Mario Limonciello (3): ACPI: video: Allow GPU drivers to report no panels drm/amd/display: Report to ACPI video if no panels were found ACPI: video: Don't

[PATCH 2/2] drm/amd/display: Report to ACPI video if no panels were found

2022-12-07 Thread Mario Limonciello
Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 512c32327eb1..b73f61ac5dd5 100644

[PATCH 1/2] ACPI: video: Allow GPU drivers to report no panels

2022-12-07 Thread Mario Limonciello
. Suggested-by: Hans de Goede Signed-off-by: Mario Limonciello --- drivers/acpi/acpi_video.c | 12 include/acpi/video.h | 1 + 2 files changed, 13 insertions(+) diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c index 32953646caeb..e297f8877797 100644 --- a/drivers

[PATCH 0/2] Avoid creating acpi_video0 on desktop APUs

2022-12-07 Thread Mario Limonciello
multi-GPU systems: * only use this logic when the system is reported as a desktop enclosure. * in the amdgpu code only report into this for APUs. Mario Limonciello (2): ACPI: video: Allow GPU drivers to report no panels drm/amd/display: Report to ACPI video if no panels were found drivers/acpi/ac

Re: [PATCH] drm/amd: Fail the suspend if resources can't be evicted

2022-10-27 Thread Mario Limonciello
On 10/27/22 01:30, Christian König wrote: Am 26.10.22 um 21:03 schrieb Mario Limonciello: If a system does not have swap and memory is under 100% usage, amdgpu will fail to evict resources.  Currently the suspend carries on proceeding to reset the GPU: ``` [drm] evicting device resources

[PATCH] drm/amd: Fail the suspend if resources can't be evicted

2022-10-26 Thread Mario Limonciello
davidak.de Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2223 Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/

[PATCH] drm/amd: Add a new parameter that can force reset on suspend

2022-09-27 Thread Mario Limonciello
://bugzilla.kernel.org/show_bug.cgi?id=216516 Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 3 files changed, 11 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h

[PATCH 3/4] Revert "drm/amdgpu: drop amdgpu_display_gem_fb_init()"

2022-08-09 Thread Mario Limonciello
This reverts commit 60da2f7440f22dba48944602c2a0373068f13880. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216119 Fixes: 087451f372bf ("drm/amdgpu: use generic fb helpers instead of setting up AMD own's.") Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu

[PATCH 4/4] Revert "drm/amdgpu: use generic fb helpers instead of setting up AMD own's."

2022-08-09 Thread Mario Limonciello
back to generic fb helpers can be brought back in for amdgpu. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216119 Fixes: 087451f372bf ("drm/amdgpu: use generic fb helpers instead of setting up AMD own's.") Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/Makefile

[PATCH 0/4] Fix S3 and S4 issues related to fbdev

2022-08-09 Thread Mario Limonciello
. This series reverts all the code to move to generic fbdev helpers to fix both issues. Mario Limonciello (4): Revert "drm/amdgpu/display: disable prefer_shadow for generic fb helpers" Revert "drm/amdgpu: keep fbdev buffers pinned during suspend" Reve

[PATCH 2/4] Revert "drm/amdgpu: keep fbdev buffers pinned during suspend"

2022-08-09 Thread Mario Limonciello
This reverts commit da427a501e9b5e2cac8c8042df12eb203726903c. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216119 Fixes: 087451f372bf ("drm/amdgpu: use generic fb helpers instead of setting up AMD own's.") Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu

[PATCH 1/4] Revert "drm/amdgpu/display: disable prefer_shadow for generic fb helpers"

2022-08-09 Thread Mario Limonciello
ic fb helpers") Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 3 +-- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c| 3 +-- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c| 3 +-- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 3 +-- drivers/g

[PATCH] drm/amdkfd: Select PCI_P2PDMA and DMABUF_MOVE_NOTIFY instead of depending

2022-07-07 Thread Mario Limonciello
can just enable HSA_AMD_P2P. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdkfd/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/Kconfig b/drivers/gpu/drm/amd/amdkfd/Kconfig index 93bd4eda0d94..b153c26903ee 100644

[PATCH v3 08/10] drm/amd: Use `pm_suspend_default_s2idle`

2022-06-30 Thread Mario Limonciello
Rather than examining the suspend target, examine what the system is configured to use. This should be no functional change, just improves readability by taking the helper instead. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 4 ++-- 1 file changed, 2

[PATCH v3 07/10] drm/amd: Use `pm_suspend_preferred_s2idle`

2022-06-30 Thread Mario Limonciello
Drop the direct check from the FADT and use the helper instead. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c

[PATCH] drm/amd: Revert "drm/amd/display: keep eDP Vdd on when eDP stream is already enabled"

2022-06-15 Thread Mario Limonciello
n eDP stream is already enabled"). Revert this commit to fix the issue. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2047 Reported-by: Aaron Ma Fixes: 559e2655220d ("drm/amd/display: keep eDP Vdd on when eDP stream is already enabled") Signed-off-by: Mario Limonciello --- .

[PATCH] drm/amd: Don't show warning on reading vbios values for SMU13 3.1

2022-06-14 Thread Mario Limonciello
ootup clocks") Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c index f18f9605e586..0e59ab2192bf 100644 --- a/d

[PATCH] drm/amdkfd: Add GC 10.3.6 and 10.3.7 KFD definitions

2022-05-31 Thread Mario Limonciello
Loading amdgpu on GC 10.3.7 shows an ERR level message: `kfd kfd: amdgpu: GC IP 0a0307 not supported in kfd` Add these targets to match yellow carp structures. Reported-by: David Chang Reviewed-by: Felix Kuehling Tested-by: Jesse(Jie) Zhang Signed-off-by: Mario Limonciello --- drivers/gpu

[RFC] drm/amd: Reset ASIC on GPU resume failure

2022-05-19 Thread Mario Limonciello
/#mf90fc5d39b02d4cf7d430a49d3b58243083042a7 Signed-off-by: Mario Limonciello --- This is RFC as it's conceptual, and we should wait for testing that it actually works. drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu

[PATCH v2] drm/amd: Don't reset dGPUs if the system is going to s2idle

2022-05-17 Thread Mario Limonciello
ASIC reset, but this still doesn't work on the A+A configuration in s2idle. Avoid doing the reset on dGPUs specifically when using s2idle. Fixes: daf8de0874ab5b ("drm/amdgpu: always reset the asic in suspend (v2)") Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2008 Signed-off-b

[PATCH] drm/amd: Don't reset dGPUs if the system is going to s2idle

2022-05-17 Thread Mario Limonciello
ASIC reset, but this still doesn't work on the A+A configuration in s2idle. Avoid doing the reset on dGPUs specifically when using s2idle. Fixes: daf8de0874ab5b ("drm/amdgpu: always reset the asic in suspend (v2)") Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2008 Signed-off-b

[PATCH] amdgpu/pm: Don't show `smartshift_*_power` files for APUs

2022-03-09 Thread Mario Limonciello
in `amdgpu_device_support_smart_shift`, so this can be simplified. This causes attributes to not be shown on APUs. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm

[PATCH v5 7/7] PCI: drop `pci_is_thunderbolt_attached`

2022-02-24 Thread Mario Limonciello
Currently `pci_is_thunderbolt_attached` is used to indicate a device is connected externally. As all drivers now look at the removable attribute, drop this function. Signed-off-by: Mario Limonciello --- include/linux/pci.h | 22 -- 1 file changed, 22 deletions(-) diff

[PATCH v5 6/7] drm/radeon: drop the use of `pci_is_thunderbolt_attached`

2022-02-24 Thread Mario Limonciello
Currently `pci_is_thunderbolt_attached` is used to indicate a device is connected externally. The PCI core now marks such devices as removable and downstream drivers can use this instead. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/radeon/radeon_device.c | 4 ++-- drivers/gpu/drm

[PATCH v5 1/7] PCI: Move `is_thunderbolt` check for lack of command completed to a quirk

2022-02-24 Thread Mario Limonciello
Compl+ for Thunderbolt ports") into pci quirks. Suggested-by: Lukas Wunner Signed-off-by: Mario Limonciello --- drivers/pci/hotplug/pciehp_hpc.c | 6 +- drivers/pci/quirks.c | 17 + include/linux/pci.h | 2 ++ 3 files changed, 20 insertions(+), 5

[PATCH v5 5/7] drm/nouveau: drop the use of `pci_is_thunderbolt_attached`

2022-02-24 Thread Mario Limonciello
Currently `pci_is_thunderbolt_attached` is used to indicate a device is connected externally. The PCI core now marks such devices as removable and downstream drivers can use this instead. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/nouveau/nouveau_vga.c | 4 ++-- 1 file changed, 2

[PATCH v5 4/7] drm/amd: drop the use of `pci_is_thunderbolt_attached`

2022-02-24 Thread Mario Limonciello
Currently `pci_is_thunderbolt_attached` is used to indicate a device is connected externally. The PCI core now marks such devices as removable and downstream drivers can use this instead. Reviewed-by: Macpaul Lin Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2

[PATCH v5 3/7] PCI: Drop the `is_thunderbolt` attribute from PCI core

2022-02-24 Thread Mario Limonciello
The `is_thunderbolt` attribute originally had a well defined list of quirks that it existed for, but it has been overloaded with more meaning. Instead use the driver core removable attribute to indicate the detail a device is attached to a thunderbolt or USB4 chain. Signed-off-by: Mario

[PATCH v5 2/7] PCI: Move check for old Apple Thunderbolt controllers into a quirk

2022-02-24 Thread Mario Limonciello
this should be a fixed list. Suggested-by: Mika Westerberg Signed-off-by: Mario Limonciello --- drivers/pci/pci.c| 17 +++ drivers/pci/quirks.c | 67 2 files changed, 79 insertions(+), 5 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci

[PATCH v5 0/7] Overhaul `is_thunderbolt`

2022-02-24 Thread Mario Limonciello
umers of old attribute to use removable Note: this spans USB/DRM/platform-x86/PCI trees. As a majority of the changes are in PCI, it should probably come through that tree if possible. Mario Limonciello (7): PCI: Move `is_thunderbolt` check for lack of command completed to a quirk PCI: Mo

[PATCH 1/2] drm/amd: Refactor `amdgpu_aspm` to be evaluated per device

2022-02-16 Thread Mario Limonciello
that can be called by individual dGPUs to react to the `amdgpu_aspm` module parameter without having negative results for other dGPUs on the PCIe bus. Suggested-by: Lijo Lazar Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu

[PATCH 2/2] drm/amd: Use amdgpu_device_should_use_aspm on navi umd pstate switching

2022-02-16 Thread Mario Limonciello
The `program_aspm` callback is already guarded for aspm, but the `enable_aspm` callback doesn't follow the module parameter. Update it to use the helper `amdgpu_device_should_use_aspm`. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/nv.c | 3 ++- 1 file changed, 2 insertions

[PATCH] drm/amd: Check if ASPM is enabled from PCIe subsystem

2022-02-16 Thread Mario Limonciello
cs.com/w/images/a/ad/P9_PHB_version1.0_27July2018_pub.pdf Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1723 Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1739 Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1885 Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1907 Tested-by: koba...@canonical.com

[PATCH] drm/amd: smu7: downgrade voltage error to info

2022-02-16 Thread Mario Limonciello
The message `Voltage value looks like a Leakage ID but it's not patched` shows up as an error on Dell Precision 3540. This doesn't cause functional problems and should be downgraded to info. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1162 Signed-off-by: Mario Limonciello --- drivers

[PATCH v4 06/10] PCI: Drop the `is_thunderbolt` attribute from PCI core

2022-02-14 Thread Mario Limonciello
The `is_thunderbolt` attribute originally had a well defined list of quirks that it existed for, but it has been overloaded with more meaning. Instead use the driver core removable attribute to indicate the detail a device is attached to a thunderbolt or USB4 chain. Signed-off-by: Mario

[PATCH v4 10/10] PCI: drop `pci_is_thunderbolt_attached`

2022-02-14 Thread Mario Limonciello
Currently `pci_is_thunderbolt_attached` is used to indicate a device is connected externally. As all drivers now look at the removable attribute, drop this function. Signed-off-by: Mario Limonciello --- include/linux/pci.h | 22 -- 1 file changed, 22 deletions(-) diff

[PATCH v4 09/10] drm/radeon: drop the use of `pci_is_thunderbolt_attached`

2022-02-14 Thread Mario Limonciello
Currently `pci_is_thunderbolt_attached` is used to indicate a device is connected externally. The PCI core now marks such devices as removable and downstream drivers can use this instead. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/radeon/radeon_device.c | 4 ++-- drivers/gpu/drm

[PATCH v4 08/10] drm/nouveau: drop the use of `pci_is_thunderbolt_attached`

2022-02-14 Thread Mario Limonciello
Currently `pci_is_thunderbolt_attached` is used to indicate a device is connected externally. The PCI core now marks such devices as removable and downstream drivers can use this instead. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/nouveau/nouveau_vga.c | 4 ++-- 1 file changed, 2

[PATCH v4 05/10] PCI: Move check for old Apple Thunderbolt controllers into a quirk

2022-02-14 Thread Mario Limonciello
this should be a fixed list. Suggested-by: Mika Westerberg Signed-off-by: Mario Limonciello --- drivers/pci/pci.c| 17 +++ drivers/pci/quirks.c | 67 2 files changed, 79 insertions(+), 5 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci

[PATCH v4 07/10] drm/amd: drop the use of `pci_is_thunderbolt_attached`

2022-02-14 Thread Mario Limonciello
Currently `pci_is_thunderbolt_attached` is used to indicate a device is connected externally. The PCI core now marks such devices as removable and downstream drivers can use this instead. Reviewed-by: Macpaul Lin Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2

[PATCH v4 04/10] PCI: Detect PCIe root ports for discrete USB4 controllers

2022-02-14 Thread Mario Limonciello
attribute, use the USB4 DVSEC extended capabability set on these root ports to determine if they are located on a discrete USB4 controller. Suggested-by: Mika Westerberg Link: https://usb.org/sites/default/files/USB4%20Specification%202026.zip Signed-off-by: Mario Limonciello --- drivers/pci

[PATCH v4 03/10] PCI: Detect root port of internal USB4 controllers

2022-02-14 Thread Mario Limonciello
-displayport-tunneled-through-usb4-to-usb4-host-routers Signed-off-by: Mario Limonciello --- drivers/pci/pci-acpi.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index a42dbf448860..695dbd88b8b7 100644 --- a/drivers/pci

[PATCH v4 02/10] PCI: Move `is_thunderbolt` check for lack of command completed to a quirk

2022-02-14 Thread Mario Limonciello
Compl+ for Thunderbolt ports") into pci quirks. Suggested-by: Lukas Wunner Signed-off-by: Mario Limonciello --- drivers/pci/hotplug/pciehp_hpc.c | 6 +- drivers/pci/quirks.c | 17 + include/linux/pci.h | 2 ++ 3 files changed, 20 insertions(+), 5

[PATCH v4 01/10] PCI: Add USB4 class definition

2022-02-14 Thread Mario Limonciello
This PCI class definition of the USB4 device is currently located only in the thunderbolt driver. It will be needed by a few other drivers for upcoming changes. Move it into the common include file. Acked-by: Bjorn Helgaas Acked-by: Alex Deucher Acked-by: Mika Westerberg Signed-off-by: Mario

[PATCH v4 00/10] Overhaul `is_thunderbolt`

2022-02-14 Thread Mario Limonciello
it should probably come through that tree if possible. Mario Limonciello (10): PCI: Add USB4 class definition PCI: Move `is_thunderbolt` check for lack of command completed to a quirk PCI: Detect root port of internal USB4 controllers PCI: Detect PCIe root ports for discrete USB4 contr

[PATCH v3 11/12] platform/x86: amd-gmux: drop the use of `pci_is_thunderbolt_attached`

2022-02-11 Thread Mario Limonciello
Currently `pci_is_thunderbolt_attached` is used to indicate a device is connected externally. The PCI core now marks such devices as removable and downstream drivers can use this instead. Acked-by: Hans de Goede Signed-off-by: Mario Limonciello --- drivers/platform/x86/apple-gmux.c | 2 +- 1

[PATCH v3 12/12] PCI: drop `pci_is_thunderbolt_attached`

2022-02-11 Thread Mario Limonciello
Currently `pci_is_thunderbolt_attached` is used to indicate a device is connected externally. As all drivers now look at the removable attribute, drop this function. Signed-off-by: Mario Limonciello --- include/linux/pci.h | 22 -- 1 file changed, 22 deletions(-) diff

[PATCH v3 09/12] drm/nouveau: drop the use of `pci_is_thunderbolt_attached`

2022-02-11 Thread Mario Limonciello
Currently `pci_is_thunderbolt_attached` is used to indicate a device is connected externally. The PCI core now marks such devices as removable and downstream drivers can use this instead. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/nouveau/nouveau_vga.c | 4 ++-- 1 file changed, 2

[PATCH v3 10/12] drm/radeon: drop the use of `pci_is_thunderbolt_attached`

2022-02-11 Thread Mario Limonciello
Currently `pci_is_thunderbolt_attached` is used to indicate a device is connected externally. The PCI core now marks such devices as removable and downstream drivers can use this instead. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/radeon/radeon_device.c | 4 ++-- drivers/gpu/drm

[PATCH v3 08/12] drm/amd: drop the use of `pci_is_thunderbolt_attached`

2022-02-11 Thread Mario Limonciello
Currently `pci_is_thunderbolt_attached` is used to indicate a device is connected externally. The PCI core now marks such devices as removable and downstream drivers can use this instead. Reviewed-by: Macpaul Lin Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2

[PATCH v3 05/12] PCI: Detect root port of internal USB4 devices by `usb4-host-interface`

2022-02-11 Thread Mario Limonciello
/windows-hardware/drivers/pci/dsd-for-pcie-root-ports#mapping-native-protocols-pcie-displayport-tunneled-through-usb4-to-usb4-host-routers Signed-off-by: Mario Limonciello --- drivers/pci/pci-acpi.c | 10 ++ drivers/pci/pci.h | 5 + drivers/pci/probe.c| 1 + 3 files changed

[PATCH v3 06/12] PCI: Explicitly mark USB4 NHI devices as removable

2022-02-11 Thread Mario Limonciello
USB4 class devices are also removable like Intel Thunderbolt devices. Drivers of downstream devices use this information to declare functional differences in how the drivers perform by knowing that they are connected to an upstream TBT/USB4 port. Reviewed-by: Macpaul Lin Signed-off-by: Mario

[PATCH v3 01/12] thunderbolt: move definition of PCI_CLASS_SERIAL_USB_USB4

2022-02-11 Thread Mario Limonciello
This PCI class definition of the USB4 device is currently located only in the thunderbolt driver. It will be needed by a few other drivers for upcoming changes. Move it into the common include file. Acked-by: Alex Deucher Acked-by: Mika Westerberg Signed-off-by: Mario Limonciello --- drivers

[PATCH v3 07/12] PCI: Set ports for discrete USB4 controllers appropriately

2022-02-11 Thread Mario Limonciello
. Suggested-by: Mika Westerberg Link: https://usb.org/sites/default/files/USB4%20Specification%202026.zip Signed-off-by: Mario Limonciello --- drivers/pci/probe.c | 33 + include/linux/pci_ids.h | 2 ++ 2 files changed, 35 insertions(+) diff --git a/drivers/pci

[PATCH v3 03/12] PCI: Move check for old Apple Thunderbolt controllers into a quirk

2022-02-11 Thread Mario Limonciello
`pci_bridge_d3_possible` currently checks explicitly for a Thunderbolt controller to indicate that D3 is possible. As this is used solely for older Apple systems, move it into a quirk that enumerates across all Intel TBT controllers. Suggested-by: Mika Westerberg Signed-off-by: Mario

[PATCH v3 04/12] PCI: Drop the `is_thunderbolt` attribute from PCI core

2022-02-11 Thread Mario Limonciello
The `is_thunderbolt` attribute is currently a dumping ground for a variety of things. Instead use the driver core removable attribute to indicate the detail a device is attached to a thunderbolt or USB4 chain. Signed-off-by: Mario Limonciello --- drivers/pci/probe.c | 20

[PATCH v3 02/12] PCI: Move `is_thunderbolt` check for lack of command completed to a quirk

2022-02-11 Thread Mario Limonciello
Compl+ for Thunderbolt ports") into pci quirks. Suggested-by: Lukas Wunner Signed-off-by: Mario Limonciello --- drivers/pci/hotplug/pciehp_hpc.c | 6 +- drivers/pci/quirks.c | 17 + include/linux/pci.h | 2 ++ 3 files changed, 20 insertions(+), 5

[PATCH v3 00/12] Overhaul `is_thunderbolt`

2022-02-11 Thread Mario Limonciello
nd use device core removable attribute instead - Adjust all consumers of old attribute to use removable Note: this spans USB/DRM/platform-x86/PCI trees. As a majority of the changes are in PCI, it should probably come through that tree if possible. Mario Limonciello (12): thunderbolt: move d

[PATCH v2 6/9] drm/nouveau: drop the use of `pci_is_thunderbolt_attached`

2022-02-10 Thread Mario Limonciello
Currently `pci_is_thunderbolt_attached` is used to indicate a device is connected externally. The PCI core now marks such devices as removable and downstream drivers can use this instead. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/nouveau/nouveau_vga.c | 4 ++-- 1 file changed, 2

[PATCH v2 7/9] drm/radeon: drop the use of `pci_is_thunderbolt_attached`

2022-02-10 Thread Mario Limonciello
Currently `pci_is_thunderbolt_attached` is used to indicate a device is connected externally. The PCI core now marks such devices as removable and downstream drivers can use this instead. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/radeon/radeon_device.c | 4 ++-- drivers/gpu/drm

[PATCH v2 8/9] platform/x86: amd-gmux: drop the use of `pci_is_thunderbolt_attached`

2022-02-10 Thread Mario Limonciello
Currently `pci_is_thunderbolt_attached` is used to indicate a device is connected externally. The PCI core now marks such devices as removable and downstream drivers can use this instead. Signed-off-by: Mario Limonciello --- drivers/platform/x86/apple-gmux.c | 2 +- 1 file changed, 1 insertion

[PATCH v2 9/9] PCI: drop `pci_is_thunderbolt_attached`

2022-02-10 Thread Mario Limonciello
Currently `pci_is_thunderbolt_attached` is used to indicate a device is connected externally. As all drivers now look at the removable attribute, drop this function. Signed-off-by: Mario Limonciello --- include/linux/pci.h | 22 -- 1 file changed, 22 deletions(-) diff

[PATCH v2 5/9] drm/amd: drop the use of `pci_is_thunderbolt_attached`

2022-02-10 Thread Mario Limonciello
Currently `pci_is_thunderbolt_attached` is used to indicate a device is connected externally. The PCI core now marks such devices as removable and downstream drivers can use this instead. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- drivers/gpu/drm/amd

[PATCH v2 1/9] thunderbolt: move definition of PCI_CLASS_SERIAL_USB_USB4

2022-02-10 Thread Mario Limonciello
This PCI class definition of the USB4 device is currently located only in the thunderbolt driver. It will be needed by a few other drivers for upcoming changes. Move it into the common include file. Acked-by: Alex Deucher Signed-off-by: Mario Limonciello --- drivers/thunderbolt/nhi.h | 2

[PATCH v2 4/9] PCI: mark USB4 devices as removable

2022-02-10 Thread Mario Limonciello
USB4 class devices are also removable like Intel Thunderbolt devices. Drivers of downstream devices use this information to declare functional differences in how the drivers perform by knowing that they are connected to an upstream TBT/USB4 port. Signed-off-by: Mario Limonciello --- drivers

[PATCH v2 2/9] PCI: Move `is_thunderbolt` check for lack of command completed to a quirk

2022-02-10 Thread Mario Limonciello
Compl+ for Thunderbolt ports") into pci quirks. Suggested-by: Lukas Wunner Signed-off-by: Mario Limonciello --- drivers/pci/hotplug/pciehp_hpc.c | 6 +- drivers/pci/quirks.c | 17 + include/linux/pci.h | 2 ++ 3 files changed, 20 insertions(+), 5

[PATCH v2 3/9] PCI: drop `is_thunderbolt` attribute

2022-02-10 Thread Mario Limonciello
The `is_thunderbolt` attribute is currently a dumping ground for a variety of things. Instead use the driver core removable attribute to indicate the detail a device is attached to a thunderbolt or USB4 chain. Signed-off-by: Mario Limonciello --- drivers/pci/pci.c | 2

[PATCH v2 0/9] Overhaul is_thunderbolt

2022-02-10 Thread Mario Limonciello
core. Changes from v1->v2: - Add Alex's tag to first patch - Move lack of command completion into a quirk (Lukas) - Drop `is_thunderbolt` attribute and `pci_is_thunderbolt_attached` and use device core removable attribute instead - Adjust all consumers of old attribute to use removable Ma

[PATCH v6 2/4] drm/amd: Warn users about potential s0ix problems

2022-01-26 Thread Mario Limonciello
Signed-off-by: Mario Limonciello --- v5->v6: * Make CONFIG_SUSPEND wrap around entire function to make more readable * Return false if system not properly configured (relevant with later patch) drivers/gpu/drm/amd/amdgpu/amdgpu.h | 8 ++-- drivers/gpu/drm/amd/amdgpu/amdgp

[PATCH v6 3/4] drm/amd: add support to check whether the system is set to s3

2022-01-26 Thread Mario Limonciello
This will be used to help make decisions on what to do in misconfigured systems. Signed-off-by: Mario Limonciello --- v5->v6: * Move in CONFIG_SUSPEND block drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 13 + 2 files changed,

[PATCH v6 4/4] drm/amd: Only run s3 or s0ix if system is configured properly

2022-01-26 Thread Mario Limonciello
and system misconfigured the GPU will stay fully powered for the suspend. * In systems that are intended to be s2idle, but AMD dGPU is also present, the dGPU will go through S3 Signed-off-by: Mario Limonciello --- v5->v6: * Move code into prepare vfunc and use DPM_FLAG_SMART_SUSPEND to s

[PATCH v6 1/4] drm/amd: avoid suspend on dGPUs w/ s2idle support when runtime PM enabled

2022-01-26 Thread Mario Limonciello
d/-/issues/1879 Signed-off-by: Mario Limonciello --- v5->v6: * Move patch to the start of the series so it can go in even if the rest need work * Change approach that if dGPU is in BOCO just skip suspend drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 delet

[PATCH v5 3/4] drm/amd: Only run s3 or s0ix if system is configured properly

2022-01-25 Thread Mario Limonciello
and system misconfigured the GPU will stay fully powered for the suspend. * In systems that are intended to be s2idle, but AMD dGPU is also present, the dGPU will go through S3 Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 24 +--- 1 file

[PATCH v5 4/4] drm/amd: don't reset dGPUs that don't go through system S3

2022-01-25 Thread Mario Limonciello
rg/drm/amd/-/issues/1879 Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 123ec5a07dd5..66290f986544 100644 ---

[PATCH v5 2/4] drm/amd: add support to check whether the system is set to s3

2022-01-25 Thread Mario Limonciello
This will be used to help make decisions on what to do in misconfigured systems. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 17 + 2 files changed, 19 insertions(+) diff --git a/drivers/gpu

[PATCH v5 1/4] drm/amd: Warn users about potential s0ix problems

2022-01-25 Thread Mario Limonciello
Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c index 4811b0faafd9..2531da6cbec3 100644 ---

[PATCH] display/amd: decrease message verbosity about watermarks table failure

2022-01-25 Thread Mario Limonciello
. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_smu.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_smu.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_smu.c index

[PATCH v4] drm/amd: Warn users about potential s0ix problems

2022-01-18 Thread Mario Limonciello
Signed-off-by: Mario Limonciello --- v3->v4: * Add back in CONFIG_SUSPEND check v2->v3: * Better direct users how to recover in the bad cases v1->v2: * Only show messages in s2idle cases drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 21 +++-- 1 file changed, 15 inserti

[PATCH] drm/amd: Fix MSB of SMU version printing

2022-01-18 Thread Mario Limonciello
two programs from a similar family but different codebase. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c| 10 +- drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 10 +- drivers/gpu/drm/amd/pm/swsmu/smu12/smu_v12_0.c | 10 +- drivers

[PATCH v3] drm/amd: Warn users about potential s0ix problems

2022-01-18 Thread Mario Limonciello
esktop.org/drm/amd/-/issues/1824 Signed-off-by: Mario Limonciello --- v2->v3: * Better direct users how to recover in the bad cases v1->v2: * Only show messages in s2idle cases drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletion

[PATCH v2] drm/amd: Warn users about potential s0ix problems

2022-01-11 Thread Mario Limonciello
Signed-off-by: Mario Limonciello --- v1->v2: * Only show messages in s2idle cases drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu

[PATCH] drm/amd: apply s0ix codepath to more cases

2022-01-11 Thread Mario Limonciello
that put the GPU driver into the S3 codepaths when the user has selected s2idle. Reported-by: Bjoren Dasse BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1824 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215387 Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu

[PATCH] drm/amd/display: reset dcn31 SMU mailbox on failures

2022-01-07 Thread Mario Limonciello
Otherwise future commands may fail as well leading to downstream problems that look like they stemmed from a timeout the first time but really didn't. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_smu.c | 6 ++ 1 file changed, 6 insertions(+) diff

[PATCH v5] drm/amd/display: Revert W/A for hard hangs on DCN20/DCN21

2022-01-07 Thread Mario Limonciello
ay: Extend w/a for hard hang on HPD to dcn20") Signed-off-by: Mario Limonciello --- .../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 11 +--- .../amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 11 +--- .../display/dc/irq/dcn20/irq_service_dcn20.c | 25 --- .../displa

[PATCH v4 3/3] drm/amd/display: Use requested power state to avoid HPD WA during s0ix

2022-01-06 Thread Mario Limonciello
Fixes: 1bd3bc745e7f ("drm/amd/display: Extend w/a for hard hang on HPD to dcn20") Signed-off-by: Mario Limonciello --- changes from v3->v4: * Move into new function * Explicitly check that current_state is active for safety * Change metadata from BugLink to Link changes from v2-&g

[PATCH v4 2/3] drm/amd/display: Split out checks for applying HPD WA into a separate function

2022-01-06 Thread Mario Limonciello
This will make it cleaner to read through the logic for an upcoming change. Signed-off-by: Mario Limonciello --- Changes from v3->v4: * New patch .../amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 30 +++ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/drivers/

[PATCH v4 1/3] drm/amd/display: Add power_state member into current_state

2022-01-06 Thread Mario Limonciello
This can be used by the display core to let decisions be made based upon the requested power state. Cc: Qingqing Zhuo Cc: Scott Bruce Cc: Chris Hixon Cc: spassw...@web.de Signed-off-by: Mario Limonciello --- changes from v3->v4: * Initialize power_state when context is created (0 should

[PATCH] drm/amd/display: explicitly set is_dsc_supported to false before use

2022-01-06 Thread Mario Limonciello
When UBSAN is enabled a case is shown on unplugging the display that this variable hasn't been initialized by `update_dsc_caps`, presumably when the display was unplugged it wasn't copied from the DPCD. Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1956497 Signed-off-by: Mario

[PATCH v3 2/2] drm/amd/display: Use requested power state to avoid HPD WA during s0ix

2022-01-05 Thread Mario Limonciello
d hang on HPD") Fixes: 1bd3bc745e7f ("drm/amd/display: Extend w/a for hard hang on HPD to dcn20") Signed-off-by: Mario Limonciello --- changes from v2->v3: * stop depending on adev, get value of power state from display core changes from v1->v2: * Add fallthrough statement * Extend ca

[PATCH v3 1/2] drm/amd/display: Add power_state member into dc_state

2022-01-05 Thread Mario Limonciello
This can be used by the display core to let decisions be made based upon the requested power state. Cc: Qingqing Zhuo Cc: Scott Bruce Cc: Chris Hixon Cc: spassw...@web.de Signed-off-by: Mario Limonciello --- changes from v2->v3: * New patch drivers/gpu/drm/amd/display/dc/core/d

<    3   4   5   6   7   8   9   >