[PATCH] AMDGPU: init saw registers for mmhub v1.0

2024-09-12 Thread Zhu Lingshan
This commits init registers in the Stand Along Walker for mmhub v1.0, to support ISP use cases. Signed-off-by: Zhu Lingshan Reported-and-Tested-by: Du Bin --- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 48 +++ .../include/asic_reg/mmhub/mmhub_1_0_offset.h | 23 + 2

Re: [PATCH v2] drm/amdkfd: change kfd process kref count at creation

2024-10-14 Thread Zhu Lingshan
On 10/14/2024 11:07 PM, Chen, Xiaogang wrote: > > On 10/13/2024 8:55 PM, Zhu Lingshan wrote: >> On 10/13/2024 1:30 AM, Chen, Xiaogang wrote: >>> On 10/11/2024 9:56 PM, Zhu Lingshan wrote: >>>> On 10/11/2024 10:41 PM, Xiaogang.Chen wrote: >>>>> F

[PATCH] amdkfd: Explicitly specify data type amdkfd_process_info in related functions

2024-10-14 Thread Zhu Lingshan
sing a specified data type other than void* can help improve readability. There are other benifits like: type safety, avoid casting and better compling chekings. Signed-off-by: Zhu Lingshan --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h| 10 +++--- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c

Re: [PATCH v2] drm/amdkfd: change kfd process kref count at creation

2024-10-13 Thread Zhu Lingshan
On 10/13/2024 1:30 AM, Chen, Xiaogang wrote: > > On 10/11/2024 9:56 PM, Zhu Lingshan wrote: >> On 10/11/2024 10:41 PM, Xiaogang.Chen wrote: >>> From: Xiaogang Chen >>> >>> kfd process kref count(process->ref) is initialized to 1 by kref_init. After >&

Re: [PATCH] amdkfd: Explicitly specify data type amdkfd_process_info in related functions

2024-10-21 Thread Zhu Lingshan
Gentle Ping On 10/15/2024 11:51 AM, Zhu Lingshan wrote: > This commit specifies data type struct amdkfd_process_info > rather than general void* in ralted functions. > > kfd_process->kgd_process_info is initialized > in init_kfd_vm() by such code: > > static int init_kfd

Re: [PATCH v2] drm/amdkfd: change kfd process kref count at creation

2024-10-11 Thread Zhu Lingshan
On 10/11/2024 10:41 PM, Xiaogang.Chen wrote: > From: Xiaogang Chen > > kfd process kref count(process->ref) is initialized to 1 by kref_init. After > it is created not need to increaes its kref. Instad add kfd process kref at > kfd > process mmu notifier allocation since we decrease the ref at fr

Re: [PATCH] amdkfd: Explicitly specify data type amdkfd_process_info in related functions

2024-10-22 Thread Zhu Lingshan
On 10/22/2024 12:20 PM, Felix Kuehling wrote: > > On 2024-10-14 23:51, Zhu Lingshan wrote: >> This commit specifies data type struct amdkfd_process_info >> rather than general void* in ralted functions. > Several interfaces in amdgpu_amdkfd.h use void * as opaque pointers,

Re: [RESEND] amdkfd: always include uapi header in priv.h

2024-11-05 Thread Zhu Lingshan
On 11/5/2024 4:43 AM, Felix Kuehling wrote: > On 2024-10-31 22:15, Zhu Lingshan wrote: >> On 10/31/2024 11:27 PM, Felix Kuehling wrote: >>> On 2024-10-31 6:47, Zhu Lingshan wrote: >>>> The header usr/linux/kfd_ioctl.h is a duplicate of uapi/linux/kfd_ioctl.h. >>

Re: [RESEND] amdkfd: check ret code for ioctls

2024-11-11 Thread Zhu Lingshan
On 11/5/2024 4:50 AM, Felix Kuehling wrote: > > On 2024-10-31 22:35, Zhu Lingshan wrote: >> On 10/31/2024 11:30 PM, Felix Kuehling wrote: >>> On 2024-10-31 6:50, Zhu Lingshan wrote: >>>> The ioctl functions may fail, causing the args unreliable. >>>>

Re: [RESEND] amdkfd: check ret code for ioctls

2024-11-11 Thread Zhu Lingshan
On 11/12/2024 6:21 AM, Felix Kuehling wrote: > > On 2024-11-11 03:08, Zhu Lingshan wrote: >> On 11/5/2024 4:50 AM, Felix Kuehling wrote: >>> On 2024-10-31 22:35, Zhu Lingshan wrote: >>>> On 10/31/2024 11:30 PM, Felix Kuehling wrote: >>>>> On 2024-

