[PATCH v5 0/7] Overhaul `is_thunderbolt`

2022-02-24 Thread Mario Limonciello
able 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 (7): PCI: Move `is_thunderbolt` check for lack of co

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

[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 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 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 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 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 v2 0/9] Overhaul is_thunderbolt

2022-02-10 Thread Mario Limonciello
evice 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 rem

[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 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 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 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 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 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 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 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 v3 00/12] Overhaul `is_thunderbolt`

2022-02-11 Thread Mario Limonciello
nderbolt_attached` and 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):

[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 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 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 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 07/12] PCI: Set ports for discrete USB4 controllers appropriately

2022-02-11 Thread Mario Limonciello
oller. 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/driver

[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 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 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 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 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 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 v4 00/10] Overhaul `is_thunderbolt`

2022-02-14 Thread Mario Limonciello
f the changes are in PCI, 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 port

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

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

2022-02-14 Thread Mario Limonciello
ernal 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 --- driver

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

Re: [PATCH] amdgpu: add a filter condition when set brightness

2023-02-27 Thread Mario Limonciello
On 2/27/23 01:39, Yuanzhi Wang wrote: When the laptop is plugged into AC or DC power supply, the brightness obtained ACPI may be smaller than current brightness.As a result the screen becomes dark,this is not what people want. Do you have a matching bug report with more information included?

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

2022-12-22 Thread Mario Limonciello
to the system they can 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 Limon

[PATCH 1/2] firmware: sysfb: Allow re-creating system framebuffer after init

2022-12-22 Thread Mario Limonciello
framebuffer to be re-created for a failure cleanup. Signed-off-by: Mario Limonciello --- drivers/firmware/efi/sysfb_efi.c | 6 +++--- drivers/firmware/sysfb.c | 15 ++- drivers/firmware/sysfb_simplefb.c | 4 ++-- include/linux/sysfb.h | 5 + 4 files changed

[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 0/2] Recover from failure to probe GPU

2022-12-23 Thread Mario Limonciello
On 12/22/22 13:41, Javier Martinez Canillas wrote: [adding Thomas Zimmermann to CC list] Hello Mario, Interesting case. On 12/22/22 19:30, Mario Limonciello wrote: One of the first thing that KMS drivers do during initialization is destroy the system firmware framebuffer by means of

[PATCH v2 00/11] Recover from failure to probe GPU

2022-12-28 Thread Mario Limonciello
to that older stable kernels with IP discovery won't try to probe unknown IP. * Drop changes to drm aperature. * Fetch SDMA, VCN, MES, GC and PSP microcode during IP discovery. Mario Limonciello (11): drm/amd: Delay removal of the firmware framebuffer drm/amd: Add a legac

[PATCH v2 01/11] drm/amd: Delay removal of the firmware framebuffer

2022-12-28 Thread Mario Limonciello
e EFI framebuffer. Cc: sta...@vger.kernel.org Suggested-by: Alex Deucher Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 6 -- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/a

[PATCH v2 02/11] drm/amd: Add a legacy mapping to "amdgpu_ucode_ip_version_decode"

2022-12-28 Thread Mario Limonciello
This will allow other parts of the driver that currently special case firmware file names to before IP version style naming to just have a single call to `amdgpu_ucode_ip_version_decode`. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 208

[PATCH v2 03/11] drm/amd: Convert SMUv11 microcode init to use `amdgpu_ucode_ip_version_decode`

2022-12-28 Thread Mario Limonciello
Remove the special casing from SMU v11 code. No intended functional changes. Signed-off-by: Mario Limonciello --- .../gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c| 35 ++- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c

[PATCH v2 04/11] drm/amd: Convert SMU v13 to use `amdgpu_ucode_ip_version_decode`

2022-12-28 Thread Mario Limonciello
The special case for the one dGPU has been moved into `amdgpu_ucode_ip_version_decode`, so simplify this code. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v2 07/11] drm/amd: Request MES microcode during IP discovery

2022-12-28 Thread Mario Limonciello
If MES microcode is required but not available during early init, the microcode framebuffer will have already been released and the screen will freeze. Move the request for MES microcode into the IP discovery phase so that if it's not available, IP discovery will fail. Signed-off-by:

[PATCH v2 05/11] drm/amd: Request SDMA microcode during IP discovery

2022-12-28 Thread Mario Limonciello
If SDMA microcode is not available during early init, the microcode framebuffer will have already been released and the screen will freeze. Move the request from SDMA microcode into the IP discovery phase so that if it's not available, IP discovery will fail. Signed-off-by: Mario Limonc

[PATCH v2 11/11] drm/amd: Request PSP microcode during IP discovery

2022-12-28 Thread Mario Limonciello
If PSP microcode is required but not available during early init, the firmware framebuffer will have already been released and the screen will freeze. Move the request for PSP microcode into the IP discovery phase so that if it's not available, IP discovery will fail. Signed-off-by:

[PATCH v2 08/11] drm/amd: Request GFX9 microcode during IP discovery

2022-12-28 Thread Mario Limonciello
If GFX9 microcode is required but not available during early init, the microcode framebuffer will have already been released and the screen will freeze. Move the request for GFX9 microcode into the IP discovery phase so that if it's not available, IP discovery will fail. Signed-off-by:

[PATCH v2 06/11] drm/amd: Request VCN microcode during IP discovery

2022-12-28 Thread Mario Limonciello
If VCN microcode is not available during early init, the microcode framebuffer will have already been released and the screen will freeze. Move the request for VCN microcode into the IP discovery phase so that if it's not available, IP discovery will fail. Signed-off-by: Mario Limonc

[PATCH v2 09/11] drm/amd: Request GFX10 microcode during IP discovery

2022-12-28 Thread Mario Limonciello
If GFX10 microcode is required but not available during early init, the microcode framebuffer will have already been released and the screen will freeze. Move the request for GFX10 microcode into the IP discovery phase so that if it's not available, IP discovery will fail. Signed-off-by:

[PATCH v2 10/11] drm/amd: Request GFX11 microcode during IP discovery

2022-12-28 Thread Mario Limonciello
If GFX11 microcode is required but not available during early init, the microcode framebuffer will have already been released and the screen will freeze. Move the request for GFX11 microcode into the IP discovery phase so that if it's not available, IP discovery will fail. Signed-off-by:

[PATCH v3 00/11] Recover from failure to probe GPU

2022-12-29 Thread Mario Limonciello
older stable kernels with IP discovery won't try to probe unknown IP. * Drop changes to drm aperature. * Fetch SDMA, VCN, MES, GC and PSP microcode during IP discovery. Mario Limonciello (11): drm/amd: Delay removal of the firmware framebuffer drm/amd: Add

[PATCH v3 04/11] drm/amd: Convert SMUv13 to use `amdgpu_ucode_ip_version_decode`

2022-12-29 Thread Mario Limonciello
The special case for the one dGPU has been moved into `amdgpu_ucode_ip_version_decode`, so simplify this code. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff

[PATCH v3 01/11] drm/amd: Delay removal of the firmware framebuffer

2022-12-29 Thread Mario Limonciello
e EFI framebuffer. Cc: sta...@vger.kernel.org Suggested-by: Alex Deucher Reviewed-by: Javier Martinez Canillas Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 6 -- 2 files chang

[PATCH v3 02/11] drm/amd: Add a legacy mapping to "amdgpu_ucode_ip_version_decode"

2022-12-29 Thread Mario Limonciello
This will allow other parts of the driver that currently special case firmware file names to before IP version style naming to just have a single call to `amdgpu_ucode_ip_version_decode`. Signed-off-by: Mario Limonciello --- v2->v3: * Fixes for GFX9 SDMA --- drivers/gpu/drm/amd/amd

[PATCH v3 05/11] drm/amd: Request SDMA microcode during IP discovery

2022-12-29 Thread Mario Limonciello
If SDMA microcode is not available during early init, the firmware framebuffer will have already been released and the screen will freeze. Move the request from SDMA microcode into the IP discovery phase so that if it's not available, IP discovery will fail. Signed-off-by: Mario Limonc

[PATCH v3 07/11] drm/amd: Request MES microcode during IP discovery

2022-12-29 Thread Mario Limonciello
ucher Signed-off-by: Mario Limonciello --- v2->v3: * Add a missing newline --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 40 +++ drivers/gpu/drm/amd/amdgpu/mes_v10_1.c| 28 - drivers/gpu/drm/amd/amdgpu/mes_v11_0.c| 25 +--- 3 files cha

[PATCH v3 03/11] drm/amd: Convert SMUv11 microcode init to use `amdgpu_ucode_ip_version_decode`

2022-12-29 Thread Mario Limonciello
Remove the special casing from SMU v11 code. No intended functional changes. Signed-off-by: Mario Limonciello --- .../gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c| 35 ++- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c

[PATCH v3 10/11] drm/amd: Request GFX11 microcode during IP discovery

2022-12-29 Thread Mario Limonciello
Alex Deucher Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 52 +++ drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c| 64 +-- 2 files changed, 53 insertions(+), 63 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery

[PATCH v3 06/11] drm/amd: Request VCN microcode during IP discovery

2022-12-29 Thread Mario Limonciello
ff-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 41 - drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 85 +-- 2 files changed, 41 insertions(+), 85 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/a

[PATCH v3 09/11] drm/amd: Request GFX10 microcode during IP discovery

2022-12-29 Thread Mario Limonciello
Alex Deucher Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 137 + drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c| 180 +- 2 files changed, 144 insertions(+), 173 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery

[PATCH v3 11/11] drm/amd: Request PSP microcode during IP discovery

2022-12-29 Thread Mario Limonciello
If PSP microcode is required but not available during early init, the firmware framebuffer will have already been released and the screen will freeze. Move the request for PSP microcode into the IP discovery phase so that if it's not available, IP discovery will fail. Signed-off-by:

[PATCH v3 08/11] drm/amd: Request GFX9 microcode during IP discovery

2022-12-29 Thread Mario Limonciello
If GFX9 microcode is required but not available during early init, the firmware framebuffer will have already been released and the screen will freeze. Move the request for GFX9 microcode into the IP discovery phase so that if it's not available, IP discovery will fail. Signed-off-by:

[PATCH v4 00/27] Recover from failure to probe GPU

2023-01-03 Thread Mario Limonciello
e kernels with IP discovery won't try to probe unknown IP. * Drop changes to drm aperature. * Fetch SDMA, VCN, MES, GC and PSP microcode during IP discovery. Mario Limonciello (27): drm/amd: Delay removal of the firmware framebuffer drm/amd: Add a lega

[PATCH v4 01/27] drm/amd: Delay removal of the firmware framebuffer

2023-01-03 Thread Mario Limonciello
e EFI framebuffer. Cc: sta...@vger.kernel.org Suggested-by: Alex Deucher Signed-off-by: Mario Limonciello --- v3->v4: * Drop all R-b/A-b tags. * Move to after early IP init instead --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 6 --

[PATCH v4 03/27] drm/amd: Convert SMUv11 microcode to use `amdgpu_ucode_ip_version_decode`

2023-01-03 Thread Mario Limonciello
Remove the special casing from SMU v11 code. No intended functional changes. Signed-off-by: Mario Limonciello Acked-by: Christian König --- v3->v4: * No changes --- .../gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c| 35 ++- 1 file changed, 3 insertions(+), 32 deletions(-) d

[PATCH v4 04/27] drm/amd: Convert SMUv13 microcode to use `amdgpu_ucode_ip_version_decode`

2023-01-03 Thread Mario Limonciello
The special case for the one dGPU has been moved into `amdgpu_ucode_ip_version_decode`, so simplify this code. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Acked-by: Christian König --- v3->v4: * No changes --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 12 ++--

[PATCH v4 02/27] drm/amd: Add a legacy mapping to "amdgpu_ucode_ip_version_decode"

2023-01-03 Thread Mario Limonciello
This will allow other parts of the driver that currently special case firmware file names to before IP version style naming to just have a single call to `amdgpu_ucode_ip_version_decode`. Signed-off-by: Mario Limonciello Acked-by: Christian König --- v3->v4: * No changes v2->v3: * Fix

[PATCH v4 05/27] drm/amd: Add a new helper for loading/validating microcode

2023-01-03 Thread Mario Limonciello
il if firmware couldn't be loaded instead of the IP block being disabled. Signed-off-by: Mario Limonciello --- v3-v4: * New patch --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 24 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 1 + 2 files changed, 25 insertions(+) di

[PATCH v4 06/27] drm/amd: Use `amdgpu_ucode_load` helper for SDMA

2023-01-03 Thread Mario Limonciello
The `amdgpu_ucode_load` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. Signed-off-by: Mario Limonciello --- v3->v4: * New patch --- drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) d

[PATCH v4 07/27] drm/amd: Convert SDMA to use `amdgpu_ucode_ip_version_decode`

2023-01-03 Thread Mario Limonciello
Simplifies the code so that all SDMA versions will get the firmware name from `amdgpu_ucode_ip_version_decode`. Signed-off-by: Mario Limonciello --- v3->v4: * Move out of IP discovery and instead simplify early_init v2->v3: * Fix dGPU naming scheme --- drivers/gpu/drm/amd/amdgpu/amdgpu_

[PATCH v4 10/27] drm/amd: Load VCN microcode during early_init

2023-01-03 Thread Mario Limonciello
Simplifies the code so that all VCN versions will get the firmware name from `amdgpu_ucode_ip_version_decode` and then use this filename to load microcode as part of the early_init process. Signed-off-by: Mario Limonciello --- v3->v4: * Move out of IP discovery and introduce early_init ph

[PATCH v4 08/27] drm/amd: Make SDMA firmware load failures less noisy.

2023-01-03 Thread Mario Limonciello
mdgpu/green_sardine_sdma.bin" [3.855398] [drm:sdma_v4_0_early_init [amdgpu]] *ERROR* Failed to load sdma firmware! ``` Realistically we don't need all of these, a user can tell from the first one that request_firmware emitted what happened. Drop the others. Signed-off-by: Mario Limonciello --- v3-&

