[PATCH 2/2] drm/amdgpu: load balance VCN3 decode as well v8

2021-03-05 Thread Christian König
calculation once more v6: only check message buffers v7: fix constant and use defines v8: fix create msg calculation Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 132 +- 1 file changed, 130 insertions(+), 2 deletions(-) diff --git a/drivers

Re: [PATCH 1/3] drm/amdgpu: introduce struct amdgpu_bo_user

2021-03-05 Thread Christian König
Am 05.03.21 um 13:56 schrieb Nirmoy Das: Implement a new struct amdgpu_bo_user as subclass of struct amdgpu_bo and a function to created amdgpu_bo_user bo with a flag to identify the owner. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 44 ++

Re: [PATCH 3/3] drm/amdgpu: use tiling_flags of struct amdgpu_bo_user

2021-03-05 Thread Christian König
Am 05.03.21 um 13:56 schrieb Nirmoy Das: This flag is only needed for BOs created by amdgpu_gem_object_create(), so we can remove tiling_flags from the base class. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 19 +-- drivers/gpu/drm/amd/amdgpu/am

Re: [PATCH] drm/amdkfd: fix build error with missing AMD_IOMMU_V2

2021-03-08 Thread Christian König
Am 08.03.21 um 21:02 schrieb Felix Kuehling: Am 2021-03-08 um 2:33 p.m. schrieb Arnd Bergmann: On Mon, Mar 8, 2021 at 8:11 PM Felix Kuehling wrote: Am 2021-03-08 um 2:05 p.m. schrieb Arnd Bergmann: On Mon, Mar 8, 2021 at 5:24 PM Felix Kuehling wrote: The driver build should work without IOM

Re: [PATCH 1/1] drm/amdkfd: fix build error with AMD_IOMMU_V2=m

2021-03-09 Thread Christian König
Am 09.03.21 um 18:59 schrieb Alex Deucher: On Tue, Mar 9, 2021 at 12:55 PM Jean-Philippe Brucker wrote: Hi Felix, On Tue, Mar 09, 2021 at 11:30:19AM -0500, Felix Kuehling wrote: I think the proper fix would be to not rely on custom hooks into a particular IOMMU driver, but to instead ensure t

Re: [PATCH v2 1/1] drm/amdkfd: fix build error with AMD_IOMMU_V2=m

2021-03-11 Thread Christian König
64d1c3a43a6f ("drm/amdkfd: Centralize IOMMUv2 code and make it conditional") Reported-by: Arnd Bergmann Signed-off-by: Felix Kuehling Ping. Can I get an R-b for this patch. Reviewed-by: Christian König Thanks,   Felix ---   drivers/gpu/drm/amd/amdkfd/kfd_iommu.c | 6 ++   d

Re: [PATCH 1/2] drm/amdgpu: fix compile error on architecture s390

2021-03-11 Thread Christian König
Am 11.03.21 um 04:29 schrieb Oak Zeng: ioremap_cache is not supported on some architecture such as s390. Put the codes into a #ifdef to fix some compile error reported by test robot. Signed-off-by: Oak Zeng Reported-by: Kernel test robot Reviewed-by: Christian König for the series

Re: [PATCH v2 0/3] drm/amdgpu: Remove in_interrupt() usage.

2021-03-11 Thread Christian König
Hi Sebastian, Am 10.03.21 um 18:47 schrieb Sebastian Andrzej Siewior: On 2021-02-09 18:43:54 [+0100], Christian König wrote: to be honest I'm thinking about that for quite some time now and I don't think that this is possible without a severe rewrite of the driver. The problem is s

Re: [Linaro-mm-sig] [PATCH 1/2] dma-buf: Require VM_PFNMAP vma for mmap

2021-03-11 Thread Christian König
Am 11.03.21 um 14:17 schrieb Daniel Vetter: [SNIP] So I did the following quick experiment on vmwgfx, and it turns out that with it, fast gup never succeeds. Without the "| PFN_MAP", it typically succeeds I should probably craft an RFC formalizing this. Yeah I think that would be good. Mayb

Re: vmwgfx leaking bo pins?

2021-03-12 Thread Christian König
Am 12.03.21 um 00:02 schrieb Zack Rusin: On Mar 11, 2021, at 17:35, Thomas Hellström (Intel) wrote: Hi, Zack On 3/11/21 10:07 PM, Zack Rusin wrote: On Mar 11, 2021, at 05:46, Thomas Hellström (Intel) wrote: Hi, I tried latest drm-fixes today and saw a lot of these: Fallout from ttm r

[PATCH] drm/ttm: make ttm_bo_unpin more defensive

2021-03-12 Thread Christian König
We seem to have some more driver bugs than thought. Signed-off-by: Christian König --- include/drm/ttm/ttm_bo_api.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h index 4fb523dfab32..df9fe596e7c5 100644 --- a

[PATCH] drm/ttm: fix warning in new sys man