Re: [RESEND] amdkfd: check ret code for ioctls

2024-11-12 Thread Zhu Lingshan
On 11/13/2024 7:46 AM, Felix Kuehling wrote: > > On 2024-11-12 2:35, Zhu Lingshan wrote: >> On 11/12/2024 6:21 AM, Felix Kuehling wrote: >>> On 2024-11-11 03:08, Zhu Lingshan wrote: >>>> On 11/5/2024 4:50 AM, Felix Kuehling wrote: >>>>> On 2024-10-31

[RESEND] amdkfd: always include uapi header in priv.h

2024-10-31 Thread Zhu Lingshan
the kernel. This commit modifies kfd_priv.h to always include the header from uapi to ensure the latest changes are reflected. We should always include the source code header other than the duplication. Signed-off-by: Zhu Lingshan --- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +- 1 file changed

[RESEND] amdkfd: check ret code for ioctls

2024-10-31 Thread Zhu Lingshan
fail. Signed-off-by: Zhu Lingshan --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c index 3e6b4736a7fe..a184ca0023b5 100644 --- a/drivers/gpu/drm/amd/amdkfd

Re: [RESEND] amdkfd: always include uapi header in priv.h

2024-10-31 Thread Zhu Lingshan
On 10/31/2024 11:27 PM, Felix Kuehling wrote: > On 2024-10-31 6:47, Zhu Lingshan wrote: >> The header usr/linux/kfd_ioctl.h is a duplicate of uapi/linux/kfd_ioctl.h. > I don't see usr/linux/kfd_ioctl.h. Which branch are you looking at? The mainline master branch: https://github.c

Re: [RESEND] amdkfd: check ret code for ioctls

2024-10-31 Thread Zhu Lingshan
On 10/31/2024 11:30 PM, Felix Kuehling wrote: > > On 2024-10-31 6:50, Zhu Lingshan wrote: >> The ioctl functions may fail, causing the args unreliable. >> Therefore, the args should not be copied to user space. >> >> The return code provides enough information for &

Re: [PATCH] amdkfd: Explicitly specify data type amdkfd_process_info in related functions

2024-10-31 Thread Zhu Lingshan
On 10/22/2024 4:01 PM, Zhu Lingshan wrote: > > On 10/22/2024 12:20 PM, Felix Kuehling wrote: >> On 2024-10-14 23:51, Zhu Lingshan wrote: >>> This commit specifies data type struct amdkfd_process_info >>> rather than general void* in ralted functions. >> Sever

[PATCH 1/2] drm/amdgpu/discovery: add ISP discovery entries for old APUs

2024-09-24 Thread Zhu Lingshan
From: Alex Deucher Raven1/2 and Picasso have ISP 2.0.0, however their ISP blocks are not in the IP discovery table yet. This commit fixes this issue by adding new ISP entries for Raven and Picasso in the IP discovery table. Signed-off-by: Alex Deucher Signed-off-by: Zhu Lingshan --- drivers

[PATCH 2/2] drm/amdgpu: init saw registers for mmhub v1.0

2024-09-24 Thread Zhu Lingshan
This commits init registers in the Stand Along Walker for mmhub v1.0, to support ISP use cases. Signed-off-by: Zhu Lingshan Reported-and-Tested-by: Du Bin --- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 49 +++ .../include/asic_reg/mmhub/mmhub_1_0_offset.h | 23 + 2

[PATCH 0/2] Init SAW for mmhub 1.0

2024-09-24 Thread Zhu Lingshan
This series intends to initialize the Stand Along Walker for mmhub 1.0, to support the Image Signal Processor Plese help review. Thanks Zhu Lingshan Alex Deucher (1): drm/amdgpu/discovery: add ISP discovery entries for old APUs Zhu Lingshan (1): drm/amdgpu: init saw registers for mmhub

Re: [PATCH] amdkfd: Explicitly specify data type amdkfd_process_info in related functions

2024-11-07 Thread Zhu Lingshan
On 11/5/2024 5:49 AM, Felix Kuehling wrote: > On 2024-10-31 23:20, Zhu Lingshan wrote: >> On 10/22/2024 4:01 PM, Zhu Lingshan wrote: >>> On 10/22/2024 12:20 PM, Felix Kuehling wrote: >>>> On 2024-10-14 23:51, Zhu Lingshan wrote: >>>>> This commit s

Re: [PATCH] drm/amdkfd: test release process eviction fence before signal

