RE: [PATCH] amd/amdkfd: Trigger segfault for early userptr unmmapping

2025-04-23 Thread Xiao, Shane
[Public] > -Original Message- > From: Koenig, Christian > Sent: Wednesday, April 23, 2025 8:40 PM > To: Xiao, Shane ; amd-gfx@lists.freedesktop.org; > Kuehling, Felix ; Yang, Philip > > Subject: Re: [PATCH] amd/amdkfd: Trigger segfault for early userptr > unmmapping > > > > On 4/23/25 11

[PATCH 1/2] drm/amdgpu: Add debug bit for userptr usage

2025-04-23 Thread Shane Xiao
In VM debug mode, it is desirable to notify the application to correct the freeing sequence by unmapping the memory before destroying the userptr in the old userptr path. Add a bitmask to decide whether to send gpu vm fault to the applition. Signed-off-by: Shane Xiao --- drivers/gpu/drm/amd/amdg

[PATCH 2/2] amd/amdkfd: Trigger segfault for early userptr unmmapping

2025-04-23 Thread Shane Xiao
If applications unmap the memory before destroying the userptr, it needs trigger a segfault to notify user space to correct the free sequence in VM debug mode. v2: Send GPU access fault to user space Signed-off-by: Shane Xiao --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 14 +

Re: [PATCH 6/6] drm/amdgpu: fix fence fallback timer expired error

2025-04-23 Thread Zhang, GuoQing (Sam)
[AMD Official Use Only - AMD Internal Distribution Only] Ping… @Koenig, Christian Thanks Sam From: amd-gfx on behalf of Zhang, GuoQing (Sam) Date: Wednesday, April 23, 2025 at 14:59 To: Christian König , amd-gfx@lists.freedesktop.org Cc: Zhao, Victor , Chang

Re: [PATCH 4/6] drm/amdgpu: enable pdb0 for hibernation on SRIOV

2025-04-23 Thread Zhang, GuoQing (Sam)
[AMD Official Use Only - AMD Internal Distribution Only] Ping… @Koenig, Christian Thanks Sam From: amd-gfx on behalf of Zhang, GuoQing (Sam) Date: Wednesday, April 23, 2025 at 15:25 To: Christian König , amd-gfx@lists.freedesktop.org Cc: Zhao, Victor , Chang

[PATCH] drm/amdgpu: Refactor amdgpu_gem_va_ioctl for Handling Last Fence Update and Timeline Management

2025-04-23 Thread Srinivasan Shanmugam
This commit simplifies the amdgpu_gem_va_ioctl function, key updates include: - Moved the logic for managing the last update fence directly into amdgpu_gem_va_update_vm. - Introduced checks for the timeline point to enable conditional replacement or addition of fences. Cc: Alex Deucher Cc

[pull] amdgpu drm-fixes-6.15

2025-04-23 Thread Alex Deucher
Hi Dave, Simona, Fixes for 6.15. The following changes since commit 0467145fab3b3a7a1efd221722310fe32329b3da: Merge tag 'drm-msm-fixes-2025-04-18' of https://gitlab.freedesktop.org/drm/msm into drm-fixes (2025-04-19 15:09:29 +1000) are available in the Git repository at: https://gitlab.f

Re: [PATCH 2/2] drm/amdgpu: properly release the eviction fences

2025-04-23 Thread Christian König
On 4/23/25 17:05, Liang, Prike wrote: > [Public] > >> From: Koenig, Christian >> Sent: Wednesday, April 23, 2025 9:58 PM >> To: Liang, Prike ; amd-gfx@lists.freedesktop.org >> Cc: Deucher, Alexander >> Subject: Re: [PATCH 2/2] drm/amdgpu: properly release the eviction fences >> >> On 4/23/25 15:

RE: [PATCH 2/2] drm/amdgpu: properly release the eviction fences

2025-04-23 Thread Liang, Prike
[Public] > From: Koenig, Christian > Sent: Wednesday, April 23, 2025 9:58 PM > To: Liang, Prike ; amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: Re: [PATCH 2/2] drm/amdgpu: properly release the eviction fences > > On 4/23/25 15:26, Prike Liang wrote: > > The following cases re

Re: [PATCH v2] drm/amdgpu: only keep most recent fence for each context

2025-04-23 Thread Yadav, Arvind
On 4/23/2025 5:43 PM, Christian König wrote: On 4/23/25 12:52, Khatri, Sunil wrote: [AMD Official Use Only - AMD Internal Distribution Only] You need to split this in a dma_buf patch and amd userq patch separately. Yeah agree, and the dma_buf patch should re-use and re-structure the exis

Re: [PATCH v2] drm/amdgpu: check a user-provided number of BOs in list

2025-04-23 Thread Christian König
On 4/22/25 18:26, Deucher, Alexander wrote: > [Public] > >> -Original Message- >> From: Alex Deucher >> Sent: Tuesday, April 22, 2025 9:46 AM >> To: Koenig, Christian >> Cc: Denis Arefev ; Deucher, Alexander >> ; David Airlie ; Simona Vetter >> ; Andrey Grodzovsky ; >> Chunming Zhou ; am

