Re: [PATCH v3 00/14] drm: Add a driver for CSF-based Mali GPUs

2023-12-09 Thread Tatsuyuki Ishi
> On Dec 5, 2023, at 2:32, Boris Brezillon > wrote: > > Hello, > > This is the 3rd version of the kernel driver for Mali CSF-based GPUs. > > With all the DRM dependencies being merged (drm-sched single entity and > drm_gpuvm), I thought now was a good time to post a new version. Note > that

Re: [PATCH v2 2/3] drm/amdgpu: Add flag to disable implicit sync for GEM operations.

2023-11-06 Thread Tatsuyuki Ishi
> On Nov 6, 2023, at 22:44, Christian König wrote: > > Am 02.11.23 um 15:04 schrieb Tatsuyuki Ishi: >> In Vulkan, it is the application's responsibility to perform adequate >> synchronization before a sparse unmap, replace or BO destroy operation. >> Until now, the k

Re: [PATCH 3/6] drm/amdgpu: Flush VM updates for split bindings eagerly.

2023-11-05 Thread Tatsuyuki Ishi
> On Oct 31, 2023, at 23:07, Christian König wrote: > > Am 31.10.23 um 14:59 schrieb Bas Nieuwenhuizen: >> >> >> On Tue, Oct 31, 2023 at 2:57 PM Christian König > <mailto:christian.koe...@amd.com>> wrote: >>> Am 31.10.23 um

[PATCH v2 3/3] drm/amdgpu: Bump amdgpu driver version.

2023-11-02 Thread Tatsuyuki Ishi
For detection of the new explicit sync functionality without having to try the ioctl. Signed-off-by: Tatsuyuki Ishi --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd

[PATCH v2 0/3] drm/amdgpu: Add flag to disable implicit sync for GEM operations.

2023-11-02 Thread Tatsuyuki Ishi
-sync [3]: https://github.com/ishitatsuyuki/linux/tree/explicit-sync-drm-misc-next Tatsuyuki Ishi (3): drm/amdgpu: Don't implicit sync PRT maps. drm/amdgpu: Add flag to disable implicit sync for GEM operations. drm/amdgpu: Bump amdgpu driver version. .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c

[PATCH v2 2/3] drm/amdgpu: Add flag to disable implicit sync for GEM operations.

2023-11-02 Thread Tatsuyuki Ishi
(radeonsi vs radv). Signed-off-by: Tatsuyuki Ishi --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 14 -- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h| 7 ++- drivers/gpu/drm/amd/amdgpu

[PATCH v2 1/3] drm/amdgpu: Don't implicit sync PRT maps.

2023-11-02 Thread Tatsuyuki Ishi
These are considered map operations rather than unmap, and there is no point of doing implicit synchronization here. Signed-off-by: Tatsuyuki Ishi --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu

Re: [PATCH 3/6] drm/amdgpu: Flush VM updates for split bindings eagerly.

2023-10-31 Thread Tatsuyuki Ishi
> On Oct 31, 2023, at 23:17, Bas Nieuwenhuizen wrote: > > > > On Tue, Oct 31, 2023 at 3:08 PM Christian König > wrote: > Am 31.10.23 um 14:59 schrieb Bas Nieuwenhuizen: >> >> >> On Tue, Oct 31, 2023 at 2:57 PM Christian König >> wrote: &

Re: [PATCH 2/6] drm/amdgpu: Separate eviction from VM status.

2023-10-31 Thread Tatsuyuki Ishi
> On Oct 31, 2023, at 22:55, Christian König wrote: > > Am 31.10.23 um 14:40 schrieb Tatsuyuki Ishi: >> In short, eviction never really belonged to the vm_status state machine. > > I strongly disagree to that. > >> Even when evicted, the BO could belong to

[PATCH 3/6] drm/amdgpu: Flush VM updates for split bindings eagerly.

2023-10-31 Thread Tatsuyuki Ishi
state "dirty", shared between per-VM BOs and traditional BOs, containing all BOs that have pending updates in `invalids`. amdgpu_gem_va_update_vm will now simply flush any pending updates for BOs in the dirty state. Signed-off-by: Tatsuyuki Ishi --- drivers/gpu/drm/amd/amdgpu/amdgpu_