2021-05-03 Thread Christian König
Include the header for the prototype. Signed-off-by: Christian König Reported-by: kernel test robot --- drivers/gpu/drm/ttm/ttm_sys_manager.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm_sys_manager.c b/drivers/gpu/drm/ttm/ttm_sys_manager.c index f754d2c965f1

Re: [Mesa-dev] [RFC] Linux Graphics Next: Explicit fences everywhere and no BO fences - initial proposal

2021-05-03 Thread Christian König
lex Deucher wrote: On Sat, May 1, 2021 at 6:27 PM Marek Olšák wrote: On Wed, Apr 28, 2021 at 5:07 AM Michel Dänzer wrote: On 2021-04-28 8:59 a.m., Christian König wrote: Hi Dave, Am 27.04.21 um 21:23 schrieb Marek Olšák: Supporting interop with any device is always possible. It depends o

Re: [PATCH 1/1] drm/vmwgfx: free ttm resource before assigning a new one

2021-05-03 Thread Christian König
Am 03.05.21 um 19:26 schrieb Nirmoy Das: TTM BO resource need to be freed before calling ttm_bo_assign_mem(). Signed-off-by: Nirmoy Das --- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu

Re: [PATCH 1/1] drm/vmwgfx: use ttm_bo_move_null() when there is nothing to move

2021-05-03 Thread Christian König
Am 03.05.21 um 21:00 schrieb Nirmoy Das: Use ttm_bo_move_null() instead of ttm_bo_assign_mem(). Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm

Re: [Mesa-dev] [RFC] Linux Graphics Next: Explicit fences everywhere and no BO fences - initial proposal

2021-05-04 Thread Christian König
--Jason > > > > On Mon, May 3, 2021 at 9:42 AM Alex Deucher mailto:alexdeuc...@gmail.com>> wrote: > > > > > > On Sat, May 1, 2021 at 6:27 PM Marek Olšák mailto:mar...@gmail.com>> wrote: > > > >

Re: [PATCH v5 06/27] drm/amdgpu: Handle IOMMU enabled case.

2021-05-04 Thread Christian König
Am 03.05.21 um 22:43 schrieb Andrey Grodzovsky: On 2021-04-29 3:08 a.m., Christian König wrote: Am 28.04.21 um 17:11 schrieb Andrey Grodzovsky: Handle all DMA IOMMU gropup related dependencies before the group is removed. v5: Drop IOMMU notifier and switch to lockless call to

Re: [Mesa-dev] [RFC] Linux Graphics Next: Explicit fences everywhere and no BO fences - initial proposal

2021-05-04 Thread Christian König
Am 04.05.21 um 09:32 schrieb Daniel Vetter: On Tue, May 04, 2021 at 09:01:23AM +0200, Christian König wrote: Unfortunately as I pointed out to Daniel as well this won't work 100% reliable either. You're claiming this, but there's no clear reason why really, and you did't r

Re: [Mesa-dev] [RFC] Linux Graphics Next: Explicit fences everywhere and no BO fences - initial proposal

2021-05-04 Thread Christian König
Am 04.05.21 um 10:27 schrieb Daniel Vetter: On Tue, May 4, 2021 at 10:09 AM Christian König wrote: Am 04.05.21 um 09:32 schrieb Daniel Vetter: On Tue, May 04, 2021 at 09:01:23AM +0200, Christian König wrote: Unfortunately as I pointed out to Daniel as well this won't work 100% rel

Re: [Mesa-dev] [RFC] Linux Graphics Next: Explicit fences everywhere and no BO fences - initial proposal

2021-05-04 Thread Christian König
Am 04.05.21 um 11:47 schrieb Daniel Vetter: [SNIP] Yeah, it just takes to long for the preemption to complete to be really useful for the feature we are discussing here. As I said when the kernel requests to preempt a queue we can easily expect a timeout of ~100ms until that comes back. For com

Re: [Mesa-dev] [RFC] Linux Graphics Next: Explicit fences everywhere and no BO fences - initial proposal

2021-05-04 Thread Christian König
Am 04.05.21 um 13:13 schrieb Daniel Vetter: On Tue, May 4, 2021 at 12:53 PM Christian König wrote: Am 04.05.21 um 11:47 schrieb Daniel Vetter: [SNIP] Yeah, it just takes to long for the preemption to complete to be really useful for the feature we are discussing here. As I said when the

[RFC] Implicit vs explicit user fence sync

2021-05-04 Thread Christian König
Hi guys, with this patch set I want to look into how much more additional work it would be to support implicit sync compared to only explicit sync. Turned out that this is much simpler than expected since the only addition is that before a command submission or flip the kernel and classic drive

[PATCH 02/12] RDMA/mlx5: add DMA-buf user fence support

2021-05-04 Thread Christian König
Just add the call before taking locks. Signed-off-by: Christian König --- drivers/infiniband/hw/mlx5/odp.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/infiniband/hw/mlx5/odp.c b/drivers/infiniband/hw/mlx5/odp.c index b103555b1f5d..6b4d980c02e8 100644 --- a/drivers/infiniband

