Re: [PATCH] drm/amdkfd: add schedule to remove RCU stall on CPU

2023-08-11 Thread Felix Kuehling
some calls to cond_resched(). But then I would expect cond_resched() to fix the problem, according to this document. Regards,   Felix On 2023-08-11 17:27, Chen, Xiaogang wrote: On 8/11/2023 4:22 PM, Felix Kuehling wrote: On 2023-08-11 17:12, Chen, Xiaogang wrote: I know the original

Re: [PATCH v3] drm/amdgpu: skip xcp drm device allocation when out of drm resource

2023-08-11 Thread Felix Kuehling
Zhu Acked-by: Christian König Reviewed-by: Felix Kuehling -v2: added warning message -v3: use dev_warn --- drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c | 13 - drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 10 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff

Re: [PATCH] drm/amdkfd: add schedule to remove RCU stall on CPU

2023-08-11 Thread Felix Kuehling
On 2023-08-11 17:12, Chen, Xiaogang wrote: I know the original jira ticket. The system got RCU cpu stall, then kernel enter panic, then no response or ssh. This patch let prange list update task yield cpu after each range update. It can prevent task holding mm lock too long. Calling

Re: [PATCH] drm/amdkfd: add schedule to remove RCU stall on CPU

2023-08-11 Thread Felix Kuehling
with preemption disabled. -   A CPU looping with bottom halves disabled. Or is there another thread that has an mmap_write_lock inside an RCU read critical section that's getting stalled by the mmap_read_lock? Regards,   Felix On 2023-08-11 16:50, James Zhu wrote: On 2023-08-11 16:06, Felix

Re: [PATCH v2] drm/amdgpu: skip xcp drm device allocation when out of drm resource

2023-08-11 Thread Felix Kuehling
On 2023-08-11 16:23, James Zhu wrote: Return 0 when drm device alloc failed with -ENOSPC in order to allow amdgpu drive loading. But the xcp without drm device node assigned won't be visiable in user space. This helps amdgpu driver loading on system which has more than 64 nodes, the current

Re: [PATCH] drm/amdkfd: add schedule to remove RCU stall on CPU

2023-08-11 Thread Felix Kuehling
On 2023-08-11 15:11, James Zhu wrote: update_list could be big in list_for_each_entry(prange, _list, update_list), mmap_read_lock(mm) is kept hold all the time, adding schedule() can remove RCU stall on CPU for this case. RIP: 0010:svm_range_cpu_invalidate_pagetables+0x317/0x610 [amdgpu]

Re: [PATCH] drm/amdgpu: don't allow userspace to create a doorbell BO

2023-08-11 Thread Felix Kuehling
Am 2023-08-09 um 15:09 schrieb Alex Deucher: We need the domains in amdgpu_drm.h for the kernel driver to manage the pool, but we don't want userspace using it until the code is ready. So reject for now. Signed-off-by: Alex Deucher Acked-by: Felix Kuehling --- drivers/gpu/drm/amd

Re: [PATCH] drm/amdkfd: fix address watch clearing bug for gfx v9.4.2

2023-08-11 Thread Felix Kuehling
than one watchpoint event, so test B check out and report error on second or third watchpoint not set by itself. Regards, Eric On 2023-08-10 17:56, Felix Kuehling wrote: I think Jon is suggesting that the UNMAP_QUEUES command should clear the address watch registers. Requesting such a change from

Re: [PATCH] drm/amdkfd: avoid svm dump when dynamic debug disabled

2023-08-11 Thread Felix Kuehling
Am 2023-08-11 um 06:11 schrieb Mike Lothian: On Thu, 3 Aug 2023 at 20:43, Felix Kuehling wrote: Is your kernel configured without dynamic debugging? Maybe we need to wrap this in some #if defined(CONFIG_DYNAMIC_DEBUG_CORE). Apologies, I thought I'd replied to this, yes I didn't have dynamic

Re: [PATCH] drm/amdkfd: fix address watch clearing bug for gfx v9.4.2

2023-08-10 Thread Felix Kuehling
different because it needs to support multiple XCCs. That said, this patch is Reviewed-by: Felix Kuehling On 2023-08-10 16:47, Eric Huang wrote: KFD currently relies on MEC FW to clear tcp watch control register by sending MAP_PROCESS packet with 0 of field tcp_watch_cntl to HWS

Re: [PATCH] drm/amdkfd: fix address watch clearing bug for gfx v9.4.2

2023-08-10 Thread Felix Kuehling
I think amdgpu_amdkfd_gc_9_4_3.c needs a similar fix. But maybe a bit different because it needs to support multiple XCCs. That said, this patch is Reviewed-by: Felix Kuehling On 2023-08-10 16:47, Eric Huang wrote: KFD currently relies on MEC FW to clear tcp watch control register

Re: [PATCH] drm/amdkfd: fix double assign skip process context clear

2023-08-10 Thread Felix Kuehling
On 2023-08-10 15:03, Jonathan Kim wrote: Remove redundant assignment when skipping process ctx clear. Signed-off-by: Jonathan Kim Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm

Re: [PATCH] drm/amdkfd: Add missing tba_hi programming on aldebaran

2023-08-09 Thread Felix Kuehling
On 2023-08-09 17:26, Jay Cornwall wrote: Previously asymptomatic because high 32 bits were zero. Fixes: 615222cfed20 ("drm/amdkfd: Relocate TBA/TMA to opposite side of VM hole") Signed-off-by: Jay Cornwall Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_packet_

Re: [PATCH v2] drm/amdkfd: Use memdup_user() rather than duplicating its implementation

2023-08-09 Thread Felix Kuehling
The patch is Reviewed-by: Felix Kuehling I'm applying it to amd-staging-drm-next. Regards,   Felix --- v1 -> v2 caller checks for errors, hence removed --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --

Re: drm/amdkfd: Use memdup_user() rather than duplicating its

2023-08-08 Thread Felix Kuehling
On 2023-08-08 16:57, Atul Raut wrote: To prevent its redundant implementation and streamline code, use memdup_user. This fixes warnings reported by Coccinelle: ./drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c:2811:13-20: WARNING opportunity for memdup_user Signed-off-by: Atul Raut ---

Re: [PATCH V2 1/5] drm/amdkfd: ignore crat by default

2023-08-08 Thread Felix Kuehling
On 2023-08-07 18:05, Alex Deucher wrote: We are dropping the IOMMUv2 path, so no need to enable this. It's often buggy on consumer platforms anyway. Signed-off-by: Alex Deucher The series is Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 4 1 file

Re: [PATCH] drm/amdkfd: wrap dynamic debug call with CONFIG_DYNAMIC_DEBUG_CORE

2023-08-04 Thread Felix Kuehling
I just applied Arnd Bergmann's patch "drm/amdkfd: fix build failure without CONFIG_DYNAMIC_DEBUG". This patch is no longer needed. Regards,   Felix On 2023-08-04 12:05, Alex Sierra wrote: This causes error compilation if CONFIG_DYNAMIC_DEBUG_CORE is not defined. Signed-off-by: Alex Sierra

Re: [PATCH] drm/amdkfd: fix build failure without CONFIG_DYNAMIC_DEBUG

2023-08-04 Thread Felix Kuehling
debug disabled") Signed-off-by: Arnd Bergmann The patch is Reviewed-by: Felix Kuehling I'm applying it to amd-staging-drm-next. Thanks,   Felix --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/driver

Re: [PATCH] drm/amdkfd: avoid svm dump when dynamic debug disabled

2023-08-03 Thread Felix Kuehling
/../amdkfd/kfd_svm.c:50:2: note: expanded from macro 'dynamic_svm_range_dump' _dynamic_func_call_no_desc("svm_range_dump", svm_range_debug_dump, svms) ^ 1 error generated. Cheers Mike On Wed, 19 Jul 2023 at 22:27, Felix Kuehling wrote: Am 2023-07-19 um 17:22 schrieb A

Re: [PATCH 1/3] drm/amdkfd: Sync trap handler binaries with source

2023-08-02 Thread Felix Kuehling
On 2023-07-31 16:40, Jay Cornwall wrote: Some changes have been lost during rebases. Rebuild sources. Signed-off-by: Jay Cornwall The series is Reviewed-by: Felix Kuehling --- .../gpu/drm/amd/amdkfd/cwsr_trap_handler.h| 741 +- 1 file changed, 371 insertions

Re: [PATCH] drm/amdkfd: avoid unmap dma address when svm_ranges are split

2023-07-28 Thread Felix Kuehling
mapping intact. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 7 +-- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 61 +--- drivers/gpu/drm/amd/amdkfd/kfd_svm.h | 2 +- 3 files changed, 50 insertions(+), 20

Re: [PATCH v3] drm/amdgpu: Add EXT_COHERENT memory allocation flags

2023-07-28 Thread Felix Kuehling
On 2023-07-28 15:39, David Francis wrote: These flags (for GEM and SVM allocations) allocate memory that allows for system-scope atomic semantics. On GFX943 these flags cause caches to be avoided on non-local memory. On all other ASICs they are identical in functionality to the equivalent

Re: [PATCH 2/4] drm/amdkfd: disable IOMMUv2 support for KV/CZ

2023-07-28 Thread Felix Kuehling
There are some APU-specific code paths for Kaveri and Carrizo in the device queue manager and MQD manager. I think a minimal fix would be to change device_queue_manager_init to call device_queue_manager_init_cik_hawaii for Kaveri and device_queue_manager_init_vi_tonga for Carrizo to use the

Re: [PATCH] drm/amdkfd: avoid unmap dma address when svm_ranges are split

2023-07-28 Thread Felix Kuehling
On 2023-07-27 19:43, Alex Sierra wrote: DMA address reference within svm_ranges should be unmapped only after the memory has been released from the system. In case of range splitting, the DMA address information should be copied to the corresponding range after this has split. But leaving dma