[PATCH 4/6] drm/amdgpu: Remove redundant state change after validation.

2023-10-31 Thread Tatsuyuki Ishi
by the shadow BO. Signed-off-by: Tatsuyuki Ishi --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 01d31891cd05..50f7cee639ac 100644 --- a/drivers/gpu

[PATCH 5/6] drm/amdgpu: Add flag to disable implicit sync for GEM operations.

2023-10-31 Thread Tatsuyuki Ishi
(radeonsi vs radv). Signed-off-by: Tatsuyuki Ishi --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 14 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h| 7 ++- drivers/gpu/drm/amd/amdgpu

[PATCH 6/6] drm/amdgpu: Bump amdgpu driver version.

2023-10-31 Thread Tatsuyuki Ishi
For detection of the new explicit sync functionality without having to try the ioctl. Signed-off-by: Tatsuyuki Ishi --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd

[PATCH 1/6] drm/amdgpu: Don't implicit sync PRT maps.

2023-10-31 Thread Tatsuyuki Ishi
These are considered map operations rather than unmap, and there is no point of doing implicit synchronization here. Signed-off-by: Tatsuyuki Ishi --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH 2/6] drm/amdgpu: Separate eviction from VM status.

2023-10-31 Thread Tatsuyuki Ishi
e. Signed-off-by: Tatsuyuki Ishi --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c| 67 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 1 + 3 files changed, 29 insertions(+), 40 deletions(-) diff --git a/drivers/gpu/drm/

[PATCH 0/6] drm/amdgpu: Add flag to disable implicit sync for GEM operations.

2023-10-31 Thread Tatsuyuki Ishi
-sync [3]: https://github.com/ishitatsuyuki/linux/tree/explicit-sync-drm-misc-next Tatsuyuki Ishi (6): drm/amdgpu: Don't implicit sync PRT maps. drm/amdgpu: Separate eviction from VM status. drm/amdgpu: Flush VM updates for split bindings eagerly. drm/amdgpu: Remove redundant state change after

[PATCH v2 4/4] drm/amdgpu: Bump amdgpu driver version.

2023-08-21 Thread Tatsuyuki Ishi
From: Bas Nieuwenhuizen For detection of the new explicit sync functionality without having to try the ioctl. Signed-off-by: Bas Nieuwenhuizen Signed-off-by: Tatsuyuki Ishi --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH v2 3/4] drm/amdgpu: Add option to disable implicit sync for a context.

2023-08-21 Thread Tatsuyuki Ishi
From: Bas Nieuwenhuizen This changes all BO usages in a submit to BOOKKEEP instead of READ, which effectively disables implicit sync for these submits. This is configured at a context level using the existing IOCTL. Signed-off-by: Bas Nieuwenhuizen Co-developed-by: Tatsuyuki Ishi Signed-off

[PATCH v2 2/4] drm/amdgpu: Allow explicit sync for VM ops.

2023-08-21 Thread Tatsuyuki Ishi
Nieuwenhuizen Signed-off-by: Tatsuyuki Ishi --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c b/drivers/gpu/drm/amd/amdgpu

[PATCH v2 1/4] drm/amdgpu: Add separate mode for syncing DMA_RESV_USAGE_BOOKKEEP.

2023-08-21 Thread Tatsuyuki Ishi
From: Bas Nieuwenhuizen To prep for allowing different sync modes in a follow-up patch. Signed-off-by: Bas Nieuwenhuizen Signed-off-by: Tatsuyuki Ishi --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd

[PATCH v2 0/4] amdgpu: Allow explicitly synchronized submissions.

2023-08-21 Thread Tatsuyuki Ishi
This adds a context option to use DMA_RESV_USAGE_BOOKKEEP for userspace submissions. This is a respin of [1] but rebased on top of the newly introduced drm_exec helpers. Disabling implicit sync is something we've wanted in RADV for a while for resolving some corner cases. A more immediate thing