Re: [PATCH] drm/amd/display: Fix NULL pointer dereference for program_lut_mode in dcn401_populate_mcm_luts

2025-04-23 Thread SRINIVASAN SHANMUGAM
On 4/23/2025 7:36 PM, Zhu, Yihan wrote: [AMD Official Use Only - AMD Internal Distribution Only] Hi Srini, Thanks for helping add missing NULL pointer check in the Linux side. Is there any further actions needed from me? Hi Yihan, Thanks for your quick review. No further action is neede

Re: 回复: [REGRESSION] amdgpu: async system error exception from hdp_v5_0_flush_hdp()

2025-04-23 Thread Christian König
On 4/22/25 17:59, Alexey Klimov wrote: > On Tue Apr 22, 2025 at 2:00 PM BST, Alex Deucher wrote: >> On Mon, Apr 21, 2025 at 10:21 PM Alexey Klimov >> wrote: >>> >>> On Thu Apr 17, 2025 at 2:08 PM BST, Alex Deucher wrote: On Wed, Apr 16, 2025 at 8:43 PM Fugang Duan wrote: > > 发

Re: [PATCH v2] drm/amdgpu: remove DRM_AMDGPU_NAVI3X_USERQ config for UQ

2025-04-23 Thread Christian König
On 4/23/25 15:48, Alex Deucher wrote: > On Wed, Apr 23, 2025 at 6:03 AM Khatri, Sunil wrote: >> >> LGTM, Reviewed-by: Sunil Khatri >> >> I think you should also get an acknowledgement from Alex too before >> pushing to ASDN. > > Please go ahead. > > Reviewed-by: Alex Deucher Feel free to add

RE: [PATCH] drm/amd/display: Fix NULL pointer dereference for program_lut_mode in dcn401_populate_mcm_luts

2025-04-23 Thread Zhu, Yihan
[AMD Official Use Only - AMD Internal Distribution Only] Hi Srini, Thanks for helping add missing NULL pointer check in the Linux side. Is there any further actions needed from me? This fix looks good to me, approved. Reviewed-by: Yihan Zhu Regards, Yihan Z -Original Message- From:

Re: [PATCH 2/2] drm/amdgpu: properly release the eviction fences

2025-04-23 Thread Christian König
On 4/23/25 15:26, Prike Liang wrote: > The following cases require releasing and deferring the > eviction fences properly > > 1) Detach the old eviction fences before attaching a new one. > 2) Drop the eviction fence init reference. > 3) Correct the attached eviction fence reference. > 4) Free the

Re: [PATCH v2] drm/amdgpu: remove DRM_AMDGPU_NAVI3X_USERQ config for UQ

2025-04-23 Thread Alex Deucher
On Wed, Apr 23, 2025 at 6:03 AM Khatri, Sunil wrote: > > LGTM, Reviewed-by: Sunil Khatri > > I think you should also get an acknowledgement from Alex too before > pushing to ASDN. Please go ahead. Reviewed-by: Alex Deucher > > Regards > Sunil khatri > > On 4/23/2025 3:03 PM, Arvind Yadav wrot

[PATCH] drm/amd/display: Fix NULL pointer dereference for program_lut_mode in dcn401_populate_mcm_luts

2025-04-23 Thread Srinivasan Shanmugam
This commit introduces a NULL pointer check for mpc->funcs->program_lut_mode in the dcn401_populate_mcm_luts function. The previous implementation directly called program_lut_mode without validating its existence, which could lead to a NULL pointer dereference. With this change, the function is no

[PATCH 2/2] drm/amdgpu: properly release the eviction fences

2025-04-23 Thread Prike Liang
The following cases require releasing and deferring the eviction fences properly 1) Detach the old eviction fences before attaching a new one. 2) Drop the eviction fence init reference. 3) Correct the attached eviction fence reference. 4) Free the eviction fence when the attached BOs are released.

[PATCH 1/2] drm/amdgpu: implicitly sync the dependent read fences

2025-04-23 Thread Prike Liang
The driver doesn't want to sync on the DMA_RESV_USAGE_BOOKKEEP usage fences, so here only return and sync the dependent read fences. Signed-off-by: Prike Liang --- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/am

Re: [PATCH v2] drm/amdgpu: Add NULL check for 'bo_va' in update_bo_mapping v2

2025-04-23 Thread Christian König
On 4/22/25 16:15, Dan Carpenter wrote: > On Tue, Apr 22, 2025 at 03:34:58PM +0200, Christian König wrote: >> Am 22.04.25 um 15:17 schrieb Srinivasan Shanmugam: >>> This change adds a check to ensure that 'bo_va' is not null before >>> dereferencing it. If 'bo_va' is null, the function returns early

Re: [PATCH] amd/amdkfd: Trigger segfault for early userptr unmmapping

2025-04-23 Thread Christian König
On 4/23/25 11:50, Shane Xiao wrote: > If applications unmap the memory before destroying the userptr, it needs > trigger a segfault to notify user space to correct the free sequence in > VM debug mode. > > Signed-off-by: Shane Xiao > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 10

