diff options
| author | Dave Airlie <airlied@redhat.com> | 2026-02-04 06:00:06 +0300 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2026-02-04 23:04:01 +0300 |
| commit | 9dc983a85eb9b546bbe2ef3f2345e338aa655789 (patch) | |
| tree | fc91798c38ca3a8def2fe7cf079fe040b50b8c61 /drivers/gpu | |
| parent | c4d53e567d3b6f6211d013e6c5c3672b26a49845 (diff) | |
| download | linux-9dc983a85eb9b546bbe2ef3f2345e338aa655789.tar.xz | |
nouveau/vmm: increase size of vmm pte tracker struct to u32 (v2)
We need to tracker large counts of spte than previously due to unref
getting delayed sometimes.
This doesn't fix LPT tracking yet, it just creates space for it.
Reviewed-by: Mary Guillemard <mary@mary.zone>
Tested-by: Mary Guillemard <mary@mary.zone>
Tested-by: Mel Henning <mhenning@darkrefraction.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patch.msgid.link/20260204030208.2313241-3-airlied@gmail.com
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 6 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 9 |
2 files changed, 8 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c index efc334f6104c..44daeec0aa6d 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c @@ -387,7 +387,7 @@ nvkm_vmm_sparse_ptes(const struct nvkm_vmm_desc *desc, } else if (desc->type == LPT) { union nvkm_pte_tracker sparse = { .s.sparse = 1 }; - memset(&pgt->pte[ptei].u, sparse.u, ptes); + memset32(&pgt->pte[ptei].u, sparse.u, ptes); } } @@ -399,7 +399,7 @@ nvkm_vmm_sparse_unref_ptes(struct nvkm_vmm_iter *it, bool pfn, u32 ptei, u32 pte memset(&pt->pde[ptei], 0x00, sizeof(pt->pde[0]) * ptes); else if (it->desc->type == LPT) - memset(&pt->pte[ptei].u, 0x00, sizeof(pt->pte[0]) * ptes); + memset32(&pt->pte[ptei].u, 0x00, ptes); return nvkm_vmm_unref_ptes(it, pfn, ptei, ptes); } @@ -458,7 +458,7 @@ nvkm_vmm_ref_hwpt(struct nvkm_vmm_iter *it, struct nvkm_vmm_pt *pgd, u32 pdei) desc->func->sparse(vmm, pt, pteb, ptes); else desc->func->invalid(vmm, pt, pteb, ptes); - memset(&pgt->pte[pteb], 0x00, ptes); + memset32(&pgt->pte[pteb].u, 0x00, ptes); } else { desc->func->unmap(vmm, pt, pteb, ptes); while (ptes--) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h index a6312a0e6b84..a8b08126e8dc 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h @@ -5,11 +5,12 @@ enum nvkm_memory_target; union nvkm_pte_tracker { - u8 u; + u32 u; struct { - u8 sparse:1; - u8 spte_valid:1; - u8 sptes:6; + u32 sparse:1; + u32 spte_valid:1; + u32 padding:14; + u32 sptes:16; } s; }; |