Re: [PATCH 4/6] drm/amdgpu: use drm_exec for GEM and CSA handling

2023-06-29 Thread Tatsuyuki Ishi
On 6/28/23 19:44, Christian König wrote: diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index 74055cba3dc9..6811fc866494 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c @@ -728,36 +723,37 @@ int

Re: [PATCH 6/6] drm/amdgpu: use the new drm_exec object for CS v2

2023-06-29 Thread Tatsuyuki Ishi
On 6/28/23 19:44, Christian König wrote: @@ -958,18 +904,57 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, e->user_invalidated = userpage_invalidated; } - r = ttm_eu_reserve_buffers(>ticket, >validated, true, - ); -

Re: [PATCH 06/13] drm/amdgpu: use the new drm_exec object for CS v2

2023-06-20 Thread Tatsuyuki Ishi
On 6/20/23 17:16, Tatsuyuki Ishi wrote: On 6/20/23 17:12, Christian König wrote: Am 20.06.23 um 06:07 schrieb Tatsuyuki Ishi: @@ -928,18 +874,56 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,   e->user_invalidated = userpage_invalidated;   }   -  

Re: [PATCH 06/13] drm/amdgpu: use the new drm_exec object for CS v2

2023-06-20 Thread Tatsuyuki Ishi
On 6/20/23 17:12, Christian König wrote: Am 20.06.23 um 06:07 schrieb Tatsuyuki Ishi: +Boris and +Matthew in case you want to take over this patch set. Here are some review / testing comments, including those I posted before to ease tracking. On 5/4/23 20:51, Christian König wrote: Use

Re: [PATCH 06/13] drm/amdgpu: use the new drm_exec object for CS v2

2023-06-19 Thread Tatsuyuki Ishi
On 6/20/23 13:07, Tatsuyuki Ishi wrote: @@ -1296,9 +1271,8 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,    */   r = 0;   amdgpu_bo_list_for_each_userptr_entry(e, p->bo_list) { -    struct amdgpu_bo *bo = ttm_to_amdgpu_bo(e->tv.bo); - -   

Re: [PATCH 06/13] drm/amdgpu: use the new drm_exec object for CS v2

2023-06-19 Thread Tatsuyuki Ishi
+Boris and +Matthew in case you want to take over this patch set. Here are some review / testing comments, including those I posted before to ease tracking. On 5/4/23 20:51, Christian König wrote: Use the new component here as well and remove the old handling. v2: drop dupplicate handling

Re: [PATCH 06/13] drm/amdgpu: use the new drm_exec object for CS v2

2023-06-12 Thread Tatsuyuki Ishi
Hi Chrisitan, On May 4, 2023, at 20:51, Christian König mailto:ckoenig.leichtzumer...@gmail.com>> wrote: Use the new component here as well and remove the old handling. v2: drop dupplicate handling It seems that after dropping the duplicate handling, locking of VM PDs on global BO list is

Re: [PATCH 06/13] drm/amdgpu: use the new drm_exec object for CS v2

2023-06-12 Thread Tatsuyuki Ishi
Hi Christian, > On May 4, 2023, at 20:51, Christian König > wrote: > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c > index 08eced097bd8..9e751f5d4aa7 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c > +++

[PATCH v2] drm: make drm_syncobj_array_wait() use the range hrtimer feature

2021-12-18 Thread Tatsuyuki Ishi
-off-by: Tatsuyuki Ishi --- drivers/gpu/drm/drm_syncobj.c | 75 --- 1 file changed, 44 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c index c9a9d74f338c..b2f1631e7dc2 100644 --- a/drivers/gpu/drm

[PATCH] drm: make drm_syncobj_array_wait() use the range hrtimer feature

2021-12-06 Thread Tatsuyuki Ishi
select(), poll() and epoll_wait() all already supports high-precision timeout handling. This patch makes drm_syncobj_array_wait() to handle the timeout in high precision using the same heuristics and functions implemented for select(). Signed-off-by: Tatsuyuki Ishi --- drivers/gpu/drm