[PATCH 3/5] drm/amd/display: Only free dm private atomic_obj if initialized

2024-11-14 Thread Mario Limonciello
If DM init fails early then the dm private atomic_obj would not have gotten setup. Check for this problem. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amd

[PATCH 4/5] drm/amd/display: convert all DRM_ERROR and DRM_WARN to drm_*

2024-11-14 Thread Mario Limonciello
drm_* helpers will display the device the message is emitted for and are thus generally more helpful in multi GPU systems. Change all `DRM_ERROR` and `DRM_WARN` calls over to drm_err() and drm_warn() respectively. Signed-off-by: Mario Limonciello --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.

[PATCH 2/5] drm/amd/display: Fix null pointer derference in amdgpu_dm_fini()

2024-11-14 Thread Mario Limonciello
Some error cleaning paths call amdgpu_dm_fini() but may not have initialized `adev->dm.delayed_hpd_wq`. Catch this and avoid destroying the workqueue. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-

[PATCH 5/5] drm/amd/display: Make DMUB auto-load failures fatal

2024-11-14 Thread Mario Limonciello
Realistically when these happen the driver is in a pretty bad state. Future calls later in the driver such as dm_read_reg_func() can hang causing soft lockups on CPUs and never letting the module load finish. If one of these problems happens abort the hw init or resume sequence. Signed-off-by: Ma

[PATCH 0/5] Better recovery from DMUB load failures

2024-11-14 Thread Mario Limonciello
When a DMUB load failure occurs the amdgpu driver is left in a pretty bad state because the display core thinks everything is fine. This explodes once the core tries to do a register read which stalls. Instead of papering over these errors return error codes up and do the proper cleanup. Mario Li

[PATCH 1/5] drm/amd: Disable interrupts after amdgpu_fence_driver_hw_fini()

2024-11-14 Thread Mario Limonciello
amdgpu_fence_driver_hw_fini() internally attempts to disable a few interrupts but this can fail if amdgpu_irq_disable_all() was called first. Push the call to amdgpu_irq_disable_all() later. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed,

RE: [PATCH] drm/amdgpu: fix warning when removing sysfs

