From f70575805708cabdedea7498aaa3f710fde4d920 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Wed, 31 Jan 2024 03:29:01 +0000
Subject: [PATCH] add lvds1024*800

---
 kernel/drivers/gpu/drm/nouveau/nouveau_vmm.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/kernel/drivers/gpu/drm/nouveau/nouveau_vmm.c b/kernel/drivers/gpu/drm/nouveau/nouveau_vmm.c
index 2032c3e..a49e881 100644
--- a/kernel/drivers/gpu/drm/nouveau/nouveau_vmm.c
+++ b/kernel/drivers/gpu/drm/nouveau/nouveau_vmm.c
@@ -22,6 +22,7 @@
 #include "nouveau_vmm.h"
 #include "nouveau_drv.h"
 #include "nouveau_bo.h"
+#include "nouveau_svm.h"
 #include "nouveau_mem.h"
 
 void
@@ -68,8 +69,8 @@
 		}
 		list_del(&vma->head);
 		kfree(*pvma);
-		*pvma = NULL;
 	}
+	*pvma = NULL;
 }
 
 int
@@ -119,15 +120,16 @@
 void
 nouveau_vmm_fini(struct nouveau_vmm *vmm)
 {
-	nvif_vmm_fini(&vmm->vmm);
+	nouveau_svmm_fini(&vmm->svmm);
+	nvif_vmm_dtor(&vmm->vmm);
 	vmm->cli = NULL;
 }
 
 int
 nouveau_vmm_init(struct nouveau_cli *cli, s32 oclass, struct nouveau_vmm *vmm)
 {
-	int ret = nvif_vmm_init(&cli->mmu, oclass, PAGE_SIZE, 0, NULL, 0,
-				&vmm->vmm);
+	int ret = nvif_vmm_ctor(&cli->mmu, "drmVmm", oclass, false, PAGE_SIZE,
+				0, NULL, 0, &vmm->vmm);
 	if (ret)
 		return ret;
 

--
Gitblit v1.6.2