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
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
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
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
>&
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
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
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,
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.
>>
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.
>>>>
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-
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
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
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
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
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
&
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
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
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
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
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
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
> ---
>
, 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_
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
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
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
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
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
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
[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
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
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
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
bumps ioctl minor version.
Signed-off-by: Zhu Lingshan
---
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 41
drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 1 +
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 3 +-
include/uapi/linux/kfd_ioctl.h | 8 +++--
4 files
KFD creates sysfs entries for a kfd_process in
function kfd_create_process when creating it.
This commit extracts the code creating sysfs
entries to a separate function because it
would be invoked in other code path like
creating secondary kfd contexts (kfd_process).
Signed-off-by: Zhu Lingshan
svm ioctl should only be processed on the primary
kfd process because only the lifecycle of the
primary kfd process is tied to the user space
applicaiton.
Another reason is in virtualization the hypervisor owns
the primary kfd process as a privileged one.
Signed-off-by: Zhu Lingshan
of the sysfs entry of a secondary
kfd process is "context_%u" where %u is the process id.
Signed-off-by: Zhu Lingshan
---
drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 6 ++
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 82 +++-
2 files changed, 85 insertions(+), 3
The lifecycle of the primary kfd process is tied to
the user space program, all secondary kfd process
would be destroyed when fd close. Thus only the primary
kfd process should process USERPTR memory allocation.
Signed-off-by: Zhu Lingshan
---
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 6
e 2
Zhu Lingshan (9):
amdkfd: enlarge the hashtable of kfd_process
amdkfd: mark the first kfd_process as the primary one
amdkfd: find_process_by_mm always return the primary context
amdkfd: Introduce kfd_create_process_sysfs as a separate function
amdkfd: destroy kfd second
The first kfd_process is created through open(),
this commit marks it as the primary kfd_process.
Only the primary process should register the mmu_notifier.
Signed-off-by: Zhu Lingshan
---
drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 3 +++
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 20
This commit enlarges the hashtable size of
kfd_process to 256, because of the multiple
contexts feature allowing each application
create multiple kfd_processes
Signed-off-by: Zhu Lingshan
---
drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
Up until this commit, the kfd multiple contexts feature has
not been fully implemented in mainline kernel yet.
For backawrd compatibility, not break existing use cases,
this commit changes function find_process_by_mm, let it
always return the primary kfd_process.
Signed-off-by: Zhu Lingshan
kfd_process_notifier_release_internal unconditionally.
Signed-off-by: Zhu Lingshan
---
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 9 --
drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 1 +
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 41 +---
3 files changed, 31 insertions(+), 20
Thanks, Felix. All issues have been fixed, and I will send out V2 soon.
Thanks
Lingshan
On 7/29/2025 3:48 AM, Felix Kuehling wrote:
> On 2025-07-24 22:43, Zhu Lingshan wrote:
>> This commit introduces a new id field for
>> struct kfd process, which helps identify
>> a kfd p
On 7/29/2025 3:59 AM, Felix Kuehling wrote:
> On 2025-07-24 22:43, Zhu Lingshan wrote:
>> This commit implemetns a new ioctl AMDKFD_IOC_CREATE_PROCESS
>> that creates a new secondary kfd_progress on the FD.
>
> To add a new ioctl upstream, do you have a link to the corr
svm ioctl should only be processed on the primary
kfd process because only the lifecycle of the
primary kfd process is tied to the user space
applicaiton.
Another reason is in virtualization the hypervisor owns
the primary kfd process as a privileged one.
Signed-off-by: Zhu Lingshan
Reviewed
bumps ioctl minor version.
Signed-off-by: Zhu Lingshan
---
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 41
drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 1 +
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 3 +-
include/uapi/linux/kfd_ioctl.h | 8 +++--
4 files
of the sysfs entry of a secondary
kfd process is "context_%u" where %u is the process id.
Signed-off-by: Zhu Lingshan
---
drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 6 ++
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 83 +++-
2 files changed, 86 insertions(+), 3
lls it.
Signed-off-by: Zhu Lingshan
---
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 11 ++--
.../drm/amd/amdkfd/kfd_device_queue_manager.c | 6 +-
drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 60 ++-
.../drm/amd/amdkfd/kfd_packet_manager_v9.c| 4 --
.../drm/amd/
ret = %d\n", ret);
getchar();
// close FDs
close(fd2);
getchar();
close(fd1);
getchar();
return EXIT_SUCCESS;
}
Zhu Lingshan (10):
amdkfd: enlarge the hashtable of kfd_process
amdkfd: mark the first kfd_process as the prim
This commit enlarges the hashtable size of
kfd_process to 256, because of the multiple
contexts feature allowing each application
create multiple kfd_processes
Signed-off-by: Zhu Lingshan
Reviewed-by: Felix Kuehling
---
drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +-
1 file changed, 1 insertion
The first kfd_process is created through open(),
this commit marks it as the primary kfd_process.
Only the primary process should register the mmu_notifier.
Signed-off-by: Zhu Lingshan
Reviewed-by: Felix Kuehling
---
drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 3 +++
drivers/gpu/drm/amd
Up until this commit, the kfd multiple contexts feature has
not been fully implemented in mainline kernel yet.
For backawrd compatibility, not break existing use cases,
this commit changes function find_process_by_mm, let it
always return the primary kfd_process.
Signed-off-by: Zhu Lingshan
kfd_process_notifier_release_internal unconditionally.
Signed-off-by: Zhu Lingshan
Reviewed-by: Felix Kuehling
---
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 9 --
drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 1 +
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 41 +---
3 files changed
KFD creates sysfs entries for a kfd_process in
function kfd_create_process when creating it.
This commit extracts the code creating sysfs
entries to a separate function because it
would be invoked in other code path like
creating secondary kfd contexts (kfd_process).
Signed-off-by: Zhu Lingshan
The lifecycle of the primary kfd process is tied to
the user space program, all secondary kfd process
would be destroyed when fd close. Thus only the primary
kfd process should process USERPTR memory allocation.
Signed-off-by: Zhu Lingshan
Reviewed-by: Felix Kuehling
---
drivers/gpu/drm/amd
On 8/2/2025 12:05 AM, Felix Kuehling wrote:
> On 2025-08-01 4:55, Zhu Lingshan wrote:
>> This commit introduces a new id field for
>> struct kfd process, which helps identify
>> a kfd process among multiple contexts that
>> all belong to a single user space program.
On 8/2/2025 12:10 AM, Felix Kuehling wrote:
> On 2025-08-01 4:55, Zhu Lingshan wrote:
>> This commit decommissions the function kfd_get_process()
>> because it can not locate a specific kfd process among
>> mulitple contexts.
>>
>> This commit refactors t
This commit finds the proper kfd_process by
filep->private_data in kfd_mmap,
because the function kfd_get_process()
can not locate a specific kfd process among
multiple contexts.
Signed-off-by: Zhu Lingshan
---
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 11 +++
1 file changed
ned-off-by: Zhu Lingshan
---
drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 3 ++-
drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 -
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 18 --
3 files changed, 2 insertions(+), 20 deletions(-)
diff --git a/drivers/gpu/drm/amd/amd
This commit remove DIQ support because it has been
marked as DEPRECATED since 2022 in commit 5bdd3eb2
Signed-off-by: Zhu Lingshan
---
.../drm/amd/amdkfd/kfd_device_queue_manager.c | 6 +--
drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 26 ++---
.../drm/amd/amdkfd
This commit removes test_kq() function becuse it has been
marked as unused since 2014 and no other functions calls it.
Signed-off-by: Zhu Lingshan
---
drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 31 ---
1 file changed, 31 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd
bumps ioctl minor version.
Signed-off-by: Zhu Lingshan
---
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 41
drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 1 +
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 3 +-
include/uapi/linux/kfd_ioctl.h | 8 +++--
4 files
svm ioctl should only be processed on the primary
kfd process because only the lifecycle of the
primary kfd process is tied to the user space
applicaiton.
Another reason is in virtualization the hypervisor owns
the primary kfd process as a privileged one.
Signed-off-by: Zhu Lingshan
Reviewed
kfd_process_notifier_release_internal unconditionally.
Signed-off-by: Zhu Lingshan
Reviewed-by: Felix Kuehling
---
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 9 --
drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 1 +
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 41 +---
3 files changed
of the sysfs entry of a secondary
kfd process is "context_%u" where %u is the process id.
Signed-off-by: Zhu Lingshan
---
drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 6 ++
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 83 +++-
2 files changed, 86 insertions(+), 3
The lifecycle of the primary kfd process is tied to
the user space program, all secondary kfd process
would be destroyed when fd close. Thus only the primary
kfd process should process USERPTR memory allocation.
Signed-off-by: Zhu Lingshan
Reviewed-by: Felix Kuehling
---
drivers/gpu/drm/amd
ret = %d\n", ret);
getchar();
// close FDs
close(fd2);
getchar();
close(fd1);
getchar();
return EXIT_SUCCESS;
}
Zhu Lingshan (13):
amdkfd: enlarge the hashtable of kfd_process
amdkfd: mark the first kfd_process as the prim
This commit enlarges the hashtable size of
kfd_process to 256, because of the multiple
contexts feature allowing each application
create multiple kfd_processes
Signed-off-by: Zhu Lingshan
Reviewed-by: Felix Kuehling
---
drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +-
1 file changed, 1 insertion
KFD creates sysfs entries for a kfd_process in
function kfd_create_process when creating it.
This commit extracts the code creating sysfs
entries to a separate function because it
would be invoked in other code path like
creating secondary kfd contexts (kfd_process).
Signed-off-by: Zhu Lingshan
The first kfd_process is created through open(),
this commit marks it as the primary kfd_process.
Only the primary process should register the mmu_notifier.
Signed-off-by: Zhu Lingshan
Reviewed-by: Felix Kuehling
---
drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 3 +++
drivers/gpu/drm/amd
Up until this commit, the kfd multiple contexts feature has
not been fully implemented in mainline kernel yet.
For backawrd compatibility, not break existing use cases,
this commit changes function find_process_by_mm, let it
always return the primary kfd_process.
Signed-off-by: Zhu Lingshan
71 matches
Mail list logo