2024-11-14 Thread Zhang, Jesse(Jie)
[AMD Official Use Only - AMD Internal Distribution Only] HI Lijo -Original Message- From: Lazar, Lijo Sent: Friday, November 8, 2024 5:24 PM To: Zhang, Jesse(Jie) ; Koenig, Christian ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Prosyak, Vitaly ; Huang, Tim Subject: Re: [PA

[PATCH] drm/amdgpu: Fix sysfs warning when hotplugging

2024-11-14 Thread jesse.zh...@amd.com
Replace the check drm_dev_enter with sysfs directory entry. Because the dev->unplugged flag will also be set to true, Only uninstall the driver by amdgpu_exit, not actually unplug the device. Signed-off-by: Jesse Zhang Reported-by: Andy Dong --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c |

Re: [PATCH] SWDEV-476969 - dm/amdgpu: Fail dm_atomic_check if cursor overlay is required at MAX_SURFACES

2024-11-14 Thread Mario Limonciello
Although it's really useful information for AMD people, the Jira shouldn't be in the "title" of the commit message. "If" we want to get into the habit of including this information for display code we should come up with a prescriptive field that goes into the commit message during promotion a

Re: [PATCH] drm/radeon: Use ttm_bo_move_null() in radeon_bo_move()

2024-11-14 Thread Alex Deucher
Applied. Thanks! Alex On Wed, Nov 13, 2024 at 8:04 AM Christian König wrote: > > Am 13.11.24 um 13:51 schrieb Huacai Chen: > > Since ttm_bo_move_null() is exactly the same as ttm_resource_free() + > > ttm_bo_assign_mem(), we use ttm_bo_move_null() for the GTT --> SYSTEM > > move case too. Then

[PATCH] Revert "drm/radeon: Delay Connector detecting when HPD singals is unstable"

2024-11-14 Thread Alex Deucher
This reverts commit 949658cb9b69ab9d22a42a662b2fdc7085689ed8. This causes a blank screen on boot. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3696 Signed-off-by: Alex Deucher Cc: Shixiong Ou --- drivers/gpu/drm/radeon/radeon_connectors.c | 10 -- 1 file changed, 10 deletion

Re: [PATCH v2 2/2] drm/amd/pm: remove redundant tools_size check

2024-11-14 Thread Alex Deucher
Applied. Thanks! On Thu, Nov 14, 2024 at 10:12 AM Bhavin Sharma wrote: > > The check for tools_size being non-zero is redundant as tools_size is > explicitly set to a non-zero value (0x19000). Removing the if condition > simplifies the code without altering functionality. > > Signed-off-by: Bhav

Re: [PATCH v2 1/2] drm/amd/display: remove redundant is_dsc_possible check

2024-11-14 Thread Alex Deucher
On Thu, Nov 14, 2024 at 10:21 AM Christian König wrote: > > Am 14.11.24 um 16:11 schrieb Bhavin Sharma: > > Since is_dsc_possible is already checked just above, there's no need to > > check it again before filling out the DSC settings. > > > > Signed-off-by: Bhavin Sharma > > --- > > drivers/gp

[PATCH] drm/amd/pm: fix and simplify workload handling

2024-11-14 Thread Alex Deucher
smu->workload_mask is IP specific and should not be messed with in the common code. The mask bits vary across SMU versions. Move all handling of smu->workload_mask in to the backends and simplify the code. Store the user's preference in smu->power_profile_mode which will be reflected in sysfs. F

Re: [PATCH 2/7] drm/qxl: switch to using drm_exec v2

2024-11-14 Thread Alex Deucher
On Thu, Nov 14, 2024 at 10:44 AM Christian König wrote: > > Just a straightforward conversion without any optimization. > > Only compile tested for now. > > v2: rebase > > Signed-off-by: Christian König Acked-by: Alex Deucher > --- > drivers/gpu/drm/qxl/Kconfig | 1 + > drivers/gpu/drm

Re: [PATCH 1/7] drm/radeon: switch over to drm_exec v2

2024-11-14 Thread Alex Deucher
On Thu, Nov 14, 2024 at 10:30 AM Christian König wrote: > > Just a straightforward conversion without any optimization. > > Smoke tested on actual hardware. > > v2: rebase > > Signed-off-by: Christian König Acked-by: Alex Deucher > --- > drivers/gpu/drm/radeon/Kconfig | 1 + > driver

Re: [PATCH 6/7] drm/xe: drop unused component dependencies

2024-11-14 Thread Lucas De Marchi
On Thu, Nov 14, 2024 at 04:30:19PM +0100, Christian König wrote: XE switched over to drm_exec quite some time ago. Signed-off-by: Christian König Acked-by: Lucas De Marchi I guess you will want to apply this through drm-misc so you can merge the last commit. Otherwise let me know and I can

RE: [PATCH v7 4/4] drm/amdgpu: track bo memory stats at runtime

2024-11-14 Thread Li, Yunxiang (Teddy)
[AMD Official Use Only - AMD Internal Distribution Only] > From: Tvrtko Ursulin > Sent: Wednesday, November 13, 2024 12:31 > On 13/11/2024 17:01, Li, Yunxiang (Teddy) wrote: > > [Public] > > > >> From: Koenig, Christian > >> Sent: Wednesday, November 13, 2024 9:22 Am 13.11.24 um 14:53 schrieb >

[PATCH 6/7] drm/xe: drop unused component dependencies

2024-11-14 Thread Christian König
XE switched over to drm_exec quite some time ago. Signed-off-by: Christian König --- drivers/gpu/drm/xe/xe_bo_types.h | 1 - drivers/gpu/drm/xe/xe_gt_pagefault.c | 1 - drivers/gpu/drm/xe/xe_vm.c | 1 - drivers/gpu/drm/xe/xe_vm.h | 1 - 4 files changed, 4 deletions(-) di

Re: [PATCH] drm/amdgpu: Fix UVD contiguous CS mapping problem

2024-11-14 Thread Paneer Selvam, Arunpravin
On 11/14/2024 9:17 PM, Christian König wrote: Am 14.11.24 um 16:38 schrieb Paneer Selvam, Arunpravin: Hi Christian, On 11/11/2024 3:33 PM, Christian König wrote: Am 11.11.24 um 09:05 schrieb Arunpravin Paneer Selvam: When starting the mpv player, Radeon R9 users are observing the below er

Re: [PATCH] drm/amdgpu: Fix UVD contiguous CS mapping problem

2024-11-14 Thread Christian König
Am 14.11.24 um 16:38 schrieb Paneer Selvam, Arunpravin: Hi Christian, On 11/11/2024 3:33 PM, Christian König wrote: Am 11.11.24 um 09:05 schrieb Arunpravin Paneer Selvam: When starting the mpv player, Radeon R9 users are observing the below error in dmesg. [drm:amdgpu_uvd_cs_pass2 [amdgpu]]

Re: [PATCH] drm/amdgpu: Fix UVD contiguous CS mapping problem

2024-11-14 Thread Paneer Selvam, Arunpravin
Hi Christian, On 11/11/2024 3:33 PM, Christian König wrote: Am 11.11.24 um 09:05 schrieb Arunpravin Paneer Selvam: When starting the mpv player, Radeon R9 users are observing the below error in dmesg. [drm:amdgpu_uvd_cs_pass2 [amdgpu]] *ERROR* msg/fb buffer ff00f7c000-ff00f7e000 out of 256MB

[PATCH 7/7] drm/ttm: remove ttm_execbug_util

2024-11-14 Thread Christian König
Replaced by drm_exec and not used any more. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/Makefile | 4 +- drivers/gpu/drm/ttm/ttm_execbuf_util.c | 161 - include/drm/ttm/ttm_execbuf_util.h | 119 -- 3 files changed, 2 insertions(+

[PATCH 4/7] drm/vmwgfx: use the new drm_exec object

2024-11-14 Thread Christian König
Basically just switching over to the new infrastructure like we did for other drivers as well. No intentional functional change, but only compile tested. Signed-off-by: Christian König --- drivers/gpu/drm/vmwgfx/vmwgfx_validation.c | 56 +- drivers/gpu/drm/vmwgfx/vmwgfx_vali

[PATCH 3/7] drm/vmwgfx: start to phase out ttm_exec

2024-11-14 Thread Christian König
Start switching over vmwgfx to drm_exec as well. Replacing some unnecessary complex calls with just just single BO dma_resv locking. No intentional functional change, but only compile tested for now. Signed-off-by: Christian König --- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 49 --

[PATCH 5/7] drm/vmwgfx: replace ttm_validate_buffer with separate struct

2024-11-14 Thread Christian König
Finish remove the ttm_eu depoendency. No functional difference. Signed-off-by: Christian König --- drivers/gpu/drm/vmwgfx/vmwgfx_context.c | 16 ++--- drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c | 12 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 1 - drivers/gpu/d

[PATCH 1/7] drm/radeon: switch over to drm_exec v2

2024-11-14 Thread Christian König
Just a straightforward conversion without any optimization. Smoke tested on actual hardware. v2: rebase Signed-off-by: Christian König --- drivers/gpu/drm/radeon/Kconfig | 1 + drivers/gpu/drm/radeon/radeon.h| 7 ++-- drivers/gpu/drm/radeon/radeon_cs.c | 45 +-

[PATCH 2/7] drm/qxl: switch to using drm_exec v2

2024-11-14 Thread Christian König
Just a straightforward conversion without any optimization. Only compile tested for now. v2: rebase Signed-off-by: Christian König --- drivers/gpu/drm/qxl/Kconfig | 1 + drivers/gpu/drm/qxl/qxl_drv.h | 7 ++-- drivers/gpu/drm/qxl/qxl_release.c | 68 ---

Switch remaining drivers over to drm_exec

2024-11-14 Thread Christian König
Hi guys, switching the remaining driver over to drm_exec, cleaning up XE and the finally remove ttm_execbug_util since it isn't used any more. When I originally posted the patch set for drm_exec vmwgfx was to complicated to trivially switch over. This is now done with this patch set. Additional

Re: [PATCH v2 1/2] drm/amd/display: remove redundant is_dsc_possible check

2024-11-14 Thread Christian König
Am 14.11.24 um 16:11 schrieb Bhavin Sharma: Since is_dsc_possible is already checked just above, there's no need to check it again before filling out the DSC settings. Signed-off-by: Bhavin Sharma --- drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 13 + 1 file changed, 5 insertion

[PATCH] SWDEV-476969 - dm/amdgpu: Fail dm_atomic_check if cursor overlay is required at MAX_SURFACES

2024-11-14 Thread Zaeem Mohamed
[why] Prevent index-out-of-bounds due to requiring cursor overlay when plane_count is MAX_SURFACES. [how] Bounds check on plane_count when requiring overlay cursor. Co-developed-by: Melissa Wen Signed-off-by: Zaeem Mohamed --- amdgpu_dm/amdgpu_dm.c | 10 +- 1 file changed, 9 insertions

[pull] amdgpu drm-fixes-6.12

2024-11-14 Thread Alex Deucher
Hi Dave, Simona, Last fixes for 6.12. The following changes since commit 2d5404caa8c7bb5c4e0435f94b28834ae5456623: Linux 6.12-rc7 (2024-11-10 14:19:35 -0800) are available in the Git repository at: https://gitlab.freedesktop.org/agd5f/linux.git tags/amd-drm-fixes-6.12-2024-11-14 for you

Re: [PATCH v7 4/4] drm/amdgpu: track bo memory stats at runtime

2024-11-14 Thread Matthew Auld
Hi, On 13/11/2024 17:30, Tvrtko Ursulin wrote: On 13/11/2024 17:01, Li, Yunxiang (Teddy) wrote: [Public] From: Koenig, Christian Sent: Wednesday, November 13, 2024 9:22 Am 13.11.24 um 14:53 schrieb Li, Yunxiang (Teddy): [Public] From: Koenig, Christian Sent: Wednesday, November 13, 2024

RE: [PATCH 2/2] drm/amdkfd: use cache GTT buffer for PQ and wb pool

2024-11-14 Thread Liu, Monk
[AMD Official Use Only - AMD Internal Distribution Only] For WPTR polling mem we didn't find it is stalled data, but for ring buffer we are pretty sure, We use "0" or "" to memset() HIQ before we fulfill the QUERY_STATUS pm4, and we can see when issue hit CP do get the either 0 or "

Re: [RFC PATCH 6/6 6.6] libfs: fix infinite directory reads for offset dir

2024-11-14 Thread Chuck Lever
On Mon, Nov 11, 2024 at 11:20:17PM +0800, yangerkun wrote: > > > 在 2024/11/11 22:39, Chuck Lever III 写道: > > > > > > > On Nov 10, 2024, at 9:36 PM, Yu Kuai wrote: > > > I'm in the cc list ,so I assume you saw my set, then I don't know why > > > you're ignoring my concerns. > > > 1) next_offset

Re: [PATCH] drm/amdgpu: Make the submission path memory reclaim safe

2024-11-14 Thread Tvrtko Ursulin
On 13/11/2024 14:26, Christian König wrote: Am 13.11.24 um 14:48 schrieb Tvrtko Ursulin: From: Tvrtko Ursulin As commit 746ae46c1113 ("drm/sched: Mark scheduler work queues with WQ_MEM_RECLAIM") points out, ever since a6149f039369 ("drm/sched: Convert drm scheduler to use a work queue rat

Re: [PATCH v7 4/4] drm/amdgpu: track bo memory stats at runtime

2024-11-14 Thread Tvrtko Ursulin
On 13/11/2024 17:01, Li, Yunxiang (Teddy) wrote: [Public] From: Koenig, Christian Sent: Wednesday, November 13, 2024 9:22 Am 13.11.24 um 14:53 schrieb Li, Yunxiang (Teddy): [Public] From: Koenig, Christian Sent: Wednesday, November 13, 2024 6:39 Am 13.11.24 um 11:25 schrieb Tvrtko Ursuli

Re: [PATCH 1/2] drm/amd/display: Fix null check for pipe_ctx->plane_state in dcn20_program_pipe

2024-11-14 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 11/5/2024 10:01 PM, Zicheng Qu wrote: This commit addresses a null pointer dereference issue in dcn20_program_pipe(). Previously, commit 8e4ed3cf1642 ("drm/amd/display: Add null check for pipe_ctx->plane_state in dcn20_program_pipe") partially fixed the null pointer de

Re: [PATCH 2/2] drm/amd/display: Fix null check for pipe_ctx->plane_state in hwss_setup_dpp

2024-11-14 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 11/5/2024 10:01 PM, Zicheng Qu wrote: This commit addresses a null pointer dereference issue in hwss_setup_dpp(). The issue could occur when pipe_ctx->plane_state is null. The fix adds a check to ensure `pipe_ctx->plane_state` is not null before accessing. This prevent