[Nouveau] [PATCH] drm/nouveau: add missing spaces after ','

2023-07-13 Thread sunran001
Add missing spaces to clear checkpatch errors. ERROR: space required after that ',' (ctx:VxV) Signed-off-by: Ran Sun --- drivers/gpu/drm/nouveau/include/nvhw/drf.h | 80 +++--- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git

[Nouveau] [PATCH drm-next v7 12/13] drm/nouveau: implement new VM_BIND uAPI

2023-07-13 Thread Danilo Krummrich
This commit provides the implementation for the new uapi motivated by the Vulkan API. It allows user mode drivers (UMDs) to: 1) Initialize a GPU virtual address (VA) space via the new DRM_IOCTL_NOUVEAU_VM_INIT ioctl for UMDs to specify the portion of VA space managed by the kernel and

[Nouveau] [PATCH drm-next v7 13/13] drm/nouveau: debugfs: implement DRM GPU VA debugfs

2023-07-13 Thread Danilo Krummrich
Provide the driver indirection iterating over all DRM GPU VA spaces to enable the common 'gpuvas' debugfs file for dumping DRM GPU VA spaces. Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/nouveau/nouveau_debugfs.c | 39 +++ 1 file changed, 39 insertions(+) diff --git

[Nouveau] [PATCH drm-next v7 10/13] drm/nouveau: chan: provide nouveau_channel_kill()

2023-07-13 Thread Danilo Krummrich
The new VM_BIND UAPI implementation introduced in subsequent commits will allow asynchronous jobs processing push buffers and emitting fences. If a job times out, we need a way to recover from this situation. For now, simply kill the channel to unblock all hung up jobs and signal userspace that

[Nouveau] [PATCH drm-next v7 11/13] drm/nouveau: nvkm/vmm: implement raw ops to manage uvmm

2023-07-13 Thread Danilo Krummrich
The new VM_BIND UAPI uses the DRM GPU VA manager to manage the VA space. Hence, we a need a way to manipulate the MMUs page tables without going through the internal range allocator implemented by nvkm/vmm. This patch adds a raw interface for nvkm/vmm to pass the resposibility for managing the

[Nouveau] [PATCH drm-next v7 09/13] drm/nouveau: fence: fail to emit when fence context is killed

2023-07-13 Thread Danilo Krummrich
The new VM_BIND UAPI implementation introduced in subsequent commits will allow asynchronous jobs processing push buffers and emitting fences. If a fence context is killed, e.g. due to a channel fault, jobs which are already queued for execution might still emit new fences. In such a case a job

[Nouveau] [PATCH drm-next v7 08/13] drm/nouveau: fence: separate fence alloc and emit

2023-07-13 Thread Danilo Krummrich
The new (VM_BIND) UAPI exports DMA fences through DRM syncobjs. Hence, in order to emit fences within DMA fence signalling critical sections (e.g. as typically done in the DRM GPU schedulers run_job() callback) we need to separate fence allocation and fence emitting. Signed-off-by: Danilo

[Nouveau] [PATCH drm-next v7 07/13] drm/nouveau: move usercopy helpers to nouveau_drv.h

2023-07-13 Thread Danilo Krummrich
Move the usercopy helpers to a common driver header file to make it usable for the new API added in subsequent commits. Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/nouveau/nouveau_drv.h | 26 ++ drivers/gpu/drm/nouveau/nouveau_gem.c | 26

[Nouveau] [PATCH drm-next v7 06/13] drm/nouveau: bo: initialize GEM GPU VA interface

2023-07-13 Thread Danilo Krummrich
Initialize the GEM's DRM GPU VA manager interface in preparation for the (u)vmm implementation, provided by subsequent commits, to make use of it. Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/nouveau/nouveau_bo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[Nouveau] [PATCH drm-next v7 04/13] drm/nouveau: new VM_BIND uapi interfaces

2023-07-13 Thread Danilo Krummrich
This commit provides the interfaces for the new UAPI motivated by the Vulkan API. It allows user mode drivers (UMDs) to: 1) Initialize a GPU virtual address (VA) space via the new DRM_IOCTL_NOUVEAU_VM_INIT ioctl. UMDs can provide a kernel reserved VA area. 2) Bind and unbind GPU VA space

[Nouveau] [PATCH drm-next v7 03/13] drm: debugfs: provide infrastructure to dump a DRM GPU VA space

2023-07-13 Thread Danilo Krummrich
This commit adds a function to dump a DRM GPU VA space and a macro for drivers to register the struct drm_info_list 'gpuvas' entry. Most likely, most drivers might maintain one DRM GPU VA space per struct drm_file, but there might also be drivers not having a fixed relation between DRM GPU VA

