]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/nouveau/disp/nv50-: simplify definition of cursor channels
authorBen Skeggs <bskeggs@redhat.com>
Tue, 8 May 2018 10:39:46 +0000 (20:39 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 18 May 2018 05:01:21 +0000 (15:01 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
21 files changed:
drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild
drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/cursg84.c [deleted file]
drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgf119.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgk104.c [deleted file]
drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgp102.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgt215.c [deleted file]
drivers/gpu/drm/nouveau/nvkm/engine/disp/cursnv50.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootg84.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootg94.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootgf119.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootgk104.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootgk110.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootgm107.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootgm200.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootgp100.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootgp102.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootgt200.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootgt215.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.h

index c2d56bb5a452919fff2d83df7d8861fe35cfb858..ee41fb75c94d7a141d1bc5f45f593ea8ace1869c 100644 (file)
@@ -100,10 +100,7 @@ nvkm-y += nvkm/engine/disp/piocnv50.o
 nvkm-y += nvkm/engine/disp/piocgf119.o
 
 nvkm-y += nvkm/engine/disp/cursnv50.o
-nvkm-y += nvkm/engine/disp/cursg84.o
-nvkm-y += nvkm/engine/disp/cursgt215.o
 nvkm-y += nvkm/engine/disp/cursgf119.o
-nvkm-y += nvkm/engine/disp/cursgk104.o
 nvkm-y += nvkm/engine/disp/cursgp102.o
 
 nvkm-y += nvkm/engine/disp/oimmnv50.o
index 5d162775de19177d0614b46d4c74d67d79787b2a..d52420f410ed3613c1687188b6c39cfe52bd99c3 100644 (file)
@@ -50,6 +50,10 @@ void nv50_disp_chan_uevent_send(struct nv50_disp *, int);
 
 extern const struct nvkm_event_func gf119_disp_chan_uevent;
 
+int nv50_disp_curs_new_(const struct nv50_disp_chan_func *,
+                       struct nv50_disp *, int ctrl, int user,
+                       const struct nvkm_oclass *, void *argv, u32 argc,
+                       struct nvkm_object **);
 int nv50_disp_oimm_new_(const struct nv50_disp_chan_func *,
                        struct nv50_disp *, int ctrl, int user,
                        const struct nvkm_oclass *, void *argv, u32 argc,
@@ -65,6 +69,8 @@ int nv50_disp_ovly_new_(const struct nv50_disp_dmac_func *,
                        const struct nvkm_oclass *, void *argv, u32 argc,
                        struct nvkm_object **);
 
+int nv50_disp_curs_new(const struct nvkm_oclass *, void *, u32,
+                      struct nv50_disp *, struct nvkm_object **);
 int nv50_disp_oimm_new(const struct nvkm_oclass *, void *, u32,
                       struct nv50_disp *, struct nvkm_object **);
 int nv50_disp_base_new(const struct nvkm_oclass *, void *, u32,
@@ -80,6 +86,8 @@ int g84_disp_ovly_new(const struct nvkm_oclass *, void *, u32,
 int gt200_disp_ovly_new(const struct nvkm_oclass *, void *, u32,
                        struct nv50_disp *, struct nvkm_object **);
 
+int gf119_disp_curs_new(const struct nvkm_oclass *, void *, u32,
+                       struct nv50_disp *, struct nvkm_object **);
 int gf119_disp_oimm_new(const struct nvkm_oclass *, void *, u32,
                        struct nv50_disp *, struct nvkm_object **);
 int gf119_disp_base_new(const struct nvkm_oclass *, void *, u32,
@@ -90,6 +98,8 @@ int gf119_disp_ovly_new(const struct nvkm_oclass *, void *, u32,
 int gk104_disp_ovly_new(const struct nvkm_oclass *, void *, u32,
                        struct nv50_disp *, struct nvkm_object **);
 
+int gp102_disp_curs_new(const struct nvkm_oclass *, void *, u32,
+                       struct nv50_disp *, struct nvkm_object **);
 int gp102_disp_oimm_new(const struct nvkm_oclass *, void *, u32,
                        struct nv50_disp *, struct nvkm_object **);
 int gp102_disp_base_new(const struct nvkm_oclass *, void *, u32,
@@ -139,37 +149,4 @@ extern const struct nv50_disp_chan_mthd gf119_disp_base_mthd;
 
 extern const struct nv50_disp_chan_mthd gk104_disp_core_chan_mthd;
 extern const struct nv50_disp_chan_mthd gk104_disp_ovly_mthd;
-
-struct nv50_disp_pioc_oclass {
-       int (*ctor)(const struct nv50_disp_chan_func *,
-                   const struct nv50_disp_chan_mthd *,
-                   struct nv50_disp_root *, int ctrl, int user,
-                   const struct nvkm_oclass *, void *data, u32 size,
-                   struct nvkm_object **);
-       struct nvkm_sclass base;
-       const struct nv50_disp_chan_func *func;
-       const struct nv50_disp_chan_mthd *mthd;
-       struct {
-               int ctrl;
-               int user;
-       } chid;
-};
-
-extern const struct nv50_disp_pioc_oclass nv50_disp_curs_oclass;
-
-extern const struct nv50_disp_pioc_oclass g84_disp_curs_oclass;
-
-extern const struct nv50_disp_pioc_oclass gt215_disp_curs_oclass;
-
-extern const struct nv50_disp_pioc_oclass gf119_disp_curs_oclass;
-
-extern const struct nv50_disp_pioc_oclass gk104_disp_curs_oclass;
-
-extern const struct nv50_disp_pioc_oclass gp102_disp_curs_oclass;
-
-int nv50_disp_curs_new(const struct nv50_disp_chan_func *,
-                      const struct nv50_disp_chan_mthd *,
-                      struct nv50_disp_root *, int ctrl, int user,
-                      const struct nvkm_oclass *, void *data, u32 size,
-                      struct nvkm_object **);
 #endif
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/cursg84.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/cursg84.c
deleted file mode 100644 (file)
index fa781b5..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2015 Red Hat Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors: Ben Skeggs <bskeggs@redhat.com>
- */
-#include "channv50.h"
-#include "rootnv50.h"
-
-#include <nvif/class.h>
-
-const struct nv50_disp_pioc_oclass
-g84_disp_curs_oclass = {
-       .base.oclass = G82_DISP_CURSOR,
-       .base.minver = 0,
-       .base.maxver = 0,
-       .ctor = nv50_disp_curs_new,
-       .func = &nv50_disp_pioc_func,
-       .chid = { 7, 7 },
-};
index 2be6fb052c65ff5e1819bd4158cb7b931c1a10e1..cdda3658dcb32140fd70e923a50b05392bbf2f0f 100644 (file)
  * Authors: Ben Skeggs
  */
 #include "channv50.h"
-#include "rootnv50.h"
 
-#include <nvif/class.h>
-
-const struct nv50_disp_pioc_oclass
-gf119_disp_curs_oclass = {
-       .base.oclass = GF110_DISP_CURSOR,
-       .base.minver = 0,
-       .base.maxver = 0,
-       .ctor = nv50_disp_curs_new,
-       .func = &gf119_disp_pioc_func,
-       .chid = { 13, 13 },
-};
+int
+gf119_disp_curs_new(const struct nvkm_oclass *oclass, void *argv, u32 argc,
+                   struct nv50_disp *disp, struct nvkm_object **pobject)
+{
+       return nv50_disp_curs_new_(&gf119_disp_pioc_func, disp, 13, 13,
+                                  oclass, argv, argc, pobject);
+}
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgk104.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgk104.c
deleted file mode 100644 (file)
index 2a99db4..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2012 Red Hat Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors: Ben Skeggs
- */
-#include "channv50.h"
-#include "rootnv50.h"
-
-#include <nvif/class.h>
-
-const struct nv50_disp_pioc_oclass
-gk104_disp_curs_oclass = {
-       .base.oclass = GK104_DISP_CURSOR,
-       .base.minver = 0,
-       .base.maxver = 0,
-       .ctor = nv50_disp_curs_new,
-       .func = &gf119_disp_pioc_func,
-       .chid = { 13, 13 },
-};
index e958210d8105d9e5a659d4f0527c242e5a0542ac..1a4601f975e6efb501a64c0c963be4e5ee68b3fb 100644 (file)
  * Authors: Ben Skeggs <bskeggs@redhat.com>
  */
 #include "channv50.h"
-#include "rootnv50.h"
 
-#include <nvif/class.h>
-
-const struct nv50_disp_pioc_oclass
-gp102_disp_curs_oclass = {
-       .base.oclass = GK104_DISP_CURSOR,
-       .base.minver = 0,
-       .base.maxver = 0,
-       .ctor = nv50_disp_curs_new,
-       .func = &gf119_disp_pioc_func,
-       .chid = { 13, 17 },
-};
+int
+gp102_disp_curs_new(const struct nvkm_oclass *oclass, void *argv, u32 argc,
+                   struct nv50_disp *disp, struct nvkm_object **pobject)
+{
+       return nv50_disp_curs_new_(&gf119_disp_pioc_func, disp, 13, 17,
+                                  oclass, argv, argc, pobject);
+}
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgt215.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgt215.c
deleted file mode 100644 (file)
index 00a7f35..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2015 Red Hat Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors: Ben Skeggs <bskeggs@redhat.com>
- */
-#include "channv50.h"
-#include "rootnv50.h"
-
-#include <nvif/class.h>
-
-const struct nv50_disp_pioc_oclass
-gt215_disp_curs_oclass = {
-       .base.oclass = GT214_DISP_CURSOR,
-       .base.minver = 0,
-       .base.maxver = 0,
-       .ctor = nv50_disp_curs_new,
-       .func = &nv50_disp_pioc_func,
-       .chid = { 7, 7 },
-};
index 1f9a6c31ab3bb0b0cd0a422f2376aa10f1954daa..d29758504a5fd38268e32e50d799c4d3a9b8d62f 100644 (file)
  */
 #include "channv50.h"
 #include "head.h"
-#include "rootnv50.h"
 
 #include <core/client.h>
 
-#include <nvif/class.h>
 #include <nvif/cl507a.h>
 #include <nvif/unpack.h>
 
 int
-nv50_disp_curs_new(const struct nv50_disp_chan_func *func,
-                  const struct nv50_disp_chan_mthd *mthd,
-                  struct nv50_disp_root *root, int ctrl, int user,
-                  const struct nvkm_oclass *oclass, void *data, u32 size,
-                  struct nvkm_object **pobject)
+nv50_disp_curs_new_(const struct nv50_disp_chan_func *func,
+                   struct nv50_disp *disp, int ctrl, int user,
+                   const struct nvkm_oclass *oclass, void *argv, u32 argc,
+                   struct nvkm_object **pobject)
 {
        union {
                struct nv50_disp_cursor_v0 v0;
-       } *args = data;
+       } *args = argv;
        struct nvkm_object *parent = oclass->parent;
-       struct nv50_disp *disp = root->disp;
        int head, ret = -ENOSYS;
 
-       nvif_ioctl(parent, "create disp cursor size %d\n", size);
-       if (!(ret = nvif_unpack(ret, &data, &size, args->v0, 0, 0, false))) {
+       nvif_ioctl(parent, "create disp cursor size %d\n", argc);
+       if (!(ret = nvif_unpack(ret, &argv, &argc, args->v0, 0, 0, false))) {
                nvif_ioctl(parent, "create disp cursor vers %d head %d\n",
                           args->v0.version, args->v0.head);
                if (!nvkm_head_find(&disp->base, args->v0.head))
@@ -55,16 +51,14 @@ nv50_disp_curs_new(const struct nv50_disp_chan_func *func,
        } else
                return ret;
 
-       return nv50_disp_chan_new_(func, mthd, disp, ctrl + head, user + head,
+       return nv50_disp_chan_new_(func, NULL, disp, ctrl + head, user + head,
                                   head, oclass, pobject);
 }
 
-const struct nv50_disp_pioc_oclass
-nv50_disp_curs_oclass = {
-       .base.oclass = NV50_DISP_CURSOR,
-       .base.minver = 0,
-       .base.maxver = 0,
-       .ctor = nv50_disp_curs_new,
-       .func = &nv50_disp_pioc_func,
-       .chid = { 7, 7 },
-};
+int
+nv50_disp_curs_new(const struct nvkm_oclass *oclass, void *argv, u32 argc,
+                  struct nv50_disp *disp, struct nvkm_object **pobject)
+{
+       return nv50_disp_curs_new_(&nv50_disp_pioc_func, disp, 7, 7,
+                                  oclass, argv, argc, pobject);
+}
index fa9076ba0a751a77e8c67a99fec07ab2fce9544f..0f7e662cd175ed8225c4f4526e51aa12a8962026 100644 (file)
@@ -31,10 +31,8 @@ g84_disp_root = {
        .dmac = {
                &g84_disp_core_oclass,
        },
-       .pioc = {
-               &g84_disp_curs_oclass,
-       },
        .user = {
+               {{0,0,G82_DISP_CURSOR             }, nv50_disp_curs_new },
                {{0,0,G82_DISP_OVERLAY            }, nv50_disp_oimm_new },
                {{0,0,G82_DISP_BASE_CHANNEL_DMA   },  g84_disp_base_new },
                {{0,0,G82_DISP_OVERLAY_CHANNEL_DMA},  g84_disp_ovly_new },
index 6aeab0f0278b32820d0e10ef6ba6770c8f3402b2..20709d6e8a8b470a48f7b8b7dc9906d5f856e0ba 100644 (file)
@@ -31,10 +31,8 @@ g94_disp_root = {
        .dmac = {
                &g94_disp_core_oclass,
        },
-       .pioc = {
-               &g84_disp_curs_oclass,
-       },
        .user = {
+               {{0,0,  G82_DISP_CURSOR             },  nv50_disp_curs_new },
                {{0,0,  G82_DISP_OVERLAY            },  nv50_disp_oimm_new },
                {{0,0,GT200_DISP_BASE_CHANNEL_DMA   },   g84_disp_base_new },
                {{0,0,GT200_DISP_OVERLAY_CHANNEL_DMA}, gt200_disp_ovly_new },
index b44b145059492d2de99394a3a790f068ee037b9c..1161698dbb4e28b736e652d32c9d1f39e7c749d0 100644 (file)
@@ -31,10 +31,8 @@ gf119_disp_root = {
        .dmac = {
                &gf119_disp_core_oclass,
        },
-       .pioc = {
-               &gf119_disp_curs_oclass,
-       },
        .user = {
+               {{0,0,GF110_DISP_CURSOR             }, gf119_disp_curs_new },
                {{0,0,GF110_DISP_OVERLAY            }, gf119_disp_oimm_new },
                {{0,0,GF110_DISP_BASE_CHANNEL_DMA   }, gf119_disp_base_new },
                {{0,0,GF110_DISP_OVERLAY_CONTROL_DMA}, gf119_disp_ovly_new },
index c43eab97a3932fd606d0e34c3754f08895e7b165..15379ff5ebf4681c4e89680f479e8b27a39ff60b 100644 (file)
@@ -31,10 +31,8 @@ gk104_disp_root = {
        .dmac = {
                &gk104_disp_core_oclass,
        },
-       .pioc = {
-               &gk104_disp_curs_oclass,
-       },
        .user = {
+               {{0,0,GK104_DISP_CURSOR             }, gf119_disp_curs_new },
                {{0,0,GK104_DISP_OVERLAY            }, gf119_disp_oimm_new },
                {{0,0,GK104_DISP_BASE_CHANNEL_DMA   }, gf119_disp_base_new },
                {{0,0,GK104_DISP_OVERLAY_CONTROL_DMA}, gk104_disp_ovly_new },
index 2d48e73597b0cc28f63df7cfc51f1f5a2be16ee1..0a47674f6541c6551375f024d4305a2a7edd8b3c 100644 (file)
@@ -31,10 +31,8 @@ gk110_disp_root = {
        .dmac = {
                &gk110_disp_core_oclass,
        },
-       .pioc = {
-               &gk104_disp_curs_oclass,
-       },
        .user = {
+               {{0,0,GK104_DISP_CURSOR             }, gf119_disp_curs_new },
                {{0,0,GK104_DISP_OVERLAY            }, gf119_disp_oimm_new },
                {{0,0,GK110_DISP_BASE_CHANNEL_DMA   }, gf119_disp_base_new },
                {{0,0,GK104_DISP_OVERLAY_CONTROL_DMA}, gk104_disp_ovly_new },
index 904125e8199f7919794ff6d4f01bcee43b2f69bb..819521e25717837b4d57a97e090630b63b64d08c 100644 (file)
@@ -31,10 +31,8 @@ gm107_disp_root = {
        .dmac = {
                &gm107_disp_core_oclass,
        },
-       .pioc = {
-               &gk104_disp_curs_oclass,
-       },
        .user = {
+               {{0,0,GK104_DISP_CURSOR             }, gf119_disp_curs_new },
                {{0,0,GK104_DISP_OVERLAY            }, gf119_disp_oimm_new },
                {{0,0,GK110_DISP_BASE_CHANNEL_DMA   }, gf119_disp_base_new },
                {{0,0,GK104_DISP_OVERLAY_CONTROL_DMA}, gk104_disp_ovly_new },
index 52e9ccac93fa2f9808828f4d97699d0a67c3dc6b..0dca1772bf3397a7259a3b5242a5854b8583f239 100644 (file)
@@ -31,10 +31,8 @@ gm200_disp_root = {
        .dmac = {
                &gm200_disp_core_oclass,
        },
-       .pioc = {
-               &gk104_disp_curs_oclass,
-       },
        .user = {
+               {{0,0,GK104_DISP_CURSOR             }, gf119_disp_curs_new },
                {{0,0,GK104_DISP_OVERLAY            }, gf119_disp_oimm_new },
                {{0,0,GK110_DISP_BASE_CHANNEL_DMA   }, gf119_disp_base_new },
                {{0,0,GK104_DISP_OVERLAY_CONTROL_DMA}, gk104_disp_ovly_new },
index 57f40d4930f730852938692af5d55144a352c1ed..6fcf8583b8195565d9937e42cdf5991e9bb6ef81 100644 (file)
@@ -31,10 +31,8 @@ gp100_disp_root = {
        .dmac = {
                &gp100_disp_core_oclass,
        },
-       .pioc = {
-               &gk104_disp_curs_oclass,
-       },
        .user = {
+               {{0,0,GK104_DISP_CURSOR             }, gf119_disp_curs_new },
                {{0,0,GK104_DISP_OVERLAY            }, gf119_disp_oimm_new },
                {{0,0,GK110_DISP_BASE_CHANNEL_DMA   }, gf119_disp_base_new },
                {{0,0,GK104_DISP_OVERLAY_CONTROL_DMA}, gk104_disp_ovly_new },
index f66d7fced3def633a426d5d6ac4e03627fe531ad..bf5cbc32120d856cc917025d97df47d39759ebf8 100644 (file)
@@ -31,10 +31,8 @@ gp102_disp_root = {
        .dmac = {
                &gp102_disp_core_oclass,
        },
-       .pioc = {
-               &gp102_disp_curs_oclass,
-       },
        .user = {
+               {{0,0,GK104_DISP_CURSOR             }, gp102_disp_curs_new },
                {{0,0,GK104_DISP_OVERLAY            }, gp102_disp_oimm_new },
                {{0,0,GK110_DISP_BASE_CHANNEL_DMA   }, gp102_disp_base_new },
                {{0,0,GK104_DISP_OVERLAY_CONTROL_DMA}, gp102_disp_ovly_new },
index c28017998bc6a776b304bc7d7aa58909f9418af3..2bd3f36475e30458a73fe71868ea3f3b38bed22c 100644 (file)
@@ -31,10 +31,8 @@ gt200_disp_root = {
        .dmac = {
                &gt200_disp_core_oclass,
        },
-       .pioc = {
-               &g84_disp_curs_oclass,
-       },
        .user = {
+               {{0,0,  G82_DISP_CURSOR             },  nv50_disp_curs_new },
                {{0,0,  G82_DISP_OVERLAY            },  nv50_disp_oimm_new },
                {{0,0,GT200_DISP_BASE_CHANNEL_DMA   },   g84_disp_base_new },
                {{0,0,GT200_DISP_OVERLAY_CHANNEL_DMA}, gt200_disp_ovly_new },
index b9a6a32de82f6a0352918805d99224decc7984ed..aa4c52355e884081b93a159aec0b34b9ebbc131b 100644 (file)
@@ -31,10 +31,8 @@ gt215_disp_root = {
        .dmac = {
                &gt215_disp_core_oclass,
        },
-       .pioc = {
-               &gt215_disp_curs_oclass,
-       },
        .user = {
+               {{0,0,GT214_DISP_CURSOR             },  nv50_disp_curs_new },
                {{0,0,GT214_DISP_OVERLAY            },  nv50_disp_oimm_new },
                {{0,0,GT214_DISP_BASE_CHANNEL_DMA   },   g84_disp_base_new },
                {{0,0,GT214_DISP_OVERLAY_CHANNEL_DMA},   g84_disp_ovly_new },
index a87531d9a3b8ed3d6d56389f5fd92c8415203d9c..24e8b418ac6577b8bce77c3225e956cb84f64adc 100644 (file)
@@ -278,16 +278,6 @@ nv50_disp_root_dmac_new_(const struct nvkm_oclass *oclass,
                            oclass, data, size, pobject);
 }
 
-static int
-nv50_disp_root_pioc_new_(const struct nvkm_oclass *oclass,
-                        void *data, u32 size, struct nvkm_object **pobject)
-{
-       const struct nv50_disp_pioc_oclass *sclass = oclass->priv;
-       struct nv50_disp_root *root = nv50_disp_root(oclass->parent);
-       return sclass->ctor(sclass->func, sclass->mthd, root, sclass->chid.ctrl,
-                           sclass->chid.user, oclass, data, size, pobject);
-}
-
 static int
 nv50_disp_root_child_new_(const struct nvkm_oclass *oclass,
                          void *argv, u32 argc, struct nvkm_object **pobject)
@@ -312,15 +302,6 @@ nv50_disp_root_child_get_(struct nvkm_object *object, int index,
 
        index -= ARRAY_SIZE(root->func->dmac);
 
-       if (index < ARRAY_SIZE(root->func->pioc)) {
-               sclass->base = root->func->pioc[index]->base;
-               sclass->priv = root->func->pioc[index];
-               sclass->ctor = nv50_disp_root_pioc_new_;
-               return 0;
-       }
-
-       index -= ARRAY_SIZE(root->func->pioc);
-
        if (root->func->user[index].ctor) {
                sclass->base = root->func->user[index].base;
                sclass->priv = root->func->user + index;
@@ -369,10 +350,8 @@ nv50_disp_root = {
        .dmac = {
                &nv50_disp_core_oclass,
        },
-       .pioc = {
-               &nv50_disp_curs_oclass,
-       },
        .user = {
+               {{0,0,NV50_DISP_CURSOR             }, nv50_disp_curs_new },
                {{0,0,NV50_DISP_OVERLAY            }, nv50_disp_oimm_new },
                {{0,0,NV50_DISP_BASE_CHANNEL_DMA   }, nv50_disp_base_new },
                {{0,0,NV50_DISP_OVERLAY_CHANNEL_DMA}, nv50_disp_ovly_new },
index 371c6ee323131a28835f8e726f3d86e99c383c4d..484868af6597735f11c8df114aa1adf96c5cea75 100644 (file)
@@ -3,7 +3,6 @@
 #define __NV50_DISP_ROOT_H__
 #define nv50_disp_root(p) container_of((p), struct nv50_disp_root, object)
 #include "nv50.h"
-#include "channv50.h"
 #include "dmacnv50.h"
 
 struct nv50_disp_root {
@@ -14,7 +13,6 @@ struct nv50_disp_root {
 
 struct nv50_disp_root_func {
        const struct nv50_disp_dmac_oclass *dmac[1];
-       const struct nv50_disp_pioc_oclass *pioc[1];
        struct nv50_disp_user {
                struct nvkm_sclass base;
                int (*ctor)(const struct nvkm_oclass *, void *argv, u32 argc,