Re: [PATCH v3] drm/amdgpu: Add EXT_COHERENCE memory allocation flags

2023-07-27 Thread Felix Kuehling
In amdgpu_dma_buf_create_obj we copy the coherence-related flags to the SG BO that's used to attach the BO to the importer device. You need to add the new flag to the list. Some more nit-picks inline. Am 2023-07-26 um 09:34 schrieb David Francis: These flags (for GEM and SVM allocations)

Re: [Patch V2 v2] drm/amdgpu: Checkpoint and Restore VRAM BOs without VA

2023-07-25 Thread Felix Kuehling
* is less GPUVM Base +*/ + if (((uint64_t)kgd_mem->va <= pdd->gpuvm_base) && kgd_mem->va) Unnecessary parentheses around (a <= b). In this condition I'd also prefer to put kgd_mem->va first, because it short-circuits execution for the case tha

Re: [PATCH] drm/amdgpu: Checkpoint and Restore VRAM BOs without VA

2023-07-25 Thread Felix Kuehling
Am 2023-07-25 um 16:04 schrieb Errabolu, Ramesh: [AMD Official Use Only - General] Responses inline. -Original Message- From: Kuehling, Felix Sent: Monday, July 24, 2023 2:51 PM To: amd-gfx@lists.freedesktop.org; Errabolu, Ramesh Subject: Re: [PATCH] drm/amdgpu: Checkpoint and

Re: [PATCH] drm/amdkfd: start_cpsch don't map queues

2023-07-24 Thread Felix Kuehling
Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Michel, can you test whether this fixes your regression on Raven? Would be good to get a Tested-by for this patch, since we haven't been able to reproduce the problem yet. Thanks,   Felix --- drivers/gpu/drm/amd/amdkfd

Re: [PATCH] drm/amdgpu: Checkpoint and Restore VRAM BOs without VA

2023-07-24 Thread Felix Kuehling
On 2023-07-24 11:57, Ramesh Errabolu wrote: Extend checkpoint logic to allow inclusion of VRAM BOs that do not have a VA attached Signed-off-by: Ramesh Errabolu --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

Re: [PATCH] drm/amdkfd: avoid svm dump when dynamic debug disabled

2023-07-19 Thread Felix Kuehling
and svm_range_debug_dump functions are dynamically enabled to print svm_range_debug_dump debug traces. Signed-off-by: Alex Sierra Tested-by: Alex Sierra Signed-off-by: Philip Yang Signed-off-by: Felix Kuehling I don't think my name on a Signed-off-by is appropriate here. I didn't write the patch. And I'm

Re: [PATCH] drm/amdkfd: avoid svm dump when dynamic debug disabled

2023-07-19 Thread Felix Kuehling
and svm_range_debug_dump functions are dynamically enabled to print svm_range_debug_dump debug traces. Signed-off-by: Alex Sierra Tested-by: Alex Sierra Signed-off-by: Philip Yang Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_svm.h | 3

Re: [PATCH] drm/amdkfd: avoid svm dump when dynamic debug disabled

2023-07-19 Thread Felix Kuehling
Am 2023-07-08 um 12:57 schrieb Alex Sierra: svm_range_debug_dump should not be called at all when dynamic debug is disabled to avoid iterating over SVM lists. This could drop performance, specially with big number of SVM ranges. Signed-off-by: Alex Sierra Signed-off-by: Philip Yang ---

Re: [PATCH] drm/amdkfd: enable cooperative groups for gfx11

2023-07-19 Thread Felix Kuehling
inline. With those fixed, the patch is Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 1 + drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 ++ drivers/gpu/drm/amd/amdkfd

Re: [PATCH v2 2/4] drm/amdkfd: use vma_is_initial_stack() and vma_is_initial_heap()

2023-07-19 Thread Felix Kuehling
Am 2023-07-19 um 03:51 schrieb Kefeng Wang: Use the helpers to simplify code. Cc: Felix Kuehling Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Kefeng Wang Reviewed-by: Felix Kuehling --- driver

Re: [PATCH 1/2] drm/amdkfd: fix trap handling work around for debugging

2023-07-19 Thread Felix Kuehling
Am 2023-07-14 um 05:37 schrieb Jonathan Kim: Update the list of devices that require the cwsr trap handling workaround for debugging use cases. Signed-off-by: Jonathan Kim This patch is Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_debug.c| 5

Re: [PATCH 2/2] drm/amdkfd: enable cooperative groups for gfx11

2023-07-18 Thread Felix Kuehling
Am 2023-07-14 um 05:37 schrieb Jonathan Kim: MES can concurrently schedule queues on the device that require exclusive device access if marked exclusively_scheduled without the requirement of GWS. Similar to the F32 HWS, MES will manage quality of service for these queues. Use this for

Re: [PATCH 4/4] drm/amdgpu: use a macro to define no xcp partition case

2023-07-17 Thread Felix Kuehling
On 2023-07-16 22:26, Guchun Chen wrote: ~0 as no xcp partition is used in several places, so improve its definition by a macro for code consistency. Suggested-by: Christian König Signed-off-by: Guchun Chen The series is Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu

Re: [PATCH 3/5] drm/amdkfd: use vma_is_stack() and vma_is_heap()

2023-07-14 Thread Felix Kuehling
Am 2023-07-14 um 10:26 schrieb Vlastimil Babka: On 7/12/23 18:24, Felix Kuehling wrote: Allocations in the heap and stack tend to be small, with several allocations sharing the same page. Sharing the same page for different allocations with different access patterns leads to thrashing when we

Re: [PATCH v3 09/12] drm/amdgpu: use doorbell manager for kfd process doorbells

2023-07-13 Thread Felix Kuehling
with PDD, delay doorbell process page allocation until really needed (Felix) Cc: Alex Deucher Cc: Christian Koenig Cc: Felix Kuehling Acked-by: Christian König Signed-off-by: Shashank Sharma Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 20

Re: [PATCH v3 08/12] drm/amdgpu: use doorbell manager for kfd kernel doorbells

2023-07-13 Thread Felix Kuehling
(Alex) V3: - Move single variable declaration below (Christian) - Add a to-do item to reuse the KGD kernel level doorbells for KFD for non-MES cases, instead of reserving one page (Felix) Cc: Alex Deucher Cc: Christian Koenig Cc: Felix Kuehling Signed-off-by: Shashank Sharma Reviewed

Re: [PATCH Review V2 2/2] drm/amdgpu: Disable RAS by default on APU flatform

2023-07-13 Thread Felix Kuehling
On 2023-07-13 10:50, Stanley.Yang wrote: Disable RAS feature by default for aqua vanjaram on APU platform. Changed from V1: Splite Disable RAS by default on APU platform into a separated patch. Signed-off-by: Stanley.Yang Reviewed-by: Hawking Zhang ---

Re: [PATCH 3/5] drm/amdkfd: use vma_is_stack() and vma_is_heap()

2023-07-12 Thread Felix Kuehling
Allocations in the heap and stack tend to be small, with several allocations sharing the same page. Sharing the same page for different allocations with different access patterns leads to thrashing when we migrate data back and forth on GPU and CPU access. To avoid this we disable HMM

Re: [PATCH v5 04/10] drm/amdgpu: create GFX-gen11 usermode queue

2023-07-12 Thread Felix Kuehling
Am 2023-07-12 um 11:55 schrieb Shashank Sharma: On 11/07/2023 21:51, Felix Kuehling wrote: On 2023-07-06 09:39, Christian König wrote: Am 06.07.23 um 15:37 schrieb Shashank Sharma: On 06/07/2023 15:22, Christian König wrote: Am 06.07.23 um 14:35 schrieb Shashank Sharma: A Memory queue

Re: [PATCH v5 04/10] drm/amdgpu: create GFX-gen11 usermode queue

2023-07-11 Thread Felix Kuehling
On 2023-07-06 09:39, Christian König wrote: Am 06.07.23 um 15:37 schrieb Shashank Sharma: On 06/07/2023 15:22, Christian König wrote: Am 06.07.23 um 14:35 schrieb Shashank Sharma: A Memory queue descriptor (MQD) of a userqueue defines it in the hw's context. As MQD format can vary between

Re: [PATCH 3/6] drm/amdkfd: switch over to using drm_exec v2

2023-07-11 Thread Felix Kuehling
On 2023-07-11 09:31, Christian König wrote: Avoids quite a bit of logic and kmalloc overhead. v2: fix multiple problems pointed out by Felix Signed-off-by: Christian König Two nit-picks inline about DRM_EXEC_INTERRUPTIBLE_WAIT. With those fixed, the patch is Reviewed-by: Felix Kuehling

Re: [PATCH] drm/amdkfd: enable grace period for xcp instance

2023-07-11 Thread Felix Kuehling
On 2023-07-11 10:28, Eric Huang wrote: Read/write grace period from/to first xcc instance of xcp in kfd node. Signed-off-by: Eric Huang --- .../drm/amd/amdkfd/kfd_device_queue_manager.c | 21 --- .../drm/amd/amdkfd/kfd_device_queue_manager.h | 2 +-

Re: [PATCH] drm/amdkfd: report dispatch id always saved in ttmps after gc9.4.2

2023-07-11 Thread Felix Kuehling
ways available for debug/trap handling. Signed-off-by: Jonathan Kim Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/am

Re: [PATCH v2] drm/amdgpu: Increase soft IH ring size

2023-07-07 Thread Felix Kuehling
oing to flood the log. It would be a good idea to apply a rate-limit, or use dev_warn_once. With that fixed, the patch is Reviewed-by: Felix Kuehling } } diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h index dd1c2eded6b9..6c6184f0dbc1 1

Re: [PATCH] drm/amdgpu: Increase IH soft ring size

2023-07-07 Thread Felix Kuehling
Am 2023-07-07 um 10:14 schrieb Philip Yang: Retry faults are delegated to IH soft ring and then processed by deferred worker. Current IH soft ring size PAGE_SIZE can store 128 entries, which may overflow and drop retry faults, causes HW stucks because the retry fault is not recovered.

