Re: [Nouveau] [PATCH drm-next 02/14] drm/exec: fix memory leak in drm_exec_prepare_obj()

2023-01-18 Thread Christian König
That one should probably be squashed into the original patch. Christian. Am 18.01.23 um 07:12 schrieb Danilo Krummrich: Don't call drm_gem_object_get() unconditionally. Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/drm_exec.c | 1 - 1 file changed, 1 deletion(-) diff --git

Re: [Nouveau] [PATCH 5/9] drm/nouveau: stop using ttm_bo_wait

2023-01-18 Thread Christian König
Hi guys, another ping for this. It's just a minor cleanup. Dave/Daniel can you help me out here? Thanks, Christian. Am 11.01.23 um 10:52 schrieb Christian König: Hi guys, can I get a quick ack for this? The patch has no functional change and is just a cleanup. Thanks, Christian. Am

Re: [Nouveau] [PATCH drm-next 00/14] [RFC] DRM GPUVA Manager & Nouveau VM_BIND UAPI

2023-01-18 Thread Christian König
Am 18.01.23 um 07:12 schrieb 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

Re: [Nouveau] [REGRESSION] GM20B probe fails after commit 2541626cfb79

2023-01-18 Thread Nicolas Chauvet
Le mer. 18 janv. 2023 à 02:29, Ben Skeggs a écrit : > > On Mon, 16 Jan 2023 at 22:27, Diogo Ivo wrote: > > > > On Mon, Jan 16, 2023 at 07:45:05AM +1000, David Airlie wrote: > > > On Thu, Dec 29, 2022 at 12:58 AM Diogo Ivo > > > wrote: > > > As a quick check can you try changing > > > > > >

Re: [Nouveau] [PATCH 5/9] drm/nouveau: stop using ttm_bo_wait

2023-01-18 Thread Christian König
Hi Danilo, maybe you can give me a quick acked-by for this patch here. I promise I've going to finish my drm_exec patches so you can use them for Nouveau as well :) Thanks, Christian. Am 18.01.23 um 10:04 schrieb Christian König: Hi guys, another ping for this. It's just a minor cleanup.

Re: [Nouveau] [PATCH 5/9] drm/nouveau: stop using ttm_bo_wait

2023-01-18 Thread Karol Herbst
On Wed, Jan 18, 2023 at 10:04 AM Christian König wrote: > > Hi guys, > > another ping for this. It's just a minor cleanup. > Acked-by: Karol Herbst Though I'd say that having a wrapper function like that isn't pointless on its own and I kind of fail to see the reason it gets removed in the

Re: [Nouveau] [PATCH drm-next 00/14] [RFC] DRM GPUVA Manager & Nouveau VM_BIND UAPI

2023-01-18 Thread Danilo Krummrich
On 1/18/23 17:30, Alex Deucher wrote: On Wed, Jan 18, 2023 at 11:19 AM Danilo Krummrich wrote: On 1/18/23 16:37, Christian König wrote: Am 18.01.23 um 16:34 schrieb Danilo Krummrich: Hi Christian, On 1/18/23 09:53, Christian König wrote: Am 18.01.23 um 07:12 schrieb Danilo Krummrich:

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

2023-01-18 Thread kernel test robot
Hi Danilo, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on 0b45ac1170ea6416bc1d36798414c04870cd356d] url: https://github.com/intel-lab-lkp/linux/commits/Danilo-Krummrich/drm-execution-context-for-GEM-buffers/20230118-141552 base

Re: [Nouveau] [PATCH 6/8] iommu/intel: Add a gfp parameter to alloc_pgtable_page()

2023-01-18 Thread Jason Gunthorpe
On Wed, Jan 18, 2023 at 01:18:18AM +, Tian, Kevin wrote: > > From: Jason Gunthorpe > > Sent: Tuesday, January 17, 2023 9:30 PM > > > > On Tue, Jan 17, 2023 at 03:35:08AM +, Tian, Kevin wrote: > > > > From: Jason Gunthorpe > > > > Sent: Saturday, January 7, 2023 12:43 AM > > > > > > > >

