Re: [PATCH 00/14] Remove clang's -Qunused-arguments from KBUILD_CPPFLAGS

2023-01-05 Thread Heiko Carstens
On Wed, Jan 04, 2023 at 12:54:18PM -0700, Nathan Chancellor wrote: > Hi all, ... > This series has seen my personal test framework, which tests several different > configurations and architectures, with LLVM tip of tree (16.0.0). I have done > defconfig, allmodconfig, and allnoconfig builds for arm

Re: [PATCH 4.19 1/1] drm/amdkfd: Check for null pointer after calling kmemdup

2023-01-05 Thread Greg KH
On Wed, Jan 04, 2023 at 08:05:57PM +0200, Dragos-Marian Panait wrote: > > On 04.01.2023 16:48, Greg KH wrote: > > On Wed, Jan 04, 2023 at 09:35:03AM -0500, Alex Deucher wrote: > > > On Wed, Jan 4, 2023 at 8:23 AM Christian König > > > wrote: > > > > Am 04.01.23 um 13:41 schrieb Greg KH: > > > >

Re: [PATCH] drm/amdgpu: Fix potential NULL dereference

2023-01-05 Thread Christian König
Am 04.01.23 um 23:19 schrieb Luben Tuikov: Fix potential NULL dereference, in the case when "man", the resource manager might be NULL, when/if we print debug information. Cc: Alex Deucher Cc: Christian König Cc: AMD Graphics Cc: Dan Carpenter Cc: kernel test robot Fixes: 7554886daa31ea ("dr

Re: [PATCH] drm/amdgpu: grab extra fence reference for drm_sched_job_add_dependency

2023-01-05 Thread Christian König
Am 05.01.23 um 02:44 schrieb Mikhail Gavrilov: On Tue, Jan 3, 2023 at 7:26 PM Alex Deucher wrote: On Tue, Jan 3, 2023 at 3:34 AM Christian König wrote: I assume that this was already upstreamed while I was on sick leave? Yes. Alex What about commit 2fdb8a8f07c2f1353770a324fd19b8114e4329ac

[PATCH 1/2] drm/amdgpu: fix another missing fence reference in the CS code

2023-01-05 Thread Christian König
drm_sched_job_add_dependency() consumes the references of the gang members. Only triggered by mesh shaders. Signed-off-by: Christian König Fixes: 1728baa7e4e6 ("drm/amdgpu: use scheduler dependencies for CS") Tested-by: Mike Lothian Tested-by: Bert Karwatzki --- drivers/gpu/drm/amd/amdgpu/amdg

[PATCH 2/2] drm/amdgpu: fix missing dma_fence_put in error path

2023-01-05 Thread Christian König
When the fence can't be added we need to drop the reference. Suggested-by: Bert Karwatzki Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/dr

Re: [pull] amdgpu, amdkfd drm-fixes-6.2

2023-01-05 Thread Daniel Vetter
On Wed, Jan 04, 2023 at 10:38:39PM -0500, Alex Deucher wrote: > Hi Dave, Daniel, > > Fixes for 6.2. > > The following changes since commit c8de526215fdab9f2dd0d9675582cf9f1391a919: > > Merge tag 'drm-misc-next-fixes-2023-01-03' of > git://anongit.freedesktop.org/drm/drm-misc into drm-fixes (2

Re: [PATCH v3 0/2] drm: Add GPU reset sysfs

2023-01-05 Thread Daniel Vetter
On Thu, 8 Dec 2022 at 05:54, Alex Deucher wrote: > > On Wed, Nov 30, 2022 at 6:11 AM Daniel Vetter wrote: > > > > On Fri, Nov 25, 2022 at 02:52:01PM -0300, André Almeida wrote: > > > This patchset adds a udev event for DRM device's resets. > > > > > > Userspace apps can trigger GPU resets by misu

Re: [PATCH 2/2] drm_print: fix stale macro-name in comment

2023-01-05 Thread Daniel Vetter
On Mon, Dec 05, 2022 at 09:10:05AM -0700, Jim Cromie wrote: > Cited commit uses stale macro name, fix this, and explain better. > > When DRM_USE_DYNAMIC_DEBUG=y, DYNDBG_CLASSMAP_DEFINE() maps DRM_UT_* > onto BITs in drm.debug. This still uses enum drm_debug_category, but > it is somewhat indirect

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

2023-01-05 Thread Lazar, Lijo
On 1/5/2023 9:12 AM, Mario Limonciello wrote: 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 ---

Re: [PATCH 2/8] drm/amd/pm: refine the checks for sysfs interfaces support

2023-01-05 Thread Lazar, Lijo
On 1/5/2023 8:52 AM, Evan Quan wrote: Make the code more clean and readable with no real logics change. Signed-off-by: Evan Quan Change-Id: I21c879fa9abad9f6da3b5289adf3124950d2f4eb --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 200 ++--- 1 file changed, 98 insertions(+

Re: [PATCH 7/8] drm/amd/pm: drop the support for manual fan speed setting on SMU13.0.0

2023-01-05 Thread Lazar, Lijo
On 1/5/2023 8:52 AM, Evan Quan wrote: Due to lack of support from PMFW. Signed-off-by: Evan Quan Change-Id: I5d466d3d521b26a484bd837e173b9b289d4020ec --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/sw

Re: [PATCH 12/14] drm/amd/display: Do not add '-mhard-float' to dml_ccflags for clang

2023-01-05 Thread Alex Deucher
On Wed, Jan 4, 2023 at 2:55 PM Nathan Chancellor wrote: > > When clang's -Qunused-arguments is dropped from KBUILD_CPPFLAGS, it > warns: > > clang-16: error: argument unused during compilation: '-mhard-float' > [-Werror,-Wunused-command-line-argument] > > Similar to commit 84edc2eff827 ("selfte

Re: [PATCH 2/2] drm/amdgpu: fix missing dma_fence_put in error path

2023-01-05 Thread Alex Deucher
On Thu, Jan 5, 2023 at 6:17 AM Christian König wrote: > > When the fence can't be added we need to drop the reference. > > Suggested-by: Bert Karwatzki > Signed-off-by: Christian König Series is: Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 4 +++- > 1 file ch

Re: [PATCH 16/16] drm/amd/display: Don't restrict bpc to 8 bpc

2023-01-05 Thread Sebastian Wick
On Fri, Dec 23, 2022 at 8:10 PM Harry Wentland wrote: > > > > On 12/14/22 04:01, Pekka Paalanen wrote: > > On Tue, 13 Dec 2022 18:20:59 +0100 > > Michel Dänzer wrote: > > > >> On 12/12/22 19:21, Harry Wentland wrote: > >>> This will let us pass kms_hdr.bpc_switch. > >>> > >>> I don't see any good

Re: [PATCH v3 0/6] Add support for atomic async page-flips

2023-01-05 Thread Simon Ser
Hm, thinking about this again, there's still something which is a bit off with the new approach. Let's say the caller sets MODE_ID to another blob ID, but with the same blob payload. DRM core is smart enough to figure out that the mode didn't change and skip the modeset. However, the check implemen

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

2023-01-05 Thread Limonciello, Mario
[AMD Official Use Only - General] > -Original Message- > From: Lazar, Lijo > Sent: Thursday, January 5, 2023 07:22 > To: Limonciello, Mario ; Deucher, Alexander > ; linux-ker...@vger.kernel.org > Cc: Javier Martinez Canillas ; Carlos Soriano Sanchez > ; amd-gfx@lists.freedesktop.org; dr

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

2023-01-05 Thread Lazar, Lijo
[AMD Official Use Only - General] In general, one file carries multiple binaries. Maybe the check is there as the same binary file is used in a derivative of Renoir or PSP v12 based SOCs. Keeping size of the binary as 0 prevents the load (I think there's a check). Apart from this one, rest of t

Re: [PATCH 2/2] drm/amdgpu: fix missing dma_fence_put in error path

2023-01-05 Thread Luben Tuikov
Series is: Reviewed-by: Luben Tuikov Regards, Luben On 2023-01-05 06:17, Christian König wrote: > When the fence can't be added we need to drop the reference. > > Suggested-by: Bert Karwatzki > Signed-off-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 4 +++- > 1 fil

Re: [PATCH 2/2] drm/amdgpu: fix missing dma_fence_put in error path

2023-01-05 Thread Alex Deucher
On Thu, Jan 5, 2023 at 6:17 AM Christian König wrote: > > When the fence can't be added we need to drop the reference. > > Suggested-by: Bert Karwatzki > Signed-off-by: Christian König please add: Cc: sta...@vger.kernel.org # 6.1.x When you push this series. Alex > --- > drivers/gpu/drm/amd/

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

2023-01-05 Thread Mario Limonciello
Removing the firmware framebuffer from the driver means that even if the driver doesn't support the IP blocks in a GPU it will no longer be functional after the driver fails to initialize. This change will ensure that unsupported IP blocks at least cause the driver to work with the EFI framebuffer

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

2023-01-05 Thread Mario Limonciello
One of the first thing that KMS drivers do during initialization is destroy the system firmware framebuffer by means of `drm_aperture_remove_conflicting_pci_framebuffers` This means that if for any reason the GPU failed to probe the user will be stuck with at best a screen frozen at the last thing

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

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

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

2023-01-05 Thread Mario Limonciello
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 remap any error codes from request_firmware to -ENODEV. This is so that early_init will fail if fir

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

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

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

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

2023-01-05 Thread Mario Limonciello
When firmware is missing we get failures at every step. ``` [3.855086] amdgpu :04:00.0: Direct firmware load for amdgpu/green_sardine_sdma.bin failed with error -2 [3.855087] [drm:amdgpu_sdma_init_microcode [amdgpu]] *ERROR* SDMA: Failed to init firmware "amdgpu/green_sardine_sdma.bin

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

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

2023-01-05 Thread Mario Limonciello
Add an early_init phase to MES for fetching and validating microcode from the filesystem. If MES 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 MES microcode into the early_init p

[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->v6: * A

[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 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->v6: *

[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: * Adjust

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

2023-01-05 Thread Mario Limonciello
Simplifies the code so that GFX10 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. Any failures will cause the driver to fail to probe before the firmware framebuffer has been removed. Reviewed-by: Ale

[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/amdgpu_psp.

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

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

[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->v6: * Adju

[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->v6: * Adju

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

2023-01-05 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 Reviewed-by: Lijo Lazar Signed-of

[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->v6: * Adju

[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->v6: * Adju

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

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

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

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->v6: * Adju

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

2023-01-05 Thread Mario Limonciello
Simplifies the code so that all PSP 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. Any failures will cause the driver to fail to probe before the firmware framebuffer has been removed. Revie

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

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->v6: * Adju

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

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar 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 change

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

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->v6: * Adju

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

2023-01-05 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 --- v6->v7: * Drop tags * Only set adev->psp.securedisplay_context.context on PSPv12 Renoir and PSP v10 which matches p

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

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->v6: * Adju

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

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->v6: * Adju

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

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->v6: * Adju

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

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->v6: * Adju

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

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->v6: * Adju

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

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->v6: * Adju

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

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_release` helper is replacing all calls to release_firmware. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar 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 fil

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

2023-01-05 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 Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 8 +--- 1 file changed, 1 insertion(+), 7 deleti

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

2023-01-05 Thread Mario Limonciello
The `amdgpu_ucode_release` helper is replacing all calls to release_firmware. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar 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 c

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

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->v6: * Adju

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

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->v6: * Adju

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

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

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

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 --- drivers/gpu/dr

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

2023-01-05 Thread Harry Wentland
On 1/4/23 22:42, Mario Limonciello wrote: > The `amdgpu_ucode_release` helper is for symmetry on unloading. > > Reviewed-by: Alex Deucher > Signed-off-by: Mario Limonciello Reviewed-by: Harry Wentland Harry > --- > v5->v6: > * Adjust for amdgpu_ucode_release argument change > --- > drivers

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

2023-01-05 Thread Harry Wentland
On 1/4/23 22:43, Mario Limonciello wrote: > 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: Mari

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

2023-01-05 Thread Alex Deucher
On Thu, Jan 5, 2023 at 12:02 PM Mario Limonciello wrote: > > One of the first thing that KMS drivers do during initialization is > destroy the system firmware framebuffer by means of > `drm_aperture_remove_conflicting_pci_framebuffers` > > This means that if for any reason the GPU failed to probe

[PATCH v2] drm/amd/display: fix PSR-SU/DSC interoperability support

2023-01-05 Thread Hamza Mahfooz
Currently, there are issues with enabling PSR-SU + DSC. This stems from the fact that DSC imposes a slice height on transmitted video data and we are not conforming to that slice height in PSR-SU regions. So, pass slice_height into su_y_granularity to feed the DSC slice height into PSR-SU code. Si

Re: [PATCH v2] drm/amd/display: fix PSR-SU/DSC interoperability support

2023-01-05 Thread Harry Wentland
On 1/5/23 12:38, Hamza Mahfooz wrote: > Currently, there are issues with enabling PSR-SU + DSC. This stems from > the fact that DSC imposes a slice height on transmitted video data and > we are not conforming to that slice height in PSR-SU regions. So, pass > slice_height into su_y_granularity t

Re: [PATCH 2/2] drm/amdgpu: fix missing dma_fence_put in error path

2023-01-05 Thread Christian König
Am 05.01.23 um 17:50 schrieb Alex Deucher: On Thu, Jan 5, 2023 at 6:17 AM Christian König wrote: When the fence can't be added we need to drop the reference. Suggested-by: Bert Karwatzki Signed-off-by: Christian König please add: Cc: sta...@vger.kernel.org # 6.1.x When you push this series.

Re: [PATCH -next] drm/amd/display: Remove redundant assignment to variable dc

2023-01-05 Thread Harry Wentland
On 12/16/22 05:23, Yi Yang wrote: > Smatch report warning as follows: > > Line 53679: drivers/gpu/drm/amd/display/dc/core/dc_stream.c:402 > dc_stream_set_cursor_position() warn: variable dereferenced before > check 'stream' > > The value of 'dc' has been assigned after check whether 'stream' is >

Re: [PATCH 2/2] drm/amdgpu: fix missing dma_fence_put in error path

2023-01-05 Thread Alex Deucher
On Thu, Jan 5, 2023 at 2:11 PM Christian König wrote: > > Am 05.01.23 um 17:50 schrieb Alex Deucher: > > On Thu, Jan 5, 2023 at 6:17 AM Christian König > > wrote: > >> When the fence can't be added we need to drop the reference. > >> > >> Suggested-by: Bert Karwatzki > >> Signed-off-by: Christia

[PATCH] drm/amdkfd: Fix NULL pointer error for GC 11.0.1 on mGPU

2023-01-05 Thread Eric Huang
The point bo->kfd_bo is NULL for queue's write pointer BO when creating queue on mGPU. To avoid using the pointer fixes the error. Signed-off-by: Eric Huang --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 +- 2 files cha

Re: [PATCH v2] drm/amd/display: fix PSR-SU/DSC interoperability support

2023-01-05 Thread Hamza Mahfooz
On 1/5/23 13:29, Harry Wentland wrote: On 1/5/23 12:38, Hamza Mahfooz wrote: Currently, there are issues with enabling PSR-SU + DSC. This stems from the fact that DSC imposes a slice height on transmitted video data and we are not conforming to that slice height in PSR-SU regions. So, pass sli

Re: [PATCH v2] drm/amd/display: fix PSR-SU/DSC interoperability support

2023-01-05 Thread Leo Li
On 1/5/23 15:07, Hamza Mahfooz wrote: On 1/5/23 13:29, Harry Wentland wrote: On 1/5/23 12:38, Hamza Mahfooz wrote: Currently, there are issues with enabling PSR-SU + DSC. This stems from the fact that DSC imposes a slice height on transmitted video data and we are not conforming to that s

[PATCH v3] drm/amd/display: fix PSR-SU/DSC interoperability support

2023-01-05 Thread Hamza Mahfooz
Currently, there are issues with enabling PSR-SU + DSC. This stems from the fact that DSC imposes a slice height on transmitted video data and we are not conforming to that slice height in PSR-SU regions. So, pass slice_height into su_y_granularity to feed the DSC slice height into PSR-SU code. Si

Re: [PATCH v2] drm/amd/display: fix PSR-SU/DSC interoperability support

2023-01-05 Thread Harry Wentland
On 1/5/23 15:12, Leo Li wrote: > > > > On 1/5/23 15:07, Hamza Mahfooz wrote: >> On 1/5/23 13:29, Harry Wentland wrote: >>> >>> >>> On 1/5/23 12:38, Hamza Mahfooz wrote: Currently, there are issues with enabling PSR-SU + DSC. This stems from the fact that DSC imposes a slice height o

Re: [PATCH v3] drm/amd/display: fix PSR-SU/DSC interoperability support

2023-01-05 Thread Harry Wentland
On 1/5/23 15:33, Hamza Mahfooz wrote: > Currently, there are issues with enabling PSR-SU + DSC. This stems from > the fact that DSC imposes a slice height on transmitted video data and > we are not conforming to that slice height in PSR-SU regions. So, pass > slice_height into su_y_granularity to f

[PATCH v4] drm/amd/display: fix PSR-SU/DSC interoperability support

2023-01-05 Thread Hamza Mahfooz
Currently, there are issues with enabling PSR-SU + DSC. This stems from the fact that DSC imposes a slice height on transmitted video data and we are not conforming to that slice height in PSR-SU regions. So, pass slice_height into su_y_granularity to feed the DSC slice height into PSR-SU code. Si

RE: [PATCH 2/8] drm/amd/pm: refine the checks for sysfs interfaces support

2023-01-05 Thread Quan, Evan
[AMD Official Use Only - General] > -Original Message- > From: Lazar, Lijo > Sent: Thursday, January 5, 2023 9:58 PM > To: Quan, Evan ; amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: Re: [PATCH 2/8] drm/amd/pm: refine the checks for sysfs interfaces > support > > >

RE: [PATCH 7/8] drm/amd/pm: drop the support for manual fan speed setting on SMU13.0.0

2023-01-05 Thread Quan, Evan
[AMD Official Use Only - General] > -Original Message- > From: Lazar, Lijo > Sent: Thursday, January 5, 2023 10:08 PM > To: Quan, Evan ; amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: Re: [PATCH 7/8] drm/amd/pm: drop the support for manual fan > speed setting on SMU1

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

2023-01-05 Thread Lazar, Lijo
On 1/5/2023 10:31 PM, Mario Limonciello wrote: 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 --- v6->v7: * Drop tags * Only set adev->psp.securedisplay_context.c

Re: [PATCH 2/8] drm/amd/pm: refine the checks for sysfs interfaces support

2023-01-05 Thread Lazar, Lijo
On 1/6/2023 7:34 AM, Quan, Evan wrote: [AMD Official Use Only - General] -Original Message- From: Lazar, Lijo Sent: Thursday, January 5, 2023 9:58 PM To: Quan, Evan ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: Re: [PATCH 2/8] drm/amd/pm: refine the checks for s