Re: [PATCH] drm/amdkfd: Access gpuvm_export_dmabuf() api

2023-06-21 Thread Felix Kuehling
Am 2023-06-20 um 22:11 schrieb Ramesh Errabolu: Call KFD api to get Dmabuf instead of calling GEM Prime API Signed-off-by: Ramesh Errabolu --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

Re: [PATCH] drm/amdgpu: Forbid kfd using cpu to update pt if vm is shared with gfx

2023-06-21 Thread Felix Kuehling
Can we change the flags if needed. E.g. see what amdgpu_bo_pin_restricted does: if (!(bo->flags & AMDGPU_GEM_CREATE_NO_CPU_ACCESS)) bo->flags |= AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED; amdgpu_bo_placement_from_domain(bo, domain); This shouldn't really change

Re: [PATCHv4] drm/amdgpu: Update invalid PTE flag setting

2023-06-20 Thread Felix Kuehling
to a no-retry fault. Additionally, have 2 sets of invalid PTE settings, one for TF enabled, the other for TF disabled. The setting with TF disabled, doesn't work with TF enabled. Signed-off-by: Mukul Joshi Reviewed-by: Felix Kuehling --- v1->v2: - Update handling according to Christian's feedb

Re: [PATCH] drm/amdgpu: remove vm sanity check from amdgpu_vm_make_compute

2023-06-19 Thread Felix Kuehling
at amdgpu_vm_make_compute. Signed-off-by: Xiaogang Chen Reviewed-by: Felix Kuehling As discussed, we can follow this up with a change that enables ATS for graphics VMs as well, so we don't need to enable ATS in amdgpu_vm_make_compute. This would improve interop for Raven. We only enable ATS for the lower half

Re: [PATCH] drm/amdgpu: remove vm sanity check from amdgpu_vm_make_compute

2023-06-19 Thread Felix Kuehling
On 2023-06-19 15:06, Xiaogang.Chen wrote: From: Xiaogang Chen Since we allow kfd and graphic operate on same GPU VM to have interoperation between them GPU VM may have been used by graphic vm operations before kfd turn a GFX VM into a compute VM. Remove vm clean checking at

Re: [PATCHv2] drm/amdkfd: Enable GWS on GFX9.4.3

2023-06-16 Thread Felix Kuehling
On 2023-06-16 14:44, Mukul Joshi wrote: Enable GWS capable queue creation for forward progress gaurantee on GFX 9.4.3. Signed-off-by: Mukul Joshi Reviewed-by: Felix Kuehling --- v1->v2: - Update the condition for setting pqn->q->gws for GFX 9.4.3. drivers/gpu/drm/a

Re: [PATCH] drm/amdkfd: Use KIQ to unmap HIQ

2023-06-16 Thread Felix Kuehling
On 2023-06-16 14:00, Mukul Joshi wrote: Currently, we unmap HIQ by directly writing to HQD registers. This doesn't work for GFX9.4.3. Instead, use KIQ to unmap HIQ, similar to how we use KIQ to map HIQ. Using KIQ to unmap HIQ works for all GFX series post GFXv9. Signed-off-by: Mukul Joshi

Re: [PATCH] drm/amdkfd: Enable GWS on GFX9.4.3

2023-06-16 Thread Felix Kuehling
On 2023-06-16 13:59, Mukul Joshi wrote: Enable GWS capable queue creation for forward progress gaurantee on GFX 9.4.3. Signed-off-by: Mukul Joshi --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 1 + .../amd/amdkfd/kfd_process_queue_manager.c| 31 --- 2 files

Re: [PATCH] drm/amdgpu: Modify for_each_inst macro

2023-06-16 Thread Felix Kuehling
Am 2023-06-16 um 06:23 schrieb Lijo Lazar: Modify it such that it doesn't change the instance mask parameter. Signed-off-by: Lijo Lazar Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [PATCH] drm/amdkfd: set coherent host access capability flag

2023-06-15 Thread Felix Kuehling
Am 2023-06-16 um 00:29 schrieb Felix Kuehling: Am 2023-06-15 um 18:54 schrieb Alex Sierra: This flag determines whether the host possesses coherent access to the memory of the device. Signed-off-by: Alex Sierra ---   drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 4   1 file changed, 4

Re: [PATCH] drm/amdkfd: set coherent host access capability flag

2023-06-15 Thread Felix Kuehling
Am 2023-06-15 um 18:54 schrieb Alex Sierra: This flag determines whether the host possesses coherent access to the memory of the device. Signed-off-by: Alex Sierra --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 4 1 file changed, 4 insertions(+) diff --git

Re: [PATCH 2/3] drm/amdgpu: Implement new dummy vram manager

2023-06-15 Thread Felix Kuehling
Am 2023-06-15 um 03:37 schrieb Christian König: Am 14.06.23 um 17:42 schrieb Felix Kuehling: Am 2023-06-14 um 06:38 schrieb Christian König: Am 10.05.23 um 00:01 schrieb Alex Deucher: From: Rajneesh Bhardwaj This adds dummy vram manager to support ASICs that do not have a dedicated

