Re: [PATCH v3 07/14] drm/panthor: Add the MMU/VM logical block

2024-01-15 Thread Boris Brezillon
On Mon, 4 Dec 2023 18:33:00 +0100 Boris Brezillon wrote: > +static int panthor_gpuva_sm_step_remap(struct drm_gpuva_op *op, > +void *priv) > +{ > + struct panthor_vma *unmap_vma = container_of(op->remap.unmap->va, > struct panthor_vma, base); > + stru

Re: [PATCH v3 07/14] drm/panthor: Add the MMU/VM logical block

2024-01-15 Thread Boris Brezillon
On Mon, 4 Dec 2023 18:33:00 +0100 Boris Brezillon wrote: > +/** > + * panthor_vm_active() - Flag a VM as active > + * @VM: VM to flag as active. > + * > + * Assigns an address space to a VM so it can be used by the GPU/MCU. > + * > + * Return: 0 on success, a negative error code otherwise. > + *

Re: [PATCH v3 07/14] drm/panthor: Add the MMU/VM logical block

2024-01-15 Thread Boris Brezillon
On Mon, 4 Dec 2023 18:33:00 +0100 Boris Brezillon wrote: > +/** > + * panthor_vm_idle() - Flag a VM idle > + * @VM: VM to flag as idle. > + * > + * When we know the GPU is done with the VM (no more jobs to process), > + * we can relinquish the AS slot attached to this VM, if any. > + * > + * We

Re: [PATCH v3 07/14] drm/panthor: Add the MMU/VM logical block

2024-01-15 Thread Boris Brezillon
On Mon, 4 Dec 2023 18:33:00 +0100 Boris Brezillon wrote: > +static int panthor_vm_prepare_unmap_op_ctx(struct panthor_vm_op_ctx *op_ctx, > +struct panthor_vm *vm, > +u64 va, u64 size) > +{ > + u32 pt_count = 0; >

Re: [PATCH v3 07/14] drm/panthor: Add the MMU/VM logical block

2024-01-15 Thread Boris Brezillon
Hi Steve, On Fri, 8 Dec 2023 14:28:05 + Steven Price wrote: > > +/** > > + * alloc_pt() - Custom page table allocator > > + * @cookie: Cookie passed at page table allocation time. > > + * @size: Size of the page table. This size should be fixed, > > + * and determined at creation time based

Re: [PATCH v3 07/14] drm/panthor: Add the MMU/VM logical block

2023-12-08 Thread Steven Price
On 04/12/2023 17:33, Boris Brezillon wrote: > MMU and VM management is related and placed in the same source file. > > Page table updates are delegated to the io-pgtable-arm driver that's in > the iommu subsystem. > > The VM management logic is based on drm_gpuva_mgr, and is assuming the > VA spa

[PATCH v3 07/14] drm/panthor: Add the MMU/VM logical block

2023-12-04 Thread Boris Brezillon
MMU and VM management is related and placed in the same source file. Page table updates are delegated to the io-pgtable-arm driver that's in the iommu subsystem. The VM management logic is based on drm_gpuva_mgr, and is assuming the VA space is mostly managed by the usermode driver, except for a