]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/gpu/drm/nouveau/nouveau_drv.h
drm/nouveau/mmu: remove old vmm frontend
[mirror_ubuntu-bionic-kernel.git] / drivers / gpu / drm / nouveau / nouveau_drv.h
index ac5c66e60b2ab4832beddfff18e8c9c37fb8d029..e86b8220a4bb66d95d0f073cdcc83c9f7c46381f 100644 (file)
@@ -43,6 +43,7 @@
 #include <nvif/device.h>
 #include <nvif/ioctl.h>
 #include <nvif/mmu.h>
+#include <nvif/vmm.h>
 
 #include <drm/drmP.h>
 
@@ -94,17 +95,31 @@ struct nouveau_cli {
        struct nvif_device device;
        struct nvif_mmu mmu;
        struct nouveau_vmm vmm;
+       const struct nvif_mclass *mem;
 
-       struct nvkm_vm *vm;
        struct list_head head;
        void *abi16;
        struct list_head objects;
        struct list_head notifys;
        char name[32];
 
+       struct work_struct work;
+       struct list_head worker;
        struct mutex lock;
 };
 
+struct nouveau_cli_work {
+       void (*func)(struct nouveau_cli_work *);
+       struct nouveau_cli *cli;
+       struct list_head head;
+
+       struct dma_fence *fence;
+       struct dma_fence_cb cb;
+};
+
+void nouveau_cli_work_queue(struct nouveau_cli *, struct dma_fence *,
+                           struct nouveau_cli_work *);
+
 static inline struct nouveau_cli *
 nouveau_cli(struct drm_file *fpriv)
 {
@@ -140,6 +155,9 @@ struct nouveau_drm {
                struct nouveau_channel *chan;
                struct nvif_object copy;
                int mtrr;
+               int type_vram;
+               int type_host;
+               int type_ncoh;
        } ttm;
 
        /* GEM interface support */