[PATCH v7 29/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX6

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

[PATCH v7 26/45] drm/amd: Use `amdgpu_ucode_*` helpers for SMU

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

[PATCH v7 33/45] drm/amd: Use `amdgpu_ucode_*` helpers for GMC7

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

[PATCH v7 24/45] drm/amd/display: Load DMUB microcode during early_init

2023-01-05 Thread Mario Limonciello
-off-by: Mario Limonciello --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 89 --- 1 file changed, 58 insertions(+), 31 deletions(-) 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 4829b5431e4c

[PATCH v7 23/45] drm/amd: Use `amdgpu_ucode_*` helpers for PSP

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

[PATCH v7 19/45] drm/amd: Load GFX11 microcode during early_init

2023-01-05 Thread Mario Limonciello
ucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->v6: * Rebase on earlier changes --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 26 +++--- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers

[PATCH v7 17/45] drm/amd: Load GFX10 microcode during early_init

2023-01-05 Thread Mario Limonciello
: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 84 ++ 1 file changed, 18 insertions(+), 66 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c index

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

2023-01-05 Thread Mario Limonciello
No need to crash the kernel. AMDGPU will now fail to probe. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar 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

[PATCH v7 18/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX11

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper will provide symmetery on unload. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

[PATCH v7 16/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX10

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unload. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->v6: * Adj

[PATCH v7 15/45] drm/amd: Load GFX9 microcode during early_init

2023-01-05 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. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 58

[PATCH v7 14/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX9

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper will provide symmetry on unload. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->

[PATCH v7 11/45] drm/amd: Load MES microcode during early_init

2023-01-05 Thread Mario Limonciello
phase so that if it's not available, early_init will fail. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 65 + drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 1 + drivers/gpu/drm/amd/amdgpu/mes_

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

2023-01-05 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. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 1 - drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 1 -

[PATCH v7 12/45] drm/amd: Use `amdgpu_ucode_*` helpers for MES

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper provides symmetry for releasing firmware. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5

[PATCH v7 07/45] drm/amd: Convert SDMA to use `amdgpu_ucode_ip_version_decode`

2023-01-05 Thread Mario Limonciello
Simplifies the code so that all SDMA versions will get the firmware name from `amdgpu_ucode_ip_version_decode`. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 12 -- drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h

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

2023-01-05 Thread Mario Limonciello
zar Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c index 95e9450f3348..0e1e2521fe25 100644 --- a/drivers/gpu

[PATCH v7 10/45] drm/amd: Load VCN microcode during early_init

2023-01-05 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. Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->v6: * Fix whitespace problem

[PATCH v7 09/45] drm/amd: Use `amdgpu_ucode_*` helpers for VCN

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->v6: * Adjust

[PATCH v7 04/45] drm/amd: Convert SMUv13 microcode to use `amdgpu_ucode_ip_version_decode`

2023-01-05 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 Acked-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 12 ++-- 1

[PATCH v7 03/45] drm/amd: Convert SMUv11 microcode to use `amdgpu_ucode_ip_version_decode`

2023-01-05 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 Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar --- .../gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c| 35 ++- 1 file changed, 3 insertions

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

2023-01-05 Thread Mario Limonciello
il if firmware couldn't be loaded instead of the IP block being disabled. Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->v6: * Fix argument to be ** not * --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 36 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode

[PATCH v7 06/45] drm/amd: Use `amdgpu_ucode_request` helper for SDMA

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- v5->v6: * Adjust for amdgpu_ucode_release argument change --- drivers/gpu/

[PATCH v7 02/45] drm/amd: Add a legacy mapping to "amdgpu_ucode_ip_version_decode"

2023-01-05 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 Reviewed-by: Alex Deucher Reviewed-by: Lijo

[PATCH v7 00/45] Recover from failure to probe GPU

2023-01-05 Thread Mario Limonciello
der 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 (27): drm/amd: Delay removal of the firmware framebuffer drm/amd: Add a legacy mapping to "amdgpu_

[PATCH v7 01/45] drm/amd: Delay removal of the firmware framebuffer

2023-01-05 Thread Mario Limonciello
e EFI framebuffer. Cc: sta...@vger.kernel.org Suggested-by: Alex Deucher Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar 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(

Re: [PATCH v6 05/45] drm/amd: Add a new helper for loading/validating microcode

2023-01-04 Thread Mario Limonciello
On 1/4/23 23:29, Lazar, Lijo wrote: On 1/5/2023 10:53 AM, Mario Limonciello wrote: On 1/4/23 23:07, Lazar, Lijo wrote: On 1/5/2023 9:12 AM, Mario Limonciello wrote: All microcode runs a basic validation after it's been loaded. Each IP block as part of init will run both. Introd

Re: [PATCH v6 05/45] drm/amd: Add a new helper for loading/validating microcode

2023-01-04 Thread Mario Limonciello
On 1/4/23 23:07, Lazar, Lijo wrote: On 1/5/2023 9:12 AM, Mario Limonciello wrote: All microcode runs a basic validation after it's been loaded. Each IP block as part of init will run both. Introduce a wrapper for request_firmware and amdgpu_ucode_validate. This wrapper will also rema

[PATCH v6 44/45] drm/amd: Use `amdgpu_ucode_release` helper for si

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_release` helper is replacing all calls to release_firmware. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust for amdgpu_ucode_release argument change --- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 11 ++- 1 file changed, 2 inserti

[PATCH v6 42/45] drm/amd: Use `amdgpu_ucode_*` helpers for DMCU

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH v6 41/45] drm/amd: Use `amdgpu_ucode_*` helpers for GPU info bin

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust

[PATCH v6 45/45] drm/amd: make amdgpu_ucode_validate static

2023-01-04 Thread Mario Limonciello
No consumers outside of amdgpu_ucode.c use amdgpu_ucode_validate anymore, so make the function static. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 1 - 2 files changed, 1 insertion

[PATCH v6 43/45] drm/amd: Use `amdgpu_ucode_release` helper for powerplay

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_release` helper is replacing all calls to release_firmware. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust for amdgpu_ucode_release argument change --- drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c | 3 +-- 1 file changed, 1 insert

[PATCH v6 37/45] drm/amd: Use `amdgpu_ucode_*` helpers for SDMA on CIK

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust

[PATCH v6 38/45] drm/amd: Use `amdgpu_ucode_*` helpers for UVD

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust

[PATCH v6 40/45] drm/amd: Use `amdgpu_ucode_*` helpers for CGS

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust

[PATCH v6 39/45] drm/amd: Use `amdgpu_ucode_*` helpers for VCE

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust

[PATCH v6 36/45] drm/amd: Use `amdgpu_ucode_*` helpers for SDMA3.0

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust

[PATCH v6 29/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX6

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust

[PATCH v6 35/45] drm/amd: Use `amdgpu_ucode_*` helpers for SDMA2.4

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust

[PATCH v6 28/45] drm/amd: Optimize SRIOV switch/case for PSP microcode load

2023-01-04 Thread Mario Limonciello
Now that IP version decoding is used, a number of case statements can be combined. Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a

[PATCH v6 34/45] drm/amd: Use `amdgpu_ucode_*` helpers for GMC8

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust

[PATCH v6 32/45] drm/amd: Use `amdgpu_ucode_*` helpers for GMC6

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust

[PATCH v6 33/45] drm/amd: Use `amdgpu_ucode_*` helpers for GMC7

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust

[PATCH v6 31/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX8

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust

[PATCH v6 30/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX7

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust

[PATCH v6 24/45] drm/amd/display: Load DMUB microcode during early_init

2023-01-04 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. Reviewed-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Mario Limonciello

[PATCH v6 27/45] drm/amd: Load SMU microcode during early_init

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

[PATCH v6 25/45] drm/amd: Use `amdgpu_ucode_release` helper for DMUB

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust for amdgpu_ucode_release argument change --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 +++--- 1 file changed, 3 insertions(+)

[PATCH v6 26/45] drm/amd: Use `amdgpu_ucode_*` helpers for SMU

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust

[PATCH v6 22/45] drm/amd: Load PSP microcode during early_init

2023-01-04 Thread Mario Limonciello
. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * rebase on earlier patches --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 120 +-- drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 12 --- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 52 ++ drivers/

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

2023-01-04 Thread Mario Limonciello
No need to crash the kernel. AMDGPU will now fail to probe. Reviewed-by: Alex Deucher 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

[PATCH v6 23/45] drm/amd: Use `amdgpu_ucode_*` helpers for PSP

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust

[PATCH v6 18/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX11

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper will provide symmetery on unload. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust

[PATCH v6 16/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX10

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unload. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust for amdgpu_ucode_rele

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

2023-01-04 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. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Rebase on earlier patches --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp

[PATCH v6 19/45] drm/amd: Load GFX11 microcode during early_init

2023-01-04 Thread Mario Limonciello
ucher Signed-off-by: Mario Limonciello --- v5->v6: * Rebase on earlier changes --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 26 +++--- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx

[PATCH v6 17/45] drm/amd: Load GFX10 microcode during early_init

2023-01-04 Thread Mario Limonciello
: Alex Deucher Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 84 ++ 1 file changed, 18 insertions(+), 66 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c index 140bb18ff768..6983acc456b2

[PATCH v6 15/45] drm/amd: Load GFX9 microcode during early_init

2023-01-04 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. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 58 +-- 1 file

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

2023-01-04 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. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 1 - drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 1 - 2 files changed

[PATCH v6 14/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX9

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper will provide symmetry on unload. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust

[PATCH v6 12/45] drm/amd: Use `amdgpu_ucode_*` helpers for MES

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper provides symmetry for releasing firmware. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust

[PATCH v6 11/45] drm/amd: Load MES microcode during early_init

2023-01-04 Thread Mario Limonciello
phase so that if it's not available, early_init will fail. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 65 + drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 1 + drivers/gpu/drm/amd/amdgpu/mes_v10_1.c

[PATCH v6 10/45] drm/amd: Load VCN microcode during early_init

2023-01-04 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 --- v5->v6: * Fix whitespace problem in firmware file names * Adj

[PATCH v6 07/45] drm/amd: Convert SDMA to use `amdgpu_ucode_ip_version_decode`

2023-01-04 Thread Mario Limonciello
Simplifies the code so that all SDMA versions will get the firmware name from `amdgpu_ucode_ip_version_decode`. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 12 -- drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h | 4 +- drivers/gpu/drm

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

2023-01-04 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. Reviewed-by: Alex Deucher Signed-off-by: Ma

[PATCH v6 06/45] drm/amd: Use `amdgpu_ucode_request` helper for SDMA

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust for amdgpu_ucode_release argument change --- drivers/gpu/drm/amd/amdgpu/amdgpu_sdm

[PATCH v6 09/45] drm/amd: Use `amdgpu_ucode_*` helpers for VCN

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- v5->v6: * Adjust for amdgpu_ucode_release argum

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

2023-01-04 Thread Mario Limonciello
il if firmware couldn't be loaded instead of the IP block being disabled. Signed-off-by: Mario Limonciello --- v5->v6: * Fix argument to be ** not * --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 36 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 3 ++ 2 file

[PATCH v6 04/45] drm/amd: Convert SMUv13 microcode to use `amdgpu_ucode_ip_version_decode`

2023-01-04 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 Acked-by: Christian König Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 12 ++-- 1 file changed, 2

[PATCH v6 03/45] drm/amd: Convert SMUv11 microcode to use `amdgpu_ucode_ip_version_decode`

2023-01-04 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 Reviewed-by: Alex Deucher --- .../gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c| 35 ++- 1 file changed, 3 insertions(+), 32 deletions(-) diff

[PATCH v6 02/45] drm/amd: Add a legacy mapping to "amdgpu_ucode_ip_version_decode"

2023-01-04 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 Reviewed-by: Alex Deucher --- drivers/gpu/drm

[PATCH v6 01/45] drm/amd: Delay removal of the firmware framebuffer

2023-01-04 Thread Mario Limonciello
e EFI framebuffer. Cc: sta...@vger.kernel.org Suggested-by: Alex Deucher 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 changed, 8 insertions(+), 6 deletions(-) diff --

[PATCH v6 00/45] Recover from failure to probe GPU

2023-01-04 Thread Mario Limonciello
or SDMA on dGPUs v1->v2: * Take the suggestion from v1 thread to delay the framebuffer release until ip discovery is done. This patch is CC to stable to that older stable kernels with IP discovery won't try to probe unknown IP. * Drop changes to drm aperature. * Fetch SDMA, VCN, M

[PATCH v5 45/45] drm/amd: make amdgpu_ucode_validate static

2023-01-04 Thread Mario Limonciello
No consumers outside of amdgpu_ucode.c use amdgpu_ucode_validate anymore, so make the function static. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff

[PATCH v5 43/45] drm/amd: Use `amdgpu_ucode_release` helper for powerplay

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_release` helper is replacing all calls to release_firmware. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c b/drivers

[PATCH v5 40/45] drm/amd: Use `amdgpu_ucode_*` helpers for CGS

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 11 ++- 1 file

[PATCH v5 37/45] drm/amd: Use `amdgpu_ucode_*` helpers for SDMA on CIK

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 16 ++-- 1

[PATCH v5 42/45] drm/amd: Use `amdgpu_ucode_*` helpers for DMCU

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11

[PATCH v5 26/45] drm/amd: Use `amdgpu_ucode_*` helpers for SMU

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 16

[PATCH v5 44/45] drm/amd: Use `amdgpu_ucode_release` helper for si

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_release` helper is replacing all calls to release_firmware. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c b/drivers/gpu

[PATCH v5 30/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX7

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 68

[PATCH v5 41/45] drm/amd: Use `amdgpu_ucode_*` helpers for GPU info bin

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 14 +++--- 1

[PATCH v5 32/45] drm/amd: Use `amdgpu_ucode_*` helpers for GMC6

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 14 +++--- 1 file

[PATCH v5 39/45] drm/amd: Use `amdgpu_ucode_*` helpers for VCE

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 14 +++--- 1

[PATCH v5 38/45] drm/amd: Use `amdgpu_ucode_*` helpers for UVD

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 14 +++--- 1

[PATCH v5 28/45] drm/amd: Optimize SRIOV switch/case for PSP microcode load

2023-01-04 Thread Mario Limonciello
Now that IP version decoding is used, a number of case statements can be combined. Reviewed-by: Christian König Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH v5 31/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX8

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 94

[PATCH v5 36/45] drm/amd: Use `amdgpu_ucode_*` helpers for SDMA3.0

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 18 ++ 1

[PATCH v5 35/45] drm/amd: Use `amdgpu_ucode_*` helpers for SDMA2.4

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 18 ++ 1

[PATCH v5 34/45] drm/amd: Use `amdgpu_ucode_*` helpers for GMC8

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 13 +++-- 1 file

[PATCH v5 27/45] drm/amd: Load SMU microcode during early_init

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

[PATCH v5 33/45] drm/amd: Use `amdgpu_ucode_*` helpers for GMC7

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 13 +++-- 1 file

[PATCH v5 25/45] drm/amd: Use `amdgpu_ucode_release` helper for DMUB

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_release` helper is for symmetry on unloading. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu

[PATCH v5 29/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX6

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 30

[PATCH v5 11/45] drm/amd: Load MES microcode during early_init

2023-01-04 Thread Mario Limonciello
phase so that if it's not available, early_init will fail. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 65 + drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 1 + drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 97 + drivers/gp

[PATCH v5 22/45] drm/amd: Load PSP microcode during early_init

2023-01-04 Thread Mario Limonciello
. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 120 +-- drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 16 +-- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 55 ++- drivers/gpu/drm/amd/amdgpu/psp_v12_0.c | 13 +-- drivers/gpu/drm/amd/amdgpu

[PATCH v5 16/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX10

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unload. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 71

[PATCH v5 23/45] drm/amd: Use `amdgpu_ucode_*` helpers for PSP

2023-01-04 Thread Mario Limonciello
The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 80

[PATCH v5 17/45] drm/amd: Load GFX10 microcode during early_init

2023-01-04 Thread Mario Limonciello
: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 84 ++ 1 file changed, 18 insertions(+), 66 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c index d36dd823a319..585b301856d7 100644 --- a/drivers/gpu

<    2   3   4   5   6   7   8   9   10   >