[PATCH v4 09/27] drm/amd: Use `amdgpu_ucode_load` helper for VCN

2023-01-03 Thread Mario Limonciello
The `amdgpu_ucode_load` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. Signed-off-by: Mario Limonciello --- v3->v4: * New patch --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 15 +++ 1 file changed, 3 insertions(+), 12 deleti

[PATCH v4 13/27] drm/amd: Remove superfluous assignment for `adev->mes.adev`

2023-01-03 Thread Mario Limonciello
`amdgpu_mes_init` already sets `adev->mes.adev`, so there is no need to also set it in the IP specific versions. Signed-off-by: Mario Limonciello --- v4: * New patch --- drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 1 - drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 1 - 2 files changed, 2 deleti

[PATCH v4 12/27] drm/amd: Use `amdgpu_ucode_load` helper for MES

2023-01-03 Thread Mario Limonciello
The `amdgpu_ucode_load` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. Signed-off-by: Mario Limonciello --- v3->v4: * New patch --- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) d

[PATCH v4 14/27] drm/amd: Use `amdgpu_ucode_load` helper for GFX9

2023-01-03 Thread Mario Limonciello
The `amdgpu_ucode_load` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. Signed-off-by: Mario Limonciello --- v3->v4: * new patch --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 43 +-- 1 file changed, 8 insertions(+),