Re: [PATCH 2/3] drm/amdgpu: Implement new dummy vram manager

2023-06-14 Thread Felix Kuehling
through the regular VRAM manager. Regards,   Felix Christian. Reviewed-by: Felix Kuehling Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher ---   drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 67 ++--   1 file changed, 60 insertions(+), 7 deletions(-) diff --git

Re: [PATCH] drm/amdkfd: Switch over to memdup_user()

2023-06-14 Thread Felix Kuehling
Am 2023-06-13 um 22:04 schrieb Jiapeng Chong: Use memdup_user() rather than duplicating its implementation. This is a little bit restricted to reduce false positives. ./drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c:2813:13-20: WARNING opportunity for memdup_user. Reported-by: Abaci

Re: [PATCH] drm/amdkfd: decrement queue count on mes queue destroy

2023-06-13 Thread Felix Kuehling
On 2023-06-13 17:48, Jonathan Kim wrote: Queue count should decrement on queue destruction regardless of HWS support type. Signed-off-by: Jonathan Kim Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH] drm/amdgpu/sdma4: set align mask to 255

2023-06-12 Thread Felix Kuehling
Am 2023-06-07 um 12:31 schrieb Alex Deucher: The wptr needs to be incremented at at least 64 dword intervals, use 256 to align with windows. This should fix potential hangs with unaligned updates. Signed-off-by: Alex Deucher Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu

Re: [PATCHv2] drm/amdgpu: Update invalid PTE flag setting

2023-06-12 Thread Felix Kuehling
Am 2023-06-12 um 12:23 schrieb Mukul Joshi: Update the invalid PTE flag setting with TF enabled. This is to ensure, in addition to transitioning the retry fault to a no-retry fault, it also causes the wavefront to enter the trap handler. With the current setting, the fault only transitions to

Re: [PATCH] drm/amdkfd: fix null queue check on debug setting exceptions

2023-06-12 Thread Felix Kuehling
Am 2023-06-12 um 11:46 schrieb Jonathan Kim: Null check should be done on queue struct itself and not on the process queue list node. Signed-off-by: Jonathan Kim Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

Re: [PATCH v5 3/5] drm/amdkfd: set activated flag true when event age unmatchs

2023-06-12 Thread Felix Kuehling
, the series is Reviewed-by: Felix Kuehling David, I looked at the ROCr and Thunk changes as well, and they look reasonable to me. Do you have any feedback on these patches from a ROCr point of view? Is there a reasonable stress test that could be used check that this handles the race conditions

Re: [PATCH v2] gpu: drm/amd: Remove the redundant null pointer check in list_for_each_entry() loops

2023-06-12 Thread Felix Kuehling
[+Jon] Am 2023-06-12 um 07:58 schrieb Lu Hongfei: pqn bound in list_for_each_entry loop will not be null, so there is no need to check whether pqn is NULL or not. Thus remove a redundant null pointer check. Signed-off-by: Lu Hongfei --- The filename of the previous version was:

Re: [PATCH v5 3/5] drm/amdkfd: set activated flag true when event age unmatchs

2023-06-09 Thread Felix Kuehling
From the KFD perspective, the series is Reviewed-by: Felix Kuehling David, I looked at the ROCr and Thunk changes as well, and they look reasonable to me. Do you have any feedback on these patches from a ROCr point of view? Is there a reasonable stress test that could be used check

Re: [PATCH v4 3/5] drm/amdkfd: set activated flag true when event age unmatchs

2023-06-09 Thread Felix Kuehling
On 2023-06-09 16:13, James Zhu wrote: Set waiter's activated flag true when event age unmatchs with last_event_age. -v4: add event type check Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff

Re: [PATCH v3 3/5] drm/amdkfd: set activated flag true when event age unmatchs

2023-06-09 Thread Felix Kuehling
On 2023-06-08 13:07, James Zhu wrote: Set waiter's activated flag true when event age unmatchs with last_event_age. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git

Re: [PATCH v2 10/12] drm/amdgpu: remove unused functions and variables

2023-06-09 Thread Felix Kuehling
-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c | 32 --- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 12 - 2 files changed, 44 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c b/drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c index

Re: [PATCH v2 08/12] drm/amdgpu: use doorbell manager for kfd kernel doorbells

2023-06-09 Thread Felix Kuehling
On 2023-04-25 15:59, Shashank Sharma wrote: On 24/04/2023 21:56, Felix Kuehling wrote: On 2023-04-22 2:39, Shashank Sharma wrote: - KFD process level doorbells: doorbell pages which are allocated by kernel but mapped and written by userspace processes, saved in struct pdd->qpd->doo

Re: [PATCH] drm/amdkfd: fix and enable debugging for gfx11