[Nouveau] [PATCH drm-next v7 05/13] drm/nouveau: get vmm via nouveau_cli_vmm()

2023-07-13 Thread Danilo Krummrich
Provide a getter function for the client's current vmm context. Since we'll add a new (u)vmm context for UMD bindings in subsequent commits, this will keep the code clean. Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/nouveau/nouveau_bo.c | 2 +- drivers/gpu/drm/nouveau/nouveau_chan.c |

[Nouveau] [PATCH drm-next v7 02/13] drm: manager to keep track of GPUs VA mappings

2023-07-13 Thread Danilo Krummrich
Add infrastructure to keep track of GPU virtual address (VA) mappings with a decicated VA space manager implementation. New UAPIs, motivated by Vulkan sparse memory bindings graphics drivers start implementing, allow userspace applications to request multiple and arbitrary GPU VA mappings of

[Nouveau] [PATCH drm-next v7 01/13] drm: execution context for GEM buffers v7

2023-07-13 Thread Danilo Krummrich
From: Christian König This adds the infrastructure for an execution context for GEM buffers which is similar to the existing TTMs execbuf util and intended to replace it in the long term. The basic functionality is that we abstracts the necessary loop to lock many different GEM buffers with

[Nouveau] [PATCH drm-next v7 00/13] [RFC] DRM GPUVA Manager & Nouveau VM_BIND UAPI

2023-07-13 Thread Danilo Krummrich
This patch series provides a new UAPI for the Nouveau driver in order to support Vulkan features, such as sparse bindings and sparse residency. Furthermore, with the DRM GPUVA manager it provides a new DRM core feature to keep track of GPU virtual address (VA) mappings in a more generic way. The

Re: [Nouveau] [PATCH] drm/nouveau/iccsense:

2023-07-13 Thread Karol Herbst
On Thu, Jul 13, 2023 at 11:13 AM Karol Herbst wrote: > > On Mon, Jul 10, 2023 at 11:10 AM Bagas Sanjaya wrote: > > > > On Mon, Jul 10, 2023 at 03:06:47PM +0800, sunran...@208suo.com wrote: > > > Fixed error: 'do not use assignment in if condition' > > > > > > This patch fixes error: 'do not use

Re: [Nouveau] [PATCH] drm/nouveau/iccsense:

2023-07-13 Thread Karol Herbst
On Mon, Jul 10, 2023 at 11:10 AM Bagas Sanjaya wrote: > > On Mon, Jul 10, 2023 at 03:06:47PM +0800, sunran...@208suo.com wrote: > > Fixed error: 'do not use assignment in if condition' > > > > This patch fixes error: 'do not use assignment in if condition' > > in drm/nouveau/iccsense > > I guess

Re: [Nouveau] [PATCH] drm/nouveau/i2c: do not use assignment in if condition

2023-07-13 Thread Karol Herbst
On Mon, Jul 10, 2023 at 9:23 AM wrote: > > Assignments in if condition are less readable and error-prone. Fixes > also checkpatch warning: > > ERROR: do not use assignment in if condition > > Signed-off-by: Ran Sun > --- > drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c | 3 ++- > 1 file

Re: [Nouveau] [PATCH] drm/nouveau/nvkm: do not use assignment in if condition

2023-07-13 Thread Karol Herbst
On Mon, Jul 10, 2023 at 9:23 AM wrote: > > Assignments in if condition are less readable and error-prone. Fixes > also checkpatch warning: > > ERROR: do not use assignment in if condition > > Signed-off-by:Ran Sun > --- > drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c | 3 ++- > 1 file

Re: [Nouveau] [PATCH] drm/nouveau/pci: ERROR: "foo * bar" should be "foo *bar"

2023-07-13 Thread Karol Herbst
On Mon, Jul 10, 2023 at 9:23 AM wrote: > > Signed-off-by: Ran Sun > --- > drivers/gpu/drm/nouveau/nvkm/subdev/pci/gk104.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/pci/gk104.c >

Re: [Nouveau] [PATCH] drm/nouveau/i2c: do not use assignment in if condition

2023-07-13 Thread Karol Herbst
Reviewed-by: Karol Herbst On Mon, Jul 10, 2023 at 9:23 AM wrote: > > Assignments in if condition are less readable and error-prone. Fixes > also checkpatch warning: > > ERROR: do not use assignment in if condition > > Signed-off-by: Ran Sun > --- >