Re: [Nouveau] [PATCH drm-next v4 03/14] drm: manager to keep track of GPUs VA mappings

2023-06-06 Thread kernel test robot
Hi Danilo, kernel test robot noticed the following build warnings: [auto build test WARNING on 33a86170888b7e4aa0cea94ebb9c67180139cea9] url: https://github.com/intel-lab-lkp/linux/commits/Danilo-Krummrich/drm-execution-context-for-GEM-buffers-v4/20230607-063442 base:

Re: [Nouveau] [PATCH drm-next v4 04/14] drm: debugfs: provide infrastructure to dump a DRM GPU VA space

2023-06-06 Thread kernel test robot
Hi Danilo, kernel test robot noticed the following build warnings: [auto build test WARNING on 33a86170888b7e4aa0cea94ebb9c67180139cea9] url: https://github.com/intel-lab-lkp/linux/commits/Danilo-Krummrich/drm-execution-context-for-GEM-buffers-v4/20230607-063442 base:

[Nouveau] [PATCH drm-next v4 14/14] drm/nouveau: debugfs: implement DRM GPU VA debugfs

2023-06-06 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 v4 13/14] drm/nouveau: implement new VM_BIND uAPI

2023-06-06 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 v4 12/14] drm/nouveau: nvkm/vmm: implement raw ops to manage uvmm

2023-06-06 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 v4 10/14] drm/nouveau: fence: fail to emit when fence context is killed

2023-06-06 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 v4 11/14] drm/nouveau: chan: provide nouveau_channel_kill()

2023-06-06 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 v4 09/14] drm/nouveau: fence: separate fence alloc and emit

2023-06-06 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 v4 08/14] drm/nouveau: move usercopy helpers to nouveau_drv.h

2023-06-06 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 v4 06/14] drm/nouveau: get vmm via nouveau_cli_vmm()

2023-06-06 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 v4 07/14] drm/nouveau: bo: initialize GEM GPU VA interface

2023-06-06 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 v4 05/14] drm/nouveau: new VM_BIND uapi interfaces

2023-06-06 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 v4 04/14] drm: debugfs: provide infrastructure to dump a DRM GPU VA space

2023-06-06 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 v4 03/14] drm: manager to keep track of GPUs VA mappings

2023-06-06 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 v4 02/14] maple_tree: split up MA_STATE() macro

2023-06-06 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 v4 01/14] drm: execution context for GEM buffers v4

2023-06-06 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 v4 00/14] [RFC] DRM GPUVA Manager & Nouveau VM_BIND UAPI

2023-06-06 Thread Danilo Krummrich
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 DRM GPUVA manager is indented to help drivers implement userspace-manageable GPU VA spaces in reference to the Vulkan API. In order to achieve

Re: [Nouveau] [Intel-gfx] [PATCH v2 1/2] vgaarb: various coding style and comments fix

2023-06-06 Thread Bjorn Helgaas
Match the subject line style: $ git log --oneline drivers/pci/vgaarb.c f321c35feaee PCI/VGA: Replace full MIT license text with SPDX identifier d5109fe4d1ec PCI/VGA: Use unsigned format string to print lock counts 4e6c91847a7f PCI/VGA: Log bridge control messages when adding devices

Re: [Nouveau] [PATCH v2] drm/nouveau: bring back blit subchannel for pre nv50 GPUs

2023-06-06 Thread Karol Herbst
On Fri, May 26, 2023 at 5:21 PM Ilia Mirkin wrote: > > On Fri, May 26, 2023 at 5:11 AM Karol Herbst wrote: > > > > 1ba6113a90a0 removed a lot of the kernel GPU channel, but method 0x128 > > was important as otherwise the GPU spams us with `CACHE_ERROR` messages. > > > > We use the blit