Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab2ee9ff authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nouveau/mmu/gp100-: support vmms with gcc/tex replayable faults enabled



Some GPU units are capable of supporting "replayable" page faults, where
the execution unit will wait for SW to fixup GPU page tables rather than
triggering a channel-fatal fault.

This feature isn't useful (it's harmful, even) unless something like HMM
is being used to manage events appearing in the replayable fault buffer,
so, it's disabled by default.

This commit allows a client to request it be enabled.

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 71871aa6
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -6,6 +6,12 @@ struct gp100_vmm_vn {
	/* nvif_vmm_vX ... */
};

struct gp100_vmm_v0 {
	/* nvif_vmm_vX ... */
	__u8  version;
	__u8  fault_replay;
};

struct gp100_vmm_map_vn {
	/* nvif_vmm_map_vX ... */
};
+2 −0
Original line number Diff line number Diff line
@@ -45,6 +45,8 @@ struct nvkm_vmm {

	dma_addr_t null;
	void *nullp;

	bool replay;
};

int nvkm_vmm_new(struct nvkm_device *, u64 addr, u64 size, void *argv, u32 argc,
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ gp100_mmu = {
	.dma_bits = 47,
	.mmu = {{ -1, -1, NVIF_CLASS_MMU_GF100}},
	.mem = {{ -1,  0, NVIF_CLASS_MEM_GF100}, gf100_mem_new, gf100_mem_map },
	.vmm = {{ -1, -1, NVIF_CLASS_VMM_GP100}, gp100_vmm_new },
	.vmm = {{ -1,  0, NVIF_CLASS_VMM_GP100}, gp100_vmm_new },
	.kind = gm200_mmu_kind,
	.kind_sys = true,
};
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ gp10b_mmu = {
	.dma_bits = 47,
	.mmu = {{ -1, -1, NVIF_CLASS_MMU_GF100}},
	.mem = {{ -1, -1, NVIF_CLASS_MEM_GF100}, .umap = gf100_mem_map },
	.vmm = {{ -1, -1, NVIF_CLASS_VMM_GP100}, gp10b_vmm_new },
	.vmm = {{ -1,  0, NVIF_CLASS_VMM_GP100}, gp10b_vmm_new },
	.kind = gm200_mmu_kind,
	.kind_sys = true,
};
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ gv100_mmu = {
	.dma_bits = 47,
	.mmu = {{ -1, -1, NVIF_CLASS_MMU_GF100}},
	.mem = {{ -1,  0, NVIF_CLASS_MEM_GF100}, gf100_mem_new, gf100_mem_map },
	.vmm = {{ -1, -1, NVIF_CLASS_VMM_GP100}, gv100_vmm_new },
	.vmm = {{ -1,  0, NVIF_CLASS_VMM_GP100}, gv100_vmm_new },
	.kind = gm200_mmu_kind,
	.kind_sys = true,
};
Loading