Re: [Nouveau] [PATCH drm-next 00/14] [RFC] DRM GPUVA Manager & Nouveau VM_BIND UAPI

2023-01-18 Thread Christian König
Am 18.01.23 um 16:34 schrieb Danilo Krummrich: Hi Christian, On 1/18/23 09:53, Christian König wrote: Am 18.01.23 um 07:12 schrieb 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.

Re: [Nouveau] [PATCH 5/9] drm/nouveau: stop using ttm_bo_wait

2023-01-18 Thread Danilo Krummrich
On 1/18/23 15:15, Christian König wrote: Am 18.01.23 um 14:01 schrieb Karol Herbst: On Wed, Jan 18, 2023 at 10:04 AM Christian König wrote: Hi guys, another ping for this. It's just a minor cleanup. Acked-by: Karol Herbst Thanks! Also Acked-by: Danilo Krummrich Though I'd say

Re: [Nouveau] [PATCH drm-next 00/14] [RFC] DRM GPUVA Manager & Nouveau VM_BIND UAPI

2023-01-18 Thread Danilo Krummrich
Hi Christian, On 1/18/23 09:53, Christian König wrote: Am 18.01.23 um 07:12 schrieb 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

Re: [Nouveau] [PATCH drm-next 00/14] [RFC] DRM GPUVA Manager & Nouveau VM_BIND UAPI

2023-01-18 Thread Danilo Krummrich
On 1/18/23 16:37, Christian König wrote: Am 18.01.23 um 16:34 schrieb Danilo Krummrich: Hi Christian, On 1/18/23 09:53, Christian König wrote: Am 18.01.23 um 07:12 schrieb Danilo Krummrich: This patch series provides a new UAPI for the Nouveau driver in order to support Vulkan features,

Re: [Nouveau] [PATCH drm-next 00/14] [RFC] DRM GPUVA Manager & Nouveau VM_BIND UAPI

2023-01-18 Thread Alex Deucher
On Wed, Jan 18, 2023 at 11:19 AM Danilo Krummrich wrote: > > On 1/18/23 16:37, Christian König wrote: > > Am 18.01.23 um 16:34 schrieb Danilo Krummrich: > >> Hi Christian, > >> > >> On 1/18/23 09:53, Christian König wrote: > >>> Am 18.01.23 um 07:12 schrieb Danilo Krummrich: > This patch

Re: [Nouveau] [PATCH 5/9] drm/nouveau: stop using ttm_bo_wait

2023-01-18 Thread Christian König
Am 18.01.23 um 14:01 schrieb Karol Herbst: On Wed, Jan 18, 2023 at 10:04 AM Christian König wrote: Hi guys, another ping for this. It's just a minor cleanup. Acked-by: Karol Herbst Thanks! Though I'd say that having a wrapper function like that isn't pointless on its own and I kind of

Re: [Nouveau] [PATCH drm-next 00/14] [RFC] DRM GPUVA Manager & Nouveau VM_BIND UAPI

2023-01-18 Thread Alex Deucher
On Wed, Jan 18, 2023 at 11:50 AM Danilo Krummrich wrote: > > > > On 1/18/23 17:30, Alex Deucher wrote: > > On Wed, Jan 18, 2023 at 11:19 AM Danilo Krummrich wrote: > >> > >> On 1/18/23 16:37, Christian König wrote: > >>> Am 18.01.23 um 16:34 schrieb Danilo Krummrich: > Hi Christian, >

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

2023-01-18 Thread kernel test robot
Hi Danilo, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on 0b45ac1170ea6416bc1d36798414c04870cd356d] url: https://github.com/intel-lab-lkp/linux/commits/Danilo-Krummrich/drm-execution-context-for-GEM-buffers/20230118-141552 base

[Nouveau] [PATCH v2 03/10] iommu: Add a gfp parameter to iommu_map_sg()

