forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmnv50.c
....@@ -235,7 +235,7 @@
235235 struct nvkm_device *device = vmm->mmu->subdev.device;
236236 struct nvkm_ram *ram = device->fb->ram;
237237 struct nvkm_memory *memory = map->memory;
238
- u8 aper, kind, comp, priv, ro;
238
+ u8 aper, kind, kind_inv, comp, priv, ro;
239239 int kindn, ret = -ENOSYS;
240240 const u8 *kindm;
241241
....@@ -278,8 +278,8 @@
278278 return -EINVAL;
279279 }
280280
281
- kindm = vmm->mmu->func->kind(vmm->mmu, &kindn);
282
- if (kind >= kindn || kindm[kind] == 0x7f) {
281
+ kindm = vmm->mmu->func->kind(vmm->mmu, &kindn, &kind_inv);
282
+ if (kind >= kindn || kindm[kind] == kind_inv) {
283283 VMM_DEBUG(vmm, "kind %02x", kind);
284284 return -EINVAL;
285285 }
....@@ -376,10 +376,10 @@
376376 };
377377
378378 int
379
-nv50_vmm_new(struct nvkm_mmu *mmu, u64 addr, u64 size, void *argv, u32 argc,
380
- struct lock_class_key *key, const char *name,
379
+nv50_vmm_new(struct nvkm_mmu *mmu, bool managed, u64 addr, u64 size,
380
+ void *argv, u32 argc, struct lock_class_key *key, const char *name,
381381 struct nvkm_vmm **pvmm)
382382 {
383
- return nv04_vmm_new_(&nv50_vmm, mmu, 0, addr, size,
383
+ return nv04_vmm_new_(&nv50_vmm, mmu, 0, managed, addr, size,
384384 argv, argc, key, name, pvmm);
385385 }