[PATCH 01/12] dma-buf: add interface for user fence synchronization

2021-05-04 Thread Christian König
This is a RFC/WIP patch which just adds the interface and lockdep annotation without any actual implementation. Signed-off-by: Christian König --- drivers/dma-buf/dma-resv.c | 18 ++ include/linux/dma-resv.h | 1 + 2 files changed, 19 insertions(+) diff --git a/drivers/dma

[PATCH 03/12] drm/amdgpu: add DMA-buf user fence support

2021-05-04 Thread Christian König
Just add the call before taking locks. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 7 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 6 ++ 2 files changed, 13 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm

[PATCH 04/12] drm/gem: dd DMA-buf user fence support for the atomic helper

2021-05-04 Thread Christian König
Just add the call before taking locks. Signed-off-by: Christian König --- drivers/gpu/drm/drm_gem_atomic_helper.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/drm_gem_atomic_helper.c b/drivers/gpu/drm/drm_gem_atomic_helper.c index a005c5a0ba46..fe0d18486643 100644

[PATCH 06/12] drm/i915: add DMA-buf user fence support

2021-05-04 Thread Christian König
Just add the call before taking locks. Signed-off-by: Christian König --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c index 5964e67c7d36

[PATCH 05/12] drm/etnaviv: add DMA-buf user fence support

2021-05-04 Thread Christian König
Just add the call before taking locks. Signed-off-by: Christian König --- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 23 ++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c b/drivers/gpu/drm/etnaviv

[PATCH 09/12] drm/nouveau: add DMA-buf user fence support

2021-05-04 Thread Christian König
Just add the call before taking locks. Signed-off-by: Christian König --- drivers/gpu/drm/nouveau/nouveau_gem.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index a70e82413fa7..e349a8b32549

[PATCH 11/12] drm/radeon: add DMA-buf user fence support

2021-05-04 Thread Christian König
Just add the call before taking locks. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon_cs.c | 6 ++ drivers/gpu/drm/radeon/radeon_display.c | 4 2 files changed, 10 insertions(+) diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon

[PATCH 07/12] drm/lima: add DMA-buf user fence support

2021-05-04 Thread Christian König
Just add the call before taking locks. Signed-off-by: Christian König --- drivers/gpu/drm/lima/lima_gem.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/lima/lima_gem.c b/drivers/gpu/drm/lima/lima_gem.c index de62966243cd..d3d68218568d 100644 --- a/drivers/gpu/drm

[PATCH 08/12] drm/msm: add DMA-buf user fence support

2021-05-04 Thread Christian König
Just add the call before taking locks. Signed-off-by: Christian König --- drivers/gpu/drm/msm/msm_gem_submit.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c index 5480852bdeda..a77389ce23d0

[PATCH 12/12] drm/v3d: add DMA-buf user fence support

2021-05-04 Thread Christian König
Just add the call before taking locks. Signed-off-by: Christian König --- drivers/gpu/drm/v3d/v3d_gem.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c index 4eb354226972..7c45292c641c 100644 --- a/drivers/gpu/drm/v3d

[PATCH 10/12] drm/panfrost: add DMA-buf user fence support

2021-05-04 Thread Christian König
Just add the call before taking locks. Signed-off-by: Christian König --- drivers/gpu/drm/panfrost/panfrost_job.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c index 6003cfeb1322

Re: [RFC] Implicit vs explicit user fence sync

2021-05-04 Thread Christian König
Hi Daniel, Am 04.05.21 um 16:15 schrieb Daniel Vetter: Hi Christian, On Tue, May 04, 2021 at 03:27:17PM +0200, Christian König wrote: Hi guys, with this patch set I want to look into how much more additional work it would be to support implicit sync compared to only explicit sync. Turned

Re: [5.12 regression] ttm->pages NULL dereference with radeon driver

2021-05-07 Thread Christian König
Hi Takashi, Am 07.05.21 um 17:08 schrieb Takashi Iwai: Hi, we've received a regression report showing NULL dereference Oops with radeon driver on 5.12 kernel: https://bugzilla.opensuse.org/show_bug.cgi?id=1185516 It turned out that the recent TTM cleanup / refactoring via commit 0575ff3d33c

Re: [PATCH 0/4] drm: Mark DRM's AGP code as legacy

2021-05-07 Thread Christian König
Acked-by: Christian König Am 07.05.21 um 20:57 schrieb Thomas Zimmermann: This patch moves the DRM core's AGP code behind CONFIG_DRM_LEGACY. The only use besides legacy, UMS drivers is radeon, which can implement the required functionality by itself. This patchset has no impact on th

Re: [PATCH] drm/amd/amdgpu: Fix errors in function documentation

2021-05-09 Thread Christian König
Am 09.05.21 um 16:49 schrieb Dwaipayan Ray: Fix a couple of syntax errors and removed one excess parameter in the function documentations which lead to kernel docs build warning. Signed-off-by: Dwaipayan Ray Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3

Re: [RFC] Implicit vs explicit user fence sync

