Displaying 20 results from an estimated 22 matches for "nouveau_pfns_map".
2020 Aug 27
0
[PATCH] drm/nouveau/svm: remove set but not used 'ret'
This addresses the following gcc warning with "make W=1":
drivers/gpu/drm/nouveau/nouveau_svm.c: In function ?nouveau_pfns_map?:
drivers/gpu/drm/nouveau/nouveau_svm.c:818:6: warning: variable ?ret? set
but not used [-Wunused-but-set-variable]
818 | int ret;
| ^~~
Reported-by: Hulk Robot <hulkci at huawei.com>
Signed-off-by: Jason Yan <yanaijie at huawei.com>
---
drivers/gpu/drm/nouveau/nouveau_s...
2019 Aug 07
4
[PATCH] nouveau/hmm: map pages after migration
...+
+ kfree(args);
+}
+
+static struct nouveau_svmm *
+nouveau_find_svmm(struct nouveau_svm *svm, struct mm_struct *mm)
+{
+ struct nouveau_ivmm *ivmm;
+
+ list_for_each_entry(ivmm, &svm->inst, head) {
+ if (ivmm->svmm->mm == mm)
+ return ivmm->svmm;
+ }
+ return NULL;
+}
+
+void
+nouveau_pfns_map(struct nouveau_drm *drm, struct mm_struct *mm,
+ unsigned long addr, u64 *pfns, unsigned long npages)
+{
+ struct nouveau_svm *svm = drm->svm;
+ struct nouveau_svmm *svmm;
+ struct nouveau_pfnmap_args *args;
+ int ret;
+
+ if (!svm)
+ return;
+
+ mutex_lock(&svm->mutex);
+ svmm = nouve...
2023 Mar 29
1
[PATCH] drm/nouveau/svm: remove unused ret variable
...5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_svm.c b/drivers/gpu/drm/nouveau/nouveau_svm.c
index a74ba8d84ba7..e072d610f2f9 100644
--- a/drivers/gpu/drm/nouveau/nouveau_svm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_svm.c
@@ -926,15 +926,14 @@ nouveau_pfns_map(struct nouveau_svmm *svmm, struct mm_struct *mm,
unsigned long addr, u64 *pfns, unsigned long npages)
{
struct nouveau_pfnmap_args *args = nouveau_pfns_to_args(pfns);
- int ret;
args->p.addr = addr;
args->p.size = npages << PAGE_SHIFT;
mutex_lock(&svmm->mutex);...
2020 Sep 19
0
[PATCH -next] gpu: nouveau: Remove set but not used variable
...riable ?ret? set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/nouveau/dispnv50/disp.c: In function nv50_mstm_prepare:
drivers/gpu/drm/nouveau/dispnv50/disp.c:1327:6: warning: variable ?ret? set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/nouveau/nouveau_svm.c: In function nouveau_pfns_map:
drivers/gpu/drm/nouveau/nouveau_svm.c:818:6: warning: variable ?ret? set but not used [-Wunused-but-set-variable]
these variable is never used, so remove it.
Signed-off-by: Zheng Yongjun <zhengyongjun3 at huawei.com>
---
drivers/gpu/drm/nouveau/dispnv50/disp.c | 9 +++------
drivers/gpu/d...
2019 Aug 13
0
[PATCH] nouveau/hmm: map pages after migration
...<rcampbell at nvidia.com>
> Cc: Christoph Hellwig <hch at lst.de>
> Cc: Jason Gunthorpe <jgg at mellanox.com>
> Cc: "Jérôme Glisse" <jglisse at redhat.com>
> Cc: Ben Skeggs <bskeggs at redhat.com>
Sorry for delay i am swamp, couple issues:
- nouveau_pfns_map() is never call, it should be call after
the dma copy is done (iirc it is lacking proper fencing
so that would need to be implemented first)
- the migrate ioctl is disconnected from the svm part and
thus we would need first to implement svm reference counting
and take a...
2023 Aug 05
1
[PATCH drm-misc-next] nouveau/dmem: fix copy-paste error in nouveau_dmem_migrate_chunk()
...oid nouveau_dmem_migrate_chunk(struct nouveau_drm *drm,
}
if (!nouveau_fence_new(&fence))
- nouveau_fence_emit(fence, chunk->drm->dmem->migrate.chan);
+ nouveau_fence_emit(fence, drm->dmem->migrate.chan);
migrate_vma_pages(args);
nouveau_dmem_fence_done(&fence);
nouveau_pfns_map(svmm, args->vma->vm_mm, args->start, pfns, i);
base-commit: 82d750e9d2f5d0594c8f7057ce59127e701af781
--
2.41.0
2020 Mar 03
2
[PATCH v2] nouveau/hmm: map pages after migration
...ma, pfns + i);
if (args->dst[i])
nr_dma++;
addr += PAGE_SIZE;
@@ -607,15 +615,12 @@ static void nouveau_dmem_migrate_chunk(struct nouveau_drm *drm,
nouveau_fence_new(drm->dmem->migrate.chan, false, &fence);
migrate_vma_pages(args);
nouveau_dmem_fence_done(&fence);
+ nouveau_pfns_map(drm, args->vma->vm_mm, args->start, pfns, i);
while (nr_dma--) {
dma_unmap_page(drm->dev->dev, dma_addrs[nr_dma], PAGE_SIZE,
DMA_BIDIRECTIONAL);
}
- /*
- * FIXME optimization: update GPU page table to point to newly migrated
- * memory.
- */
migrate_vma_finalize(ar...
2020 Mar 04
5
[PATCH v3 0/4] nouveau/hmm: map pages after migration
Originally patch 4 was targeted for Jason's rdma tree since other HMM
related changes were queued there. Now that those have been merged,
these patches just contain changes to nouveau so they could go through
any tree. I guess Ben Skeggs' tree would be appropriate.
Changes since v2:
Added patches 1-3 to fix some minor issues.
Eliminated nouveau_find_svmm() since it is easily found.
2024 Jan 10
2
[PATCH 2/6] drm/nouveau/svm: remove unused but set variables
...der >> NOUVEAU_SVM_BIND_PRIORITY_SHIFT;
- priority &= NOUVEAU_SVM_BIND_PRIORITY_MASK;
-
/* FIXME support CPU target ie all target value < GPU_VRAM */
target = args->header >> NOUVEAU_SVM_BIND_TARGET_SHIFT;
target &= NOUVEAU_SVM_BIND_TARGET_MASK;
@@ -926,15 +923,14 @@ nouveau_pfns_map(struct nouveau_svmm *svmm, struct mm_struct *mm,
unsigned long addr, u64 *pfns, unsigned long npages)
{
struct nouveau_pfnmap_args *args = nouveau_pfns_to_args(pfns);
- int ret;
args->p.addr = addr;
args->p.size = npages << PAGE_SHIFT;
mutex_lock(&svmm->mutex);...
2019 Aug 08
0
[PATCH] nouveau/hmm: map pages after migration
...,5 +49,19 @@ static inline int nouveau_svmm_bind(struct drm_device *device, void *p,
> {
> return -ENOSYS;
> }
> +
> +u64 *nouveau_pfns_alloc(unsigned long npages)
> +{
> + return NULL;
> +}
> +
> +void nouveau_pfns_free(u64 *pfns)
> +{
> +}
> +
> +void nouveau_pfns_map(struct nouveau_drm *drm, struct mm_struct *mm,
> + unsigned long addr, u64 *pfns, unsigned long npages)
> +{
> +}
> #endif /* IS_ENABLED(CONFIG_DRM_NOUVEAU_SVM) */
nouveau_dmem.c and nouveau_svm.c are both built conditional on
CONFIG_DRM_NOUVEAU_SVM, so there is no need for stu...
2020 Jul 23
0
[PATCH v4 4/6] nouveau/svm: use the new migration invalidation
...oid nouveau_svmm_part(struct nouveau_svmm *, u64 inst);
int nouveau_svmm_bind(struct drm_device *, void *, struct drm_file *);
+void nouveau_svmm_invalidate(struct nouveau_svmm *svmm, u64 start, u64 limit);
u64 *nouveau_pfns_alloc(unsigned long npages);
void nouveau_pfns_free(u64 *pfns);
void nouveau_pfns_map(struct nouveau_svmm *svmm, struct mm_struct *mm,
--
2.20.1
2023 Aug 29
1
[PATCH drm-misc-next] drm/nouveau: fence: fix undefined fence state after emit
...m_migrate_chunk(struct nouveau_drm *drm,
addr += PAGE_SIZE;
}
- if (!nouveau_fence_new(&fence))
- nouveau_fence_emit(fence, drm->dmem->migrate.chan);
+ nouveau_fence_new(&fence, drm->dmem->migrate.chan);
migrate_vma_pages(args);
nouveau_dmem_fence_done(&fence);
nouveau_pfns_map(svmm, args->vma->vm_mm, args->start, pfns, i);
diff --git a/drivers/gpu/drm/nouveau/nouveau_exec.c b/drivers/gpu/drm/nouveau/nouveau_exec.c
index 98a7a94cec5a..72f6543a0790 100644
--- a/drivers/gpu/drm/nouveau/nouveau_exec.c
+++ b/drivers/gpu/drm/nouveau/nouveau_exec.c
@@ -91,7 +91,8 @@ no...
2019 Aug 08
2
[PATCH] nouveau/hmm: map pages after migration
..._device *device, void *p,
>> {
>> return -ENOSYS;
>> }
>> +
>> +u64 *nouveau_pfns_alloc(unsigned long npages)
>> +{
>> + return NULL;
>> +}
>> +
>> +void nouveau_pfns_free(u64 *pfns)
>> +{
>> +}
>> +
>> +void nouveau_pfns_map(struct nouveau_drm *drm, struct mm_struct *mm,
>> + unsigned long addr, u64 *pfns, unsigned long npages)
>> +{
>> +}
>> #endif /* IS_ENABLED(CONFIG_DRM_NOUVEAU_SVM) */
>
> nouveau_dmem.c and nouveau_svm.c are both built conditional on
> CONFIG_DRM_NOUVEAU_...
2020 May 08
11
[PATCH 0/6] nouveau/hmm: add support for mapping large pages
hmm_range_fault() returns an array of page frame numbers and flags for
how the pages are mapped in the requested process' page tables. The PFN
can be used to get the struct page with hmm_pfn_to_page() and the page size
order can be determined with compound_order(page) but if the page is larger
than order 0 (PAGE_SIZE), there is no indication that the page is mapped
using a larger page size. To
2020 Nov 06
12
[PATCH v3 0/6] mm/hmm/nouveau: add THP migration to migrate_vma_*
This series adds support for transparent huge page migration to
migrate_vma_*() and adds nouveau SVM and HMM selftests as consumers.
Earlier versions were posted previously [1] and [2].
The patches apply cleanly to the linux-mm 5.10.0-rc2 tree. There are a
lot of other THP patches being posted. I don't think there are any
semantic conflicts but there may be some merge conflicts depending on
2020 Sep 02
10
[PATCH v2 0/7] mm/hmm/nouveau: add THP migration to migrate_vma_*
This series adds support for transparent huge page migration to
migrate_vma_*() and adds nouveau SVM and HMM selftests as consumers.
An earlier version was posted previously [1]. This version now
supports splitting a THP midway in the migration process which
led to a number of changes.
The patches apply cleanly to the current linux-mm tree. Since there
are a couple of patches in linux-mm from Dan
2020 Jul 06
8
[PATCH 0/5] mm/migrate: avoid device private invalidations
The goal for this series is to avoid device private memory TLB
invalidations when migrating a range of addresses from system
memory to device private memory and some of those pages have already
been migrated. The approach taken is to introduce a new mmu notifier
invalidation event type and use that in the device driver to skip
invalidation callbacks from migrate_vma_setup(). The device driver is
2020 Jun 19
22
[PATCH 00/16] mm/hmm/nouveau: THP mapping and migration
These patches apply to linux-5.8.0-rc1. Patches 1-3 should probably go
into 5.8, the others can be queued for 5.9. Patches 4-6 improve the HMM
self tests. Patch 7-8 prepare nouveau for the meat of this series which
adds support and testing for compound page mapping of system memory
(patches 9-11) and compound page migration to device private memory
(patches 12-16). Since these changes are split
2020 Jul 21
6
[PATCH v3 0/5] mm/migrate: avoid device private invalidations
The goal for this series is to avoid device private memory TLB
invalidations when migrating a range of addresses from system
memory to device private memory and some of those pages have already
been migrated. The approach taken is to introduce a new mmu notifier
invalidation event type and use that in the device driver to skip
invalidation callbacks from migrate_vma_setup(). The device driver is
2020 Jul 13
9
[PATCH v2 0/5] mm/migrate: avoid device private invalidations
The goal for this series is to avoid device private memory TLB
invalidations when migrating a range of addresses from system
memory to device private memory and some of those pages have already
been migrated. The approach taken is to introduce a new mmu notifier
invalidation event type and use that in the device driver to skip
invalidation callbacks from migrate_vma_setup(). The device driver is