Re: [PATCH v2] drm/amdgpu: only keep most recent fence for each context

2025-04-23 Thread Christian König
On 4/23/25 12:52, Khatri, Sunil wrote: [AMD Official Use Only - AMD Internal Distribution Only] You need to split this in a dma_buf patch and amd userq patch separately. Yeah agree, and the dma_buf patch should re-use and re-structure the existing code and not just add a new function. Reg

RE: [PATCH v2] drm/amdgpu: only keep most recent fence for each context

2025-04-23 Thread Khatri, Sunil
[AMD Official Use Only - AMD Internal Distribution Only] You need to split this in a dma_buf patch and amd userq patch separately. Regards Sunil Khatri -Original Message- From: Yadav, Arvind Sent: Wednesday, April 23, 2025 4:18 PM To: Koenig, Christian ; Deucher, Alexander ; Khatri, Su

[PATCH v2] drm/amdgpu: only keep most recent fence for each context

2025-04-23 Thread Arvind Yadav
Mesa passes shared bo, fence syncobj to userq_ioctl. There can be duplicates here or some fences that are old. This patch is remove duplicates fence and only keep the most recent fence for each context. v2: Export this code from dma-fence-unwrap.c(by Christian). Cc: Alex Deucher Cc: Christian Kö

Re: [PATCH v2] drm/amdgpu: remove DRM_AMDGPU_NAVI3X_USERQ config for UQ

2025-04-23 Thread Khatri, Sunil
LGTM, Reviewed-by: Sunil Khatri I think you should also get an acknowledgement from Alex too before pushing to ASDN. Regards Sunil khatri On 4/23/2025 3:03 PM, Arvind Yadav wrote: DRM_AMDGPU_NAVI3X_USERQ config support is not required for usermode queue. v2: rebase. Cc: Alex Deucher Cc:

[PATCH] amd/amdkfd: Trigger segfault for early userptr unmmapping

2025-04-23 Thread Shane Xiao
If applications unmap the memory before destroying the userptr, it needs trigger a segfault to notify user space to correct the free sequence in VM debug mode. Signed-off-by: Shane Xiao --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 10 ++ 1 file changed, 10 insertions(+) diff -

[PATCH v2] drm/amdgpu: remove DRM_AMDGPU_NAVI3X_USERQ config for UQ

2025-04-23 Thread Arvind Yadav
DRM_AMDGPU_NAVI3X_USERQ config support is not required for usermode queue. v2: rebase. Cc: Alex Deucher Cc: Christian Koenig Cc: Sunil Khatri Cc: Arunpravin Paneer Selvam Signed-off-by: Arvind Yadav --- drivers/gpu/drm/amd/amdgpu/Kconfig | 8 drivers/gpu/drm/amd/amdgpu

Re: [PATCH v2] drm/amdgpu: Add NULL check for 'bo_va' in update_bo_mapping v2

2025-04-23 Thread Dan Carpenter
On Tue, Apr 22, 2025 at 03:34:58PM +0200, Christian König wrote: > Am 22.04.25 um 15:17 schrieb Srinivasan Shanmugam: > > This change adds a check to ensure that 'bo_va' is not null before > > dereferencing it. If 'bo_va' is null, the function returns early, > > preventing any potential crashes or

Regression: DDC I2C Display Freezing for internal displays

2025-04-23 Thread Felix Richter
Hi, it has been quite at while since I first started experiencing this particular bug I am about to describe. Suffice it to say during my Easter holiday I finally had the time to dig into it. It all started with an update of linux LTS from 6.6 to 6.12. I am a user of the sway tiling window m

Re: possible bug with RDNA4 and AMS

2025-04-23 Thread Malte Schröder
On 22/04/2025 17:28, Michel Dänzer wrote: > On 2025-04-20 21:38, Malte Schröder wrote: >> Hi, >> >> finally found this list, I hope it's the right place for this. I >> recently swapped my trusty RX 6900 XT with a shiny new RX 9070 XT (aka >> RDNA2 to 4). Now, when I start kwin_wayland my desktop is

Re: 回复: [REGRESSION] amdgpu: async system error exception from hdp_v5_0_flush_hdp()

2025-04-23 Thread Alexey Klimov
On Tue Apr 22, 2025 at 2:00 PM BST, Alex Deucher wrote: > On Mon, Apr 21, 2025 at 10:21 PM Alexey Klimov > wrote: >> >> On Thu Apr 17, 2025 at 2:08 PM BST, Alex Deucher wrote: >> > On Wed, Apr 16, 2025 at 8:43 PM Fugang Duan >> > wrote: >> >> >> >> 发件人: Alex Deucher 发送时间: 2025年4月16日 22:49 >> >

Re: [PATCH 4/6] drm/amdgpu: enable pdb0 for hibernation on SRIOV

2025-04-23 Thread Zhang, GuoQing (Sam)
[AMD Official Use Only - AMD Internal Distribution Only] Hi Christian, Thank you for the review and the feedback. I will update the patch according to your feedback. Please see my 2 inline comments below. Regards Sam > From: Christian König > Date: Wednesday, April 16, 2025 at 21:52 > To: Zh