[PATCH v4 15/27] drm/amd: Load GFX9 microcode during early_init

2023-01-03 Thread Mario Limonciello
If GFX9 microcode is required but not available during early init, the firmware framebuffer will have already been released and the screen will freeze. Signed-off-by: Mario Limonciello --- v3->v4: * Move microcode load phase to early init v2->v3: * Fix issues found on real hardware

[PATCH v4 11/27] drm/amd: Load MES microcode during early_init

2023-01-03 Thread Mario Limonciello
phase so that if it's not available, early_init will fail. Signed-off-by: Mario Limonciello --- v3->v4: * Introduce new early_init phase for MES v2->v3: * Add a missing newline --- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 65 + drivers/gpu/drm/amd/amdgpu/amdgpu

[PATCH v4 18/27] drm/amd: Use `amdgpu_ucode_load` helper for GFX11

2023-01-03 Thread Mario Limonciello
The `amdgpu_ucode_load` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. Signed-off-by: Mario Limonciello --- v3->v4: * New patch --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 23 --- 1 file changed, 4 insertions(+),

[PATCH v4 19/27] drm/amd: Load GFX11 microcode during early_init

2023-01-03 Thread Mario Limonciello
If GFX11 microcode is required but not available during early init, the firmware framebuffer will have already been released and the screen will freeze. Move the request for GFX11 microcode into the early_init phase so that if it's not available, driver init will fail. Signed-off-by:

[PATCH v4 16/27] drm/amd: Use `amdgpu_ucode_load` helper for GFX10

2023-01-03 Thread Mario Limonciello
The `amdgpu_ucode_load` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. Signed-off-by: Mario Limonciello --- v3->v4: * New patch --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 35 ++ 1 file changed, 8 insertions(+),

[PATCH v4 17/27] drm/amd: Load GFX10 microcode during early_init

2023-01-03 Thread Mario Limonciello
: Mario Limonciello --- v3->v4: * Move out of discovery into early_init --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 82 ++ 1 file changed, 17 insertions(+), 65 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c in

[PATCH v4 20/27] drm/amd: Parse both v1 and v2 TA microcode headers using same function

2023-01-03 Thread Mario Limonciello
Several IP versions duplicate code and can't use the common helpers. Move this code into a single function so that the helpers can be used. Signed-off-by: Mario Limonciello --- v3->v4: * New patch --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 120 ++-- drivers/gpu

[PATCH v4 21/27] drm/amd: Avoid BUG() for case of SRIOV missing IP version

2023-01-03 Thread Mario Limonciello
No need to crash the kernel. AMDGPU will now fail to probe. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index

[PATCH v4 22/27] drm/amd: Load PSP microcode during early_init

2023-01-03 Thread Mario Limonciello
. Signed-off-by: Mario Limonciello --- v3->v4: * new patch --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 128 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 3 + drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 16 +-- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 55 ++ driv