2023-06-07 Thread Felix Kuehling
eld? That could have avoided the need for the compatibility checks. Anyway, the patch is Reviewed-by: Felix Kuehling amdgpu_mes_lock(>mes); r = adev->mes.funcs->misc_op(>mes, _input); diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h b/drivers/gpu/drm/a

Re: [PATCH] drm/amdkfd: optimize gfx off enable toggle for debugging

2023-06-07 Thread Felix Kuehling
On 2023-06-07 13:32, Jonathan Kim wrote: Legacy debug devices limited to pinning a single debug VMID for debugging are the only devices that require disabling GFX OFF while accessing debug registers. Debug devices that support multi-process debugging rely on the hardware scheduler to update

Re: [PATCH] drm/amdkfd: fix and enable debugging for gfx11

2023-06-07 Thread Felix Kuehling
On 2023-06-07 13:26, Jonathan Kim wrote: There are a few fixes required to enable gfx11 debugging. First, ADD_QUEUE.trap_en is an inappropriate place to toggle a per-process register so move it to SET_SHADER_DEBUGGER.trap_en. When ADD_QUEUE.skip_process_ctx_clear is set, MES will prioritize

Re: [PATCH v2 3/3] drm/amdkfd: don't sleep when event age unmatch

2023-06-07 Thread Felix Kuehling
On 2023-06-06 12:24, James Zhu wrote: Don't sleep when event age unmatch, and update last_event_age. It is only for KFD_EVENT_TYPE_SIGNAL which is checked by user space. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 15 +++ 1 file changed, 15

Re: [PATCH v2 1/3] drm/amdkfd: add event age tracking

2023-06-07 Thread Felix Kuehling
On 2023-06-06 12:24, James Zhu wrote: Add event age tracking Signed-off-by: James Zhu --- include/uapi/linux/kfd_ioctl.h | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h index

Re: [PATCH] drm/amdkfd: Fix reserved SDMA queues handling

2023-06-07 Thread Felix Kuehling
mdkfd: Update SDMA queue management for GFX9.4.3") Signed-off-by: Mukul Joshi Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 13 ++--- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 10 +- drivers/gpu/drm/amd/amdkfd/

Re: [PATCH v2 06/07] drm/amdgpu: add option params to enforce process isolation between graphics and compute

2023-06-07 Thread Felix Kuehling
I can't see the other patches in this series, so I'm missing some context. I don't understand what "process isolation between graphics and compute" means here. It seems to be unrelated to KFD compute. This patch seems to be mostly about handling of reserved VMIDs. Maybe you're trying to avoid

Re: [PATCH v2] drm/amdgpu: Increase hmm range get pages timeout

2023-06-07 Thread Felix Kuehling
. To be safe, increase timeout value to 1 second for 128MB range. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c b/drivers/gpu

Re: [PATCH] drm/amd: Check that a system is a NUMA system before looking for SRAT

2023-06-05 Thread Felix Kuehling
On 2023-06-02 08:18, Mario Limonciello wrote: It's pointless on laptops to look for the SRAT table as these are not NUMA. Check the number of possible nodes is > 1 to decide whether to look for SRAT. Suggested-by: Felix Kuehling Signed-off-by: Mario Limonciello I think we discus

Re: [PATCH] drm/amdgpu: fix debug wait on idle for gfx9.4.1

2023-06-02 Thread Felix Kuehling
On 2023-06-02 12:37, Hamza Mahfooz wrote: + amd-gfx On 6/2/23 11:58, Jonathan Kim wrote: Wait calls for amd_ip_block_type not amd_hw_ip_block_type. Signed-off-by: Jonathan Kim Reviewed-by: Felix Kuehling ---   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c | 2 +-   1 file

Re: [PATCH 2/4] drm/amdkfd: Signal page table fence after KFD flush tlb

2023-06-02 Thread Felix Kuehling
Am 2023-06-02 um 07:57 schrieb Christian König: Am 01.06.23 um 21:31 schrieb Philip Yang: To free page table BOs which are freed when updating page table, for example PTE BOs when PDE0 used as PTE. Signed-off-by: Philip Yang ---   drivers/gpu/drm/amd/amdkfd/kfd_process.c | 5 +   1 file

Re: [PATCH 3/3] drm/amdkfd: don't sleep when event age unmatch

2023-06-01 Thread Felix Kuehling
On 2023-06-01 18:06, James Zhu wrote: On 2023-06-01 17:17, Felix Kuehling wrote: On 2023-06-01 16:47, James Zhu wrote: Don't sleep when event age unmatch, and update last_event_age. It is only for KFD_EVENT_TYPE_SIGNAL which is checked by user space. Signed-off-by: James Zhu ---   drivers

Re: [PATCH 3/3] drm/amdkfd: don't sleep when event age unmatch

2023-06-01 Thread Felix Kuehling
On 2023-06-01 16:47, James Zhu wrote: Don't sleep when event age unmatch, and update last_event_age. It is only for KFD_EVENT_TYPE_SIGNAL which is checked by user space. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 13 + 1 file changed, 13 insertions(+)

Re: [PATCH 1/3] drm/amdkfd: add event age tracking