2021-05-10 Thread Christian König
Am 04.05.21 um 17:11 schrieb Daniel Vetter: On Tue, May 04, 2021 at 04:26:42PM +0200, Christian König wrote: Hi Daniel, Am 04.05.21 um 16:15 schrieb Daniel Vetter: Hi Christian, On Tue, May 04, 2021 at 03:27:17PM +0200, Christian König wrote: Hi guys, with this patch set I want to look

Re: [PATCH v6 01/16] drm/ttm: Remap all page faults to per process dummy page.

2021-05-10 Thread Christian König
Am 10.05.21 um 18:36 schrieb Andrey Grodzovsky: On device removal reroute all CPU mappings to dummy page. v3: Remove loop to find DRM file and instead access it by vma->vm_file->private_data. Move dummy page installation into a separate function. v4: Map the entire BOs VA space into on demand a

Re: [PATCH v6 04/16] drm/amdkfd: Split kfd suspend from devie exit

2021-05-10 Thread Christian König
Am 10.05.21 um 18:36 schrieb Andrey Grodzovsky: Helps to expdite HW related stuff to amdgpu_pci_remove Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_device.c| 3 ++

Re: [PATCH v6 05/16] drm/amdgpu: Add early fini callback

2021-05-10 Thread Christian König
Am 10.05.21 um 18:36 schrieb Andrey Grodzovsky: Use it to call disply code dependent on device->drv_data before it's set to NULL on device unplug v5: Move HW finilization into this callback to prevent MMIO accesses post cpi remove. Signed-off-by: Andrey Grodzovsky Acked-by: C

Re: [PATCH v6 06/16] drm/amdgpu: Handle IOMMU enabled case.

2021-05-10 Thread Christian König
Am 10.05.21 um 18:36 schrieb Andrey Grodzovsky: Handle all DMA IOMMU gropup related dependencies before the group is removed. v5: Drop IOMMU notifier and switch to lockless call to ttm_tt_unpopulate v6: Drop the BO unamp list Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/am

Re: [PATCH v6 10/16] drm/amdgpu: Guard against write accesses after device removal

2021-05-10 Thread Christian König
Am 10.05.21 um 18:36 schrieb Andrey Grodzovsky: This should prevent writing to memory or IO ranges possibly already allocated for other uses after our device is removed. v5: Protect more places wher memcopy_to/form_io takes place Protect IB submissions v6: Switch to !drm_dev_enter instead of sc

Re: [PATCH v6 11/16] drm/sched: Make timeout timer rearm conditional.

2021-05-10 Thread Christian König
Am 10.05.21 um 18:36 schrieb Andrey Grodzovsky: We don't want to rearm the timer if driver hook reports that the device is gone. v5: Update drm_gpu_sched_stat values in code. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König --- drivers/gpu/drm/scheduler/sched_main.c

Re: [PATCH v6 12/16] drm/amdgpu: Prevent any job recoveries after device is unplugged.

2021-05-10 Thread Christian König
: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c index 759b34799221..d33e6d97cc89 100644 --- a/drivers/gpu/drm/amd

Re: [PATCH v6 13/16] drm/amdgpu: Fix hang on device removal.

2021-05-10 Thread Christian König
Am 10.05.21 um 18:36 schrieb Andrey Grodzovsky: If removing while commands in flight you cannot wait to flush the HW fences on a ring since the device is gone. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 16 ++-- 1 file changed, 10 insertio

Re: [PATCH v6 16/16] drm/amdgpu: Verify DMA opearations from device are done

2021-05-10 Thread Christian König
Am 10.05.21 um 18:36 schrieb Andrey Grodzovsky: In case device remove is just simualted by sysfs then verify device doesn't keep doing DMA to the released memory after pci_remove is done. Signed-off-by: Andrey Grodzovsky Acked-by: Christian König --- drivers/gpu/drm/amd/a

Re: [PATCH] drm/ttm: use dma_alloc_pages for the page pool

2021-05-11 Thread Christian König
Am 11.05.21 um 08:05 schrieb Christoph Hellwig: Use the dma_alloc_pages allocator for the TTM pool allocator. This allocator is a front end to the page allocator which takes the DMA mask of the device into account, thus offering the best of both worlds of the two existing allocator versions. Thi

Re: [RFC] Implicit vs explicit user fence sync

2021-05-11 Thread Christian König
Am 11.05.21 um 09:31 schrieb Daniel Vetter: [SNIP] And that's just the one ioctl I know is big trouble, I'm sure we'll find more funny corner cases when we roll out explicit user fencing. I think we can just ignore sync_file. As far as it concerns me that UAPI is pretty much dead. Uh that's ra

Re: [PATCH] drm/ttm: use dma_alloc_pages for the page pool

2021-05-11 Thread Christian König
Am 11.05.21 um 10:50 schrieb Christoph Hellwig: On Tue, May 11, 2021 at 09:35:20AM +0200, Christian König wrote: We certainly going to need the drm_need_swiotlb() for userptr support (unless we add some approach for drivers to opt out of swiotlb). swiotlb use is driven by three things: 1