[PATCH v4 24/27] drm/amd/display: Load DMUB microcode during early_init

2023-01-03 Thread Mario Limonciello
If DMUB is required for an ASIC, ensure that the microcode is available and validates during early_init. Any failures will cause the driver to fail to probe before the firmware framebuffer has been removed. Signed-off-by: Mario Limonciello --- v3->v4: * New patch --- .../gpu/drm/amd/disp

[PATCH v4 23/27] drm/amd: Use `amdgpu_ucode_load` helper for PSP

2023-01-03 Thread Mario Limonciello
The `amdgpu_ucode_load` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. Signed-off-by: Mario Limonciello --- v3->v4: * New patch --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 42 ++--- drivers/gpu/drm/amd/amd

[PATCH v4 26/27] drm/amd: Load SMU microcode during early_init

2023-01-03 Thread Mario Limonciello
This will ensure that the microcode is available before the firmware framebuffer has been destroyed. Signed-off-by: Mario Limonciello --- v3->v4: * new patch --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/driv

[PATCH v4 25/27] drm/amd: Use `amdgpu_ucode_load` helper for SMU

2023-01-03 Thread Mario Limonciello
The `amdgpu_ucode_load` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. Signed-off-by: Mario Limonciello --- v3->v4: * New patch --- drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 5 + drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c

  1   2   3   4   5   6   7   >