2023-06-01 Thread Felix Kuehling
We'll also need a pointer to the user mode changes in some public repo, or a public email code review of the user mode changes. Thanks,   Felix On 2023-06-01 16:58, Felix Kuehling wrote: On 2023-06-01 16:47, James Zhu wrote: Add event age tracking Signed-off-by: James Zhu ---   include

Re: [PATCH 1/3] drm/amdkfd: add event age tracking

2023-06-01 Thread Felix Kuehling
On 2023-06-01 16:47, James Zhu wrote: Add event age tracking Signed-off-by: James Zhu --- include/uapi/linux/kfd_ioctl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h index 7e19a2d1e907..bfbe0006370e

Re: [PATCH 3/4] drm/amdgpu: Signal page table fence after gfx vm flush

2023-06-01 Thread Felix Kuehling
On 2023-06-01 15:31, Philip Yang wrote: To free page table BOs which are fenced and freed when updating page table. Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c

Re: [PATCH 2/4] drm/amdkfd: Signal page table fence after KFD flush tlb

2023-06-01 Thread Felix Kuehling
On 2023-06-01 15:31, Philip Yang wrote: To free page table BOs which are freed when updating page table, for example PTE BOs when PDE0 used as PTE. Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 5 + 1 file changed, 5 insertions(+) diff --git

Re: [PATCH 1/4] drm/amdgpu: Implement page table BO fence

2023-06-01 Thread Felix Kuehling
On 2023-06-01 15:31, Philip Yang wrote: Add pt_fence to amdgpu vm structure and implement helper functions. This fence will be shared by all page table BOs of the same amdgpu vm. Suggested-by: Felix Kuehling Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2

Re: [PATCH -next] drm/amdkfd: clean up one inconsistent indenting

2023-06-01 Thread Felix Kuehling
On 2023-05-30 22:08, Yang Li wrote: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device.c:1036 kgd2kfd_interrupt() warn: inconsistent indenting Signed-off-by: Yang Li Reviewed-by: Felix Kuehling I'm applying the patch to amd-staging-drm-next. Thanks! --- drivers/gpu/drm/amd/amdkfd

Re: [PATCH] drm/amdgpu: Add function parameter 'event' to kdoc in svm_range_evict()

2023-05-31 Thread Felix Kuehling
Am 2023-05-31 um 14:10 schrieb Srinivasan Shanmugam: Fixes the following gcc with W=1: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_svm.c:1841: warning: Function parameter or member 'event' not described in 'svm_range_evict' Cc: Felix Kuehling Cc: Christian König Cc: Alex Deucher Signed-off

Re: [PATCH] drm/amd: SVM flag error added at svm_range flags

2023-05-31 Thread Felix Kuehling
This flag was never meant for user mode. Alex ended up implementing it differently in a way that doesn't need to change the flags exposed to user mode. See his patch "drm/amdkfd: flag added to handle errors from svm validate and map". This patch is no longer needed. Regards,   Felix Am

Re: [PATCH] drm/amdkfd: Fix MEC pipe interrupt enablement

2023-05-30 Thread Felix Kuehling
This quirk of for_each_inst has caused problems more than once. Why not use for_each_set_bit to implement it? That one doesn't have side effects. Regards,   Felix Am 2023-05-29 um 09:58 schrieb Lijo Lazar: for_each_inst modifies xcc_mask and therefore the loop doesn't initialize properly

Re: [PATCH 32/33] drm/amdkfd: add debug device snapshot operation

2023-05-30 Thread Felix Kuehling
of actual devices so that the debugger can make a subsequent successful call. v2: add num_xcc to device snapshot and fixup new kfd_node reference Signed-off-by: Jonathan Kim Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 7 ++- drivers/gpu/drm/amd/amdkfd

Re: [PATCH 28/33] drm/amdkfd: add debug set flags operation

2023-05-30 Thread Felix Kuehling
-off-by: Jonathan Kim Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 + drivers/gpu/drm/amd/amdkfd/kfd_debug.c | 58 drivers/gpu/drm/amd/amdkfd/kfd_debug.h | 1 + 3 files changed, 61 insertions(+) diff --git a/drivers/gpu/drm

Re: [PATCH 27/33] drm/amdkfd: add debug set and clear address watch points operation

2023-05-30 Thread Felix Kuehling
devices to date, so have the KFD keep track of what watch points are allocated or not. v2: fixup with new kfd_node struct reference for mes and watch point checks Signed-off-by: Jonathan Kim Reviewed-by: Felix Kuehling --- .../drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.c | 51 +++ .../drm

Re: [PATCH 26/33] drm/amdkfd: add debug suspend and resume process queues operation

2023-05-30 Thread Felix Kuehling
occurred (HWS in a fatal state so it can't suspend or resume queues). v2: fixup new kfd_node struct reference for mes fw check. also fixup missing EC_QUEUE_NEW flagging on newly created queue. Signed-off-by: Jonathan Kim Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu

<    1   2   3   4   5   6   7   8   9   10   >