Re: [PATCH 6/7] drm/i915/ttm, drm/ttm: Introduce a TTM i915 gem object backend

2021-05-11 Thread Christian König
arate patches for the TTM changes and for the i915 changes using them for easier review. Christian. Remove the old lmem backend. Cc: Christian König Signed-off-by: Thomas Hellström --- drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/gem/i915_gem_lmem.c

Re: [PATCH 6/7] drm/i915/ttm, drm/ttm: Introduce a TTM i915 gem object backend

2021-05-11 Thread Christian König
Am 11.05.21 um 16:06 schrieb Thomas Hellström (Intel): On 5/11/21 3:58 PM, Christian König wrote: Am 11.05.21 um 15:25 schrieb Thomas Hellström: Most logical place to introduce TTM buffer objects is as an i915 gem object backend. We need to add some ops to account for added functionality

Re: [PATCH v6 01/16] drm/ttm: Remap all page faults to per process dummy page.

2021-05-11 Thread Christian König
Am 11.05.21 um 16:44 schrieb Andrey Grodzovsky: On 2021-05-11 2:38 a.m., Christian König wrote: Am 10.05.21 um 18:36 schrieb Andrey Grodzovsky: On device removal reroute all CPU mappings to dummy page. v3: Remove loop to find DRM file and instead access it by vma->vm_file->privat

Re: [RFC] Implicit vs explicit user fence sync

2021-05-11 Thread Christian König
Am 11.05.21 um 16:23 schrieb Daniel Vetter: On Tue, May 11, 2021 at 09:47:56AM +0200, Christian König wrote: Am 11.05.21 um 09:31 schrieb Daniel Vetter: [SNIP] And that's just the one ioctl I know is big trouble, I'm sure we'll find more funny corner cases when we roll ou

Re: [RFC] Implicit vs explicit user fence sync

2021-05-11 Thread Christian König
Am 11.05.21 um 18:48 schrieb Daniel Vetter: [SNIP] Why? If you allow implicit fencing then you can end up with - an implicit userspace fence as the in-fence - but an explicit dma_fence as the out fence Which is not allowed. So there's really no way to make this work, except if you stall in the

Re: [PATCH 6/7] drm/i915/ttm, drm/ttm: Introduce a TTM i915 gem object backend

2021-05-11 Thread Christian König
Am 11.05.21 um 16:28 schrieb Thomas Hellström: On 5/11/21 4:09 PM, Christian König wrote: Am 11.05.21 um 16:06 schrieb Thomas Hellström (Intel): On 5/11/21 3:58 PM, Christian König wrote: Am 11.05.21 um 15:25 schrieb Thomas Hellström: Most logical place to introduce TTM buffer objects is

Re: [PATCH 6/7] drm/i915/ttm, drm/ttm: Introduce a TTM i915 gem object backend

2021-05-12 Thread Christian König
Am 12.05.21 um 09:05 schrieb Thomas Hellström: On Wed, 2021-05-12 at 08:57 +0200, Christian König wrote: Am 11.05.21 um 16:28 schrieb Thomas Hellström: On 5/11/21 4:09 PM, Christian König wrote: Am 11.05.21 um 16:06 schrieb Thomas Hellström (Intel): On 5/11/21 3:58 PM, Christian König wrote

Re: [RFC] Implicit vs explicit user fence sync

2021-05-12 Thread Christian König
Am 12.05.21 um 10:13 schrieb Daniel Vetter: On Tue, May 11, 2021 at 09:34:11PM +0200, Christian König wrote: Am 11.05.21 um 18:48 schrieb Daniel Vetter: [SNIP] Why? If you allow implicit fencing then you can end up with - an implicit userspace fence as the in-fence - but an explicit

Re: [5.12 regression] ttm->pages NULL dereference with radeon driver

2021-05-12 Thread Christian König
Hi guys, adding a few people who ran into the problem as well and opened a kernel bug. Am 07.05.21 um 17:11 schrieb Christian König: Hi Takashi, Am 07.05.21 um 17:08 schrieb Takashi Iwai: Hi, we've received a regression report showing NULL dereference Oops with radeon driver on

Re: [PATCH 6/7] drm/i915/ttm, drm/ttm: Introduce a TTM i915 gem object backend

2021-05-12 Thread Christian König
Am 12.05.21 um 15:02 schrieb Thomas Hellström: On Wed, 2021-05-12 at 09:09 +0200, Christian König wrote: Am 12.05.21 um 09:05 schrieb Thomas Hellström: On Wed, 2021-05-12 at 08:57 +0200, Christian König wrote: Am 11.05.21 um 16:28 schrieb Thomas Hellström: On 5/11/21 4:09 PM, Christian König

Re: [PATCH v6 10/16] drm/amdgpu: Guard against write accesses after device removal

