[Nouveau] [PATCH drm-next v3 15/15] drm/nouveau: debugfs: implement DRM GPU VA debugfs

2023-04-03 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 v3 14/15] drm/nouveau: implement new VM_BIND uAPI

2023-04-03 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

Re: [Nouveau] [PATCH drm-next v3 05/15] drm: debugfs: provide infrastructure to dump a DRM GPU VA space

2023-04-03 Thread kernel test robot
Hi Danilo, kernel test robot noticed the following build warnings: [auto build test WARNING on d36d68fd1925d33066d52468b7c7c6aca6521248] url: https://github.com/intel-lab-lkp/linux/commits/Danilo-Krummrich/drm-execution-context-for-GEM-buffers-v3/20230404-093042 base:

Re: [Nouveau] [PATCH drm-next v3 13/15] drm/nouveau: nvkm/vmm: implement raw ops to manage uvmm

2023-04-03 Thread kernel test robot
: d36d68fd1925d33066d52468b7c7c6aca6521248 patch link: https://lore.kernel.org/r/20230404012741.116502-14-dakr%40redhat.com patch subject: [PATCH drm-next v3 13/15] drm/nouveau: nvkm/vmm: implement raw ops to manage uvmm config: arc-randconfig-r043-20230403 (https://download.01.org/0day-ci/archive/20230404

[Nouveau] [PATCH drm-next v3 04/15] drm: manager to keep track of GPUs VA mappings

2023-04-03 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 v3 05/15] drm: debugfs: provide infrastructure to dump a DRM GPU VA space

2023-04-03 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 v3 06/15] drm/nouveau: new VM_BIND uapi interfaces

2023-04-03 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 v3 13/15] drm/nouveau: nvkm/vmm: implement raw ops to manage uvmm

2023-04-03 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/nouveau/disp: set varaiable gv100_disp_core_mthd_base storage-class-specifier to static

2023-04-03 Thread Tom Rix
smatch reports drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c:610:1: warning: symbol 'gv100_disp_core_mthd_base' was not declared. Should it be static? This variable is only used in one file so it should be static. Signed-off-by: Tom Rix --- drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c

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

2023-04-03 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

[Nouveau] [PATCH drm-next v3 10/15] drm/nouveau: fence: separate fence alloc and emit

2023-04-03 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 v3 01/15] drm: execution context for GEM buffers v3

2023-04-03 Thread Danilo Krummrich
From: Christian König This adds the infrastructure for an execution context for GEM buffers which is similar to the existinc 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 v3 02/15] drm_exec: fix double dma_resv unlock

2023-04-03 Thread Danilo Krummrich
Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/drm_exec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/drm_exec.c b/drivers/gpu/drm/drm_exec.c index df546cc5a227..f645d22a0863 100644 --- a/drivers/gpu/drm/drm_exec.c +++ b/drivers/gpu/drm/drm_exec.c @@ -62,7 +62,6 @@

[Nouveau] [PATCH drm-next v3 03/15] maple_tree: split up MA_STATE() macro

2023-04-03 Thread Danilo Krummrich
Split up the MA_STATE() macro such that components using the maple tree can easily inherit from struct ma_state and build custom tree walk macros to hide their internals from users. Example: struct sample_iterator { struct ma_state mas; struct sample_mgr *mgr; }; \#define

[Nouveau] [PATCH drm-next v3 07/15] drm/nouveau: get vmm via nouveau_cli_vmm()

2023-04-03 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 v3 08/15] drm/nouveau: bo: initialize GEM GPU VA interface

2023-04-03 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 v3 09/15] drm/nouveau: move usercopy helpers to nouveau_drv.h

2023-04-03 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 v3 11/15] drm/nouveau: fence: fail to emit when fence context is killed

2023-04-03 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 v3 12/15] drm/nouveau: chan: provide nouveau_channel_kill()

2023-04-03 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

Re: [Nouveau] [PATCH drm-next v3 04/15] drm: manager to keep track of GPUs VA mappings

2023-04-03 Thread kernel test robot
: d36d68fd1925d33066d52468b7c7c6aca6521248 patch link: https://lore.kernel.org/r/20230404012741.116502-5-dakr%40redhat.com patch subject: [PATCH drm-next v3 04/15] drm: manager to keep track of GPUs VA mappings config: mips-randconfig-r024-20230403 (https://download.01.org/0day-ci/archive/20230404/202304041336