2023-01-18 Thread Jason Gunthorpe
Follow the pattern for iommu_map() and remove iommu_map_sg_atomic(). This allows __iommu_dma_alloc_noncontiguous() to use a GFP_KERNEL allocation here, based on the provided gfp flags. Signed-off-by: Jason Gunthorpe --- drivers/iommu/dma-iommu.c | 5 +++-- drivers/iommu/iommu.c | 26

[Nouveau] [PATCH v2 08/10] iommu/intel: Use GFP_KERNEL in sleepable contexts

2023-01-18 Thread Jason Gunthorpe
These contexts are sleepable, so use the proper annotation. The GFP_ATOMIC was added mechanically in the prior patches. Signed-off-by: Jason Gunthorpe --- drivers/iommu/intel/iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/intel/iommu.c

[Nouveau] [PATCH v2 02/10] iommu: Remove iommu_map_atomic()

2023-01-18 Thread Jason Gunthorpe
There is only one call site and it can now just pass the GFP_ATOMIC to the normal iommu_map(). Signed-off-by: Jason Gunthorpe --- drivers/iommu/dma-iommu.c | 2 +- drivers/iommu/iommu.c | 7 --- include/linux/iommu.h | 9 - 3 files changed, 1 insertion(+), 17 deletions(-)

[Nouveau] [PATCH v2 07/10] iommu/intel: Support the gfp argument to the map_pages op

2023-01-18 Thread Jason Gunthorpe
Flow it down to alloc_pgtable_page() via pfn_to_dma_pte() and __domain_mapping(). Signed-off-by: Jason Gunthorpe --- drivers/iommu/intel/iommu.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/intel/iommu.c

[Nouveau] [PATCH v2 00/10] Let iommufd charge IOPTE allocations to the memory cgroup

2023-01-18 Thread Jason Gunthorpe
iommufd follows the same design as KVM and uses memory cgroups to limit the amount of kernel memory a iommufd file descriptor can pin down. The various internal data structures already use GFP_KERNEL_ACCOUNT to charge its own memory. However, one of the biggest consumers of kernel memory is the

[Nouveau] [PATCH v2 05/10] iommufd: Use GFP_KERNEL_ACCOUNT for iommu_map()

2023-01-18 Thread Jason Gunthorpe
iommufd follows the same design as KVM and uses memory cgroups to limit the amount of kernel memory a iommufd file descriptor can pin down. The various internal data structures already use GFP_KERNEL_ACCOUNT. However, one of the biggest consumers of kernel memory is the IOPTEs stored under the

[Nouveau] [PATCH v2 09/10] iommu/s390: Push the gfp parameter to the kmem_cache_alloc()'s

2023-01-18 Thread Jason Gunthorpe
dma_alloc_cpu_table() and dma_alloc_page_table() are eventually called by iommufd through s390_iommu_map_pages() and it should not be forced to atomic. Thread the gfp parameter through the call chain starting from s390_iommu_map_pages(). Reviewed-by: Niklas Schnelle Signed-off-by: Jason

[Nouveau] [PATCH v2 06/10] iommu/intel: Add a gfp parameter to alloc_pgtable_page()

2023-01-18 Thread Jason Gunthorpe
This is eventually called by iommufd through intel_iommu_map_pages() and it should not be forced to atomic. Push the GFP_ATOMIC to all callers. Signed-off-by: Jason Gunthorpe --- drivers/iommu/intel/iommu.c | 14 +++--- drivers/iommu/intel/iommu.h | 2 +- drivers/iommu/intel/pasid.c |

[Nouveau] [PATCH v2 10/10] iommu/s390: Use GFP_KERNEL in sleepable contexts

2023-01-18 Thread Jason Gunthorpe
These contexts are sleepable, so use the proper annotation. The GFP_ATOMIC was added mechanically in the prior patches. Reviewed-by: Niklas Schnelle Signed-off-by: Jason Gunthorpe --- arch/s390/pci/pci_dma.c| 2 +- drivers/iommu/s390-iommu.c | 2 +- 2 files changed, 2 insertions(+), 2

[Nouveau] [PATCH v2 01/10] iommu: Add a gfp parameter to iommu_map()