2025-01-01 Thread Zhu Lingshan
Hello Prike This issue has already been fixed, please see: https://www.spinics.net/lists/amd-gfx/msg117071.html Thanks Lingshan On 1/2/2025 2:30 PM, Prike Liang wrote: > It requires to validate the release process eviction fence before > signal the fence. > > Signed-off-by: Prike Liang > --- >

[PATCH] amdkfd: properly free gang_ctx_bo when failed to init user queue

2025-02-05 Thread Zhu Lingshan
, passing this void* parameter into the function's execution process(which expects void** and dereferencing void**) will result in errors. Signed-off-by: Zhu Lingshan Fixes: fb91065851cd ("drm/amdkfd: Refactor queue wptr_bo GART mapping") --- drivers/gpu/drm/amd/amdkfd/kfd_process_

[PATCH] amdkfd: wq_release signals dma_fence only when available

2024-12-11 Thread Zhu Lingshan
x10 [ 503.954210] ret_from_fork_asm+0x1a/0x30 [ 503.958142] [ 503.960328] ---[ end trace ]--- Signed-off-by: Zhu Lingshan --- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_proces

Re: [PATCH] amdkfd: wq_release signals dma_fence only when available

2024-12-11 Thread Zhu Lingshan
On 12/12/2024 12:19 PM, Felix Kuehling wrote: > > On 2024-12-11 22:06, Zhu Lingshan wrote: >> kfd_process_wq_release() signals eviction fence by >> dma_fence_signal() which wanrs if dma_fence >> is NULL. > That's news to me. Looking at the dma_fence_signal implement

[PATCH] amdkfd: enlarge the hashtable of kfd_process

2024-12-12 Thread Zhu Lingshan
This commit enlarges the hashtable size of kfd_process to 256 Signed-off-by: Zhu Lingshan --- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h index

[PATCH V2] amdkfd: wq_release signals dma_fence only when available

2024-12-12 Thread Zhu Lingshan
x10 [ 503.954210] ret_from_fork_asm+0x1a/0x30 [ 503.958142] [ 503.960328] ---[ end trace ]--- Signed-off-by: Zhu Lingshan Fixes: 967d226eaae8 ("dma-buf: add WARN_ON() illegal dma-fence signaling") --- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 3 ++- 1 fi

Re: [RESEND] amdkfd: always include uapi header in priv.h

2024-12-13 Thread Zhu Lingshan
On 11/5/2024 6:35 PM, Lazar, Lijo wrote: > > On 11/5/2024 2:13 AM, Felix Kuehling wrote: >> On 2024-10-31 22:15, Zhu Lingshan wrote: >>> On 10/31/2024 11:27 PM, Felix Kuehling wrote: >>>> On 2024-10-31 6:47, Zhu Lingshan wrote: >>>>> The header us

RE: [PATCH] drm/amdkfd: test release process eviction fence before signal

2025-01-02 Thread Zhu, Lingshan
draft this patch to resolve the HIP stream test that complained about the KFD process signals an invalidate fence on the latest drm-next branch. BTW, it looks like your patch still hasn't landed in the drm-next branch. Regards, Prike > -Original Message- > From: Zhu, Lings

[PATCH] amdkfd: initialize svm lists at where they are defined

2025-02-21 Thread Zhu Lingshan
not assume the callee would always initialize them Signed-off-by: Zhu Lingshan --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c index bd3e20d981e0

RE: [PATCH] amdkfd: initialize svm lists at where they are defined

2025-02-27 Thread Zhu, Lingshan
[Public] Ping -Original Message- From: Zhu, Lingshan Sent: Friday, February 21, 2025 5:24 PM To: Kuehling, Felix ; Deucher, Alexander Cc: Huang, Ray ; amd-gfx@lists.freedesktop.org; Zhu, Lingshan Subject: [PATCH] amdkfd: initialize svm lists at where they are defined This commit

Re: [PATCH] amdkfd: initialize svm lists at where they are defined

2025-03-03 Thread Zhu Lingshan
On 3/4/2025 1:49 PM, Felix Kuehling wrote: > On 2025-02-21 4:23, Zhu Lingshan wrote: >> This commit initialized svm lists at where they are >> defined. This is defensive programing for security >> and consistency. >> >> Initalizing variables ensures that their sta

Re: [PATCH] amdkfd: initialize svm lists at where they are defined

2025-03-04 Thread Zhu Lingshan
On 3/4/2025 11:16 PM, Felix Kuehling wrote: > On 2025-03-04 2:40, Zhu Lingshan wrote: >> On 3/4/2025 1:49 PM, Felix Kuehling wrote: >>> On 2025-02-21 4:23, Zhu Lingshan wrote: >>>> This commit initialized svm lists at where they are >>>> defined. This is