2021-05-12 Thread Christian König
I can give you is an Acked-by for that. Christian. Andrey On 2021-05-11 1:52 p.m., Andrey Grodzovsky wrote: On 2021-05-11 2:50 a.m., Christian König wrote: Am 10.05.21 um 18:36 schrieb Andrey Grodzovsky: This should prevent writing to memory or IO ranges possibly already allocated for other

Re: [PATCH] drm/amdgpu: Fix GPU TLB update error when PAGE_SIZE > AMDGPU_PAGE_SIZE

2021-05-14 Thread Christian König
-by: Huacai Chen Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 3bef0432cac2..a376a993e474 100644 --- a

Re: [PATCH 0/7] Per client engine busyness

2021-05-14 Thread Christian König
Well in my opinion exposing it through fdinfo turned out to be a really clean approach. It describes exactly the per file descriptor information we need. Making that device driver independent is potentially useful as well. Regards, Christian. Am 14.05.21 um 09:22 schrieb Nieto, David M: [AM

Re: [PATCH 0/7] Per client engine busyness

2021-05-14 Thread Christian König
sees which process has that file open. So even with sysfs aid for discovery you are back to just going over all files again. Regards, Christian. Am 14.05.21 um 15:42 schrieb Tvrtko Ursulin: On 14/05/2021 09:04, Christian König wrote: Well in my opinion exposing it through fdinfo turned out to be

Re: [PATCH 0/7] Per client engine busyness

2021-05-14 Thread Christian König
Am 14.05.21 um 16:47 schrieb Tvrtko Ursulin: On 14/05/2021 14:53, Christian König wrote: David also said that you considered sysfs but were wary of exposing process info in there. To clarify, my patch is not exposing sysfs entry per process, but one per open drm fd. Yes, we discussed

Re: [PATCH 0/7] Per client engine busyness

2021-05-14 Thread Christian König
Am 14.05.21 um 17:03 schrieb Tvrtko Ursulin: On 14/05/2021 15:56, Christian König wrote: Am 14.05.21 um 16:47 schrieb Tvrtko Ursulin: On 14/05/2021 14:53, Christian König wrote: David also said that you considered sysfs but were wary of exposing process info in there. To clarify, my patch

Re: [PATCH 1/4] drm/amdgpu: Use %p4cc to print 4CC format

2021-05-16 Thread Christian König
Am 16.05.21 um 14:13 schrieb Thomas Zimmermann: Replace use of struct drm_format_name_buf with %p4cc for printing 4CC formats. Signed-off-by: Thomas Zimmermann Acked-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 7 ++- 1 file changed, 2 insertions(+), 5

[PATCH] dma-buf: fix unintended pin/unpin warnings

2021-05-17 Thread Christian König
DMA-buf internal users call the pin/unpin functions without having a dynamic attachment. Avoid the warning and backtrace in the logs. Signed-off-by: Christian König Bugs: https://gitlab.freedesktop.org/drm/intel/-/issues/3481 Fixes: c545781e1c55 ("dma-buf: doc polish for pin/unpin"

[PATCH 01/11] dma-buf: fix invalid debug print

2021-05-17 Thread Christian König
The code tries to acquire the rcu protected fence list, but then ignores individual fences which has been modified while holding the rcu. Stop that madness and just note cleanly that the list was concurrently modified. Signed-off-by: Christian König --- drivers/dma-buf/dma-buf.c | 19

[RFC] Add DMA_RESV_USAGE flags

2021-05-17 Thread Christian König
We had a long outstanding problem in amdgpu that buffers exported to user drivers by DMA-buf serialize all command submissions using them. In other words we can't compose the buffer with different engines and then send it to another driver for display further processing. This was added to work

[PATCH 02/11] dma-buf: add SPDX header and fix style in dma-resv.c

2021-05-17 Thread Christian König
No functional change. Signed-off-by: Christian König --- drivers/dma-buf/dma-resv.c | 128 +++-- 1 file changed, 65 insertions(+), 63 deletions(-) diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c index 6ddbeb5dfbf6..87f5d82d992a 100644 --- a

[PATCH 03/11] dma-buf: cleanup dma-resv shared fence debugging a bit

2021-05-17 Thread Christian König
Make that a function instead of inline. Signed-off-by: Christian König --- drivers/dma-buf/dma-resv.c | 18 ++ include/linux/dma-resv.h | 15 +++ 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c

[PATCH 09/11] dma-buf: add shared fence usage flags

2021-05-17 Thread Christian König
Add usage flags for shared fences and improve the documentation. This allows driver to better specify what shared fences are doing with the resource. Signed-off-by: Christian König --- drivers/dma-buf/dma-resv.c| 132 +- .../gpu/drm/amd/amdgpu

[PATCH 04/11] dma-buf: rename and cleanup dma_resv_get_excl

2021-05-17 Thread Christian König
When the comment needs to state explicitly that this doesn't get a reference to the object then the function is named rather badly. Rename the function and use rcu_dereference_check(), this way it can be used from both rcu as well as lock protected critical sections. Signed-off-by: Chri

[PATCH 11/11] drm/amdgpu: fix shared access to exported DMA-bufs

2021-05-17 Thread Christian König
We are running into more and more problems with that approach since every command submission to the buffer in question is now serializing. Since the i915 where we originally added that for is now fixed we should be able to remove this. Signed-off-by: Christian König --- drivers/gpu/drm/amd

[PATCH 05/11] dma-buf: rename and cleanup dma_resv_get_list

2021-05-17 Thread Christian König
When the comment needs to state explicitly that this is doesn't get a reference to the object then the function is named rather badly. Rename the function and use it in even more places. Signed-off-by: Christian König --- drivers/dma-buf/dma-resv.c

[PATCH 07/11] dma-buf: add dma_resv_replace_shared

2021-05-17 Thread Christian König
This function allows to replace fences from the shared fence list when we can gurantee that the operation represented by the original fence has finished or no accesses to the resources protected by the dma_resv object any more when the new fence finishes. Signed-off-by: Christian König

[PATCH 08/11] dma-buf: improve shared fence abstraction

2021-05-17 Thread Christian König
Put access to the shared fences behind an interator. This way we don't need to expose the internal implementation any more. Signed-off-by: Christian König --- drivers/dma-buf/dma-buf.c | 46 ++-- drivers/dma-buf/dma-resv.c

[PATCH 10/11] drm/i915: also wait for shared dmabuf fences before flip

2021-05-17 Thread Christian König
Add dependencies for implicit sync to shared fences as well to i915. This was lengthy discussed about four years ago, but since the workaround we did in amdgpu is now causing more and more problems we need to fix this properly. Signed-off-by: Christian König --- drivers/gpu/drm/i915/display

[PATCH 06/11] dma-buf: add dma_resv_list_fence helper

2021-05-17 Thread Christian König
Instead of repeating the access check over and over again. Signed-off-by: Christian König --- drivers/dma-buf/dma-resv.c | 42 +++--- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c index

Re: [PATCH 0/7] Per client engine busyness

2021-05-17 Thread Christian König
Am 17.05.21 um 16:30 schrieb Daniel Vetter: [SNIP] Could be that i915 has some special code for that, but on my laptop I only see the X server under the "clients" debugfs file. Yes we have special code in i915 for this. Part of this series we are discussing here. Ah, yeah you should mention th

Re: [RFC] Add DMA_RESV_USAGE flags

2021-05-17 Thread Christian König
Am 17.05.21 um 17:04 schrieb Daniel Vetter: On Mon, May 17, 2021 at 04:11:18PM +0200, Christian König wrote: We had a long outstanding problem in amdgpu that buffers exported to user drivers by DMA-buf serialize all command submissions using them. In other words we can't compose the b

Re: [PATCH v7 12/16] drm/amdgpu: Fix hang on device removal.

2021-05-17 Thread Christian König
You need to note who you are pinging here. I'm still assuming you wait for feedback from Daniel. Or should I take a look? Christian. Am 17.05.21 um 16:40 schrieb Andrey Grodzovsky: Ping Andrey On 2021-05-14 10:42 a.m., Andrey Grodzovsky wrote: Ping Andrey On 2021-05-12 10:26 a.m., Andre

Re: [PATCH v7 12/16] drm/amdgpu: Fix hang on device removal.

2021-05-17 Thread Christian König
Ok, then putting that on my TODO list for tomorrow. I've already found a problem with how we finish of fences, going to write more on this tomorrow. Christian. Am 17.05.21 um 21:46 schrieb Andrey Grodzovsky: Yep, you can take a look. Andrey On 2021-05-17 3:39 p.m., Christian König

Re: [PATCH v2 04/15] drm/ttm: Export functions to initialize and finalize the ttm range manager standalone

2021-05-18 Thread Christian König
, but to be honest I don't think that this makes much sense from the organizational point of view. If a self test exercises internals of TTM it should be moved into TTM as well. Christian. Cc: Christian König Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_range_manager.c

Re: [PATCH v2 08/15] drm/i915/ttm Add a generic TTM memcpy move for page-based iomem

2021-05-18 Thread Christian König
when done. Regards, Christian. Cc: Christian König Signed-off-by: Thomas Hellström --- v2: - Move new TTM exports to a separate commit. (Reported by Christian König) - Avoid having the iterator init functions inline. (Reported by Jani Nikula) - Remove a stray comment. --- drivers/gpu/drm/i91

Re: [Intel-gfx] [PATCH v2 13/15] drm/ttm: Add BO and offset arguments for vm_access and vm_fault ttm handlers.

2021-05-18 Thread Christian König
Can you send me the patch directly and not just on CC? Thanks, Christian. Am 18.05.21 um 10:59 schrieb Thomas Hellström: + Christian König On 5/18/21 10:26 AM, Thomas Hellström wrote: From: Maarten Lankhorst This allows other drivers that may not setup the vma in the same way to use the

Re: [PATCH v2 07/15] drm/ttm: Export ttm_bo_tt_destroy()

2021-05-18 Thread Christian König
o not export those functions any more since this is not something drivers should be allowed to mess with. If you need this we should probably move the functionality into TTM instead. Regards, Christian. Cc: Christian König Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_bo.

Re: [PATCH 0/7] Per client engine busyness

2021-05-18 Thread Christian König
Am 18.05.21 um 11:35 schrieb Tvrtko Ursulin: On 17/05/2021 19:02, Nieto, David M wrote: [AMD Official Use Only] The format is simple: : % Hm what time period does the percent relate to? The i915 implementation uses accumulated nanoseconds active. That way who reads the file can calculat

Re: [PATCH v2 08/15] drm/i915/ttm Add a generic TTM memcpy move for page-based iomem

2021-05-18 Thread Christian König
Am 18.05.21 um 14:04 schrieb Thomas Hellström: On 5/18/21 1:55 PM, Christian König wrote: Am 18.05.21 um 10:26 schrieb Thomas Hellström: The internal ttm_bo_util memcpy uses vmap functionality, and while it probably might be possible to use it for copying in- and out of sglist represented

Re: [RFC] Add DMA_RESV_USAGE flags

2021-05-18 Thread Christian König
Hi Jason & Daniel, Am 18.05.21 um 07:59 schrieb Daniel Vetter: On Tue, May 18, 2021 at 12:49 AM Jason Ekstrand wrote: On Mon, May 17, 2021 at 3:15 PM Daniel Vetter wrote: On Mon, May 17, 2021 at 9:38 PM Christian König wrote: Am 17.05.21 um 17:04 schrieb Daniel Vetter: On Mon, Ma

Re: [PATCH 09/11] dma-buf: add shared fence usage flags

2021-05-18 Thread Christian König
Am 17.05.21 um 22:36 schrieb Daniel Vetter: On Mon, May 17, 2021 at 04:11:27PM +0200, Christian König wrote: Add usage flags for shared fences and improve the documentation. This allows driver to better specify what shared fences are doing with the resource. Signed-off-by: Christian König

Re: [PATCH v2 08/15] drm/i915/ttm Add a generic TTM memcpy move for page-based iomem

2021-05-18 Thread Christian König
Am 18.05.21 um 14:52 schrieb Thomas Hellström: On 5/18/21 2:09 PM, Christian König wrote: Am 18.05.21 um 14:04 schrieb Thomas Hellström: On 5/18/21 1:55 PM, Christian König wrote: Am 18.05.21 um 10:26 schrieb Thomas Hellström: The internal ttm_bo_util memcpy uses vmap functionality, and

Re: [PATCH v2 04/15] drm/ttm: Export functions to initialize and finalize the ttm range manager standalone

2021-05-18 Thread Christian König
Am 18.05.21 um 15:06 schrieb Thomas Hellström: On 5/18/21 1:51 PM, Christian König wrote: Am 18.05.21 um 10:26 schrieb Thomas Hellström: i915 mock selftests are run without the device set up. In order to be able to run the region related mock selftests, export functions in order for the

Re: [PATCH v2 08/15] drm/i915/ttm Add a generic TTM memcpy move for page-based iomem

2021-05-18 Thread Christian König
Am 18.05.21 um 15:24 schrieb Thomas Hellström: On 5/18/21 3:08 PM, Christian König wrote: Am 18.05.21 um 14:52 schrieb Thomas Hellström: On 5/18/21 2:09 PM, Christian König wrote: Am 18.05.21 um 14:04 schrieb Thomas Hellström: On 5/18/21 1:55 PM, Christian König wrote: Am 18.05.21 um

Re: [RFC] Add DMA_RESV_USAGE flags

2021-05-18 Thread Christian König
Am 18.05.21 um 15:26 schrieb Daniel Stone: On Tue, 18 May 2021 at 13:49, Christian König wrote: Am 18.05.21 um 07:59 schrieb Daniel Vetter: First step in fixing that is (and frankly was since years) to fix the amdgpu CS so winsys can pass along a bunch of flags about which CS should actually

Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-18 Thread Christian König
rq due to race. v3: Drop drm_sched_rq_remove_entity, only modify entity->stopped and check for it in drm_sched_entity_is_idle Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König --- drivers/gpu/drm/scheduler/sched_entity.c | 3 ++- drivers/gpu/drm/scheduler/sched_main.c | 24 +

Re: [PATCH v2 13/15] drm/ttm: Add BO and offset arguments for vm_access and vm_fault ttm handlers.

2021-05-18 Thread Christian König
Am 18.05.21 um 16:55 schrieb Thomas Hellström: From: Maarten Lankhorst This allows other drivers that may not setup the vma in the same way to use the ttm bo helpers. Uff can you please explain why exactly you need that? Providing the BO is not much of a problem, but having the BO at differ

Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-18 Thread Christian König
Am 18.05.21 um 17:03 schrieb Andrey Grodzovsky: On 2021-05-18 10:07 a.m., Christian König wrote: In a separate discussion with Daniel we once more iterated over the dma_resv requirements and I came to the conclusion that this approach here won't work reliable. The problem is as followi

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