2023-01-18 Thread Jason Gunthorpe
The internal mechanisms support this, but instead of exposting the gfp to the caller it wrappers it into iommu_map() and iommu_map_atomic() Fix this instead of adding more variants for GFP_KERNEL_ACCOUNT. Signed-off-by: Jason Gunthorpe --- arch/arm/mm/dma-mapping.c | 11

[Nouveau] [PATCH v2 04/10] iommu/dma: Use the gfp parameter in __iommu_dma_alloc_noncontiguous()

2023-01-18 Thread Jason Gunthorpe
Change the sg_alloc_table_from_pages() allocation that was hardwired to GFP_KERNEL to use the gfp parameter like the other allocations in this function. Auditing says this is never called from an atomic context, so it is safe as is, but reads wrong. Signed-off-by: Jason Gunthorpe ---

Re: [Nouveau] [PATCH drm-next 02/14] drm/exec: fix memory leak in drm_exec_prepare_obj()

2023-01-18 Thread Danilo Krummrich
On 1/18/23 09:51, Christian König wrote: That one should probably be squashed into the original patch. Yes, just wanted to make it obvious for you to pick it up in case you did not fix it already yourself. Christian. Am 18.01.23 um 07:12 schrieb Danilo Krummrich: Don't call

Re: [Nouveau] [PATCH drm-next 00/14] [RFC] DRM GPUVA Manager & Nouveau VM_BIND UAPI

2023-01-18 Thread Dave Airlie
On Thu, 19 Jan 2023 at 02:54, Alex Deucher wrote: > > On Wed, Jan 18, 2023 at 11:50 AM Danilo Krummrich wrote: > > > > > > > > On 1/18/23 17:30, Alex Deucher wrote: > > > On Wed, Jan 18, 2023 at 11:19 AM Danilo Krummrich wrote: > > >> > > >> On 1/18/23 16:37, Christian König wrote: > > >>> Am

Re: [Nouveau] [PATCH drm-next 00/14] [RFC] DRM GPUVA Manager & Nouveau VM_BIND UAPI

2023-01-18 Thread Christian König
Am 18.01.23 um 20:17 schrieb Dave Airlie: On Thu, 19 Jan 2023 at 02:54, Alex Deucher wrote: On Wed, Jan 18, 2023 at 11:50 AM Danilo Krummrich wrote: On 1/18/23 17:30, Alex Deucher wrote: On Wed, Jan 18, 2023 at 11:19 AM Danilo Krummrich wrote: On 1/18/23 16:37, Christian König wrote:

Re: [Nouveau] [RESEND][PATCH] drm/nouveau/fb/ga102: Replace zero-length array of trailing structs with flex-array

2023-01-18 Thread Lyude Paul
Hi! Sorry for the late response, I've had my head buried in some regressions from AMD for a while now and am now just catching up on my email. Does this still need to be pushed upstream? On Tue, 2023-01-03 at 18:52 -0600, Gustavo A. R. Silva wrote: > On Tue, Jan 03, 2023 at 03:48:36PM -0800,

Re: [Nouveau] [PATCH drm-next 00/14] [RFC] DRM GPUVA Manager & Nouveau VM_BIND UAPI

2023-01-18 Thread Danilo Krummrich
On 1/18/23 20:48, Christian König wrote: Am 18.01.23 um 20:17 schrieb Dave Airlie: On Thu, 19 Jan 2023 at 02:54, Alex Deucher wrote: On Wed, Jan 18, 2023 at 11:50 AM Danilo Krummrich wrote: On 1/18/23 17:30, Alex Deucher wrote: On Wed, Jan 18, 2023 at 11:19 AM Danilo Krummrich wrote:

Re: [Nouveau] [PATCH drm-next 13/14] drm/nouveau: implement new VM_BIND UAPI

2023-01-18 Thread Danilo Krummrich
On 1/18/23 21:37, Thomas Hellström (Intel) wrote: On 1/18/23 07:12, Danilo Krummrich wrote: 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