drm/nouveau/disp: collapse nv50_disp_func into nvkm_disp_func
authorBen Skeggs <bskeggs@redhat.com>
Wed, 1 Jun 2022 10:46:26 +0000 (20:46 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 26 Jul 2022 23:05:45 +0000 (09:05 +1000)
Aside from a chicken-and-egg problem with a duplicate 'root' member,
this is a straight dump of function pointers from one struct into
another.

The left-over wrapping mess in >=nv50 structs will be fixed later.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
21 files changed:
drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/g84.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/g94.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/ga102.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/gk110.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/gp102.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/gt200.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp77.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp89.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/nv04.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/priv.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/tu102.c

index 5daa777552767caf53ab04af65d6568efe0d1d22..accfabf87994fc68c9676383a9693f9449bb6432 100644 (file)
@@ -197,9 +197,8 @@ nvkm_disp_class_get(struct nvkm_oclass *oclass, int index,
 {
        struct nvkm_disp *disp = nvkm_disp(oclass->engine);
        if (index == 0) {
-               const struct nvkm_disp_oclass *root = disp->func->root(disp);
-               oclass->base = root->base;
-               oclass->engn = root;
+               oclass->base = disp->func->root->base;
+               oclass->engn = disp->func->root;
                *class = &nvkm_disp_sclass;
                return 0;
        }
index 156bbe8b2de3e2107f8aa5df88682afb7069364b..2a13931ceb572193b86e88187f72df4d43827f44 100644 (file)
 #include "ior.h"
 #include "rootnv50.h"
 
-static const struct nv50_disp_func
+static const struct nvkm_disp_func
 g84_disp = {
-       .init = nv50_disp_init,
-       .fini = nv50_disp_fini,
-       .intr = nv50_disp_intr,
+       .dtor = nv50_disp_dtor_,
+       .oneinit = nv50_disp_oneinit_,
+       .init = nv50_disp_init_,
+       .fini = nv50_disp_fini_,
+       .intr = nv50_disp_intr_,
+       .init_ = nv50_disp_init,
+       .fini_ = nv50_disp_fini,
+       .intr_ = nv50_disp_intr,
        .uevent = &nv50_disp_chan_uevent,
        .super = nv50_disp_super,
        .root = &g84_disp_root_oclass,
index 3425b5d3bc72f65ef19e5a69f503669cf4737c46..551615582882a9d12cfaeb79cb2bdcdc930ec45b 100644 (file)
 #include "ior.h"
 #include "rootnv50.h"
 
-static const struct nv50_disp_func
+static const struct nvkm_disp_func
 g94_disp = {
-       .init = nv50_disp_init,
-       .fini = nv50_disp_fini,
-       .intr = nv50_disp_intr,
+       .dtor = nv50_disp_dtor_,
+       .oneinit = nv50_disp_oneinit_,
+       .init = nv50_disp_init_,
+       .fini = nv50_disp_fini_,
+       .intr = nv50_disp_intr_,
+       .init_ = nv50_disp_init,
+       .fini_ = nv50_disp_fini,
+       .intr_ = nv50_disp_intr,
        .uevent = &nv50_disp_chan_uevent,
        .super = nv50_disp_super,
        .root = &g94_disp_root_oclass,
index 68aa52588d92fe202a15328ce74a8c33dc9fdb8c..c7b280973d8689f29b800bc0c7e748717b44c121 100644 (file)
 #include "channv50.h"
 #include "rootnv50.h"
 
-static const struct nv50_disp_func
+static const struct nvkm_disp_func
 ga102_disp = {
-       .init = tu102_disp_init,
-       .fini = gv100_disp_fini,
-       .intr = gv100_disp_intr,
+       .dtor = nv50_disp_dtor_,
+       .oneinit = nv50_disp_oneinit_,
+       .init = nv50_disp_init_,
+       .fini = nv50_disp_fini_,
+       .intr = nv50_disp_intr_,
+       .init_ = tu102_disp_init,
+       .fini_ = gv100_disp_fini,
+       .intr_ = gv100_disp_intr,
        .uevent = &gv100_disp_chan_uevent,
        .super = gv100_disp_super,
        .root = &ga102_disp_root_oclass,
index a6bafe7fea1f2bd34f30c8b2e5d4902b739b027c..905ee2acbd7e86d69961d5cc1e822736fb9c339f 100644 (file)
@@ -251,11 +251,16 @@ gf119_disp_init(struct nv50_disp *disp)
        return 0;
 }
 
-static const struct nv50_disp_func
+static const struct nvkm_disp_func
 gf119_disp = {
-       .init = gf119_disp_init,
-       .fini = gf119_disp_fini,
-       .intr = gf119_disp_intr,
+       .dtor = nv50_disp_dtor_,
+       .oneinit = nv50_disp_oneinit_,
+       .init = nv50_disp_init_,
+       .fini = nv50_disp_fini_,
+       .intr = nv50_disp_intr_,
+       .init_ = gf119_disp_init,
+       .fini_ = gf119_disp_fini,
+       .intr_ = gf119_disp_intr,
        .intr_error = gf119_disp_intr_error,
        .uevent = &gf119_disp_chan_uevent,
        .super = gf119_disp_super,
index 3b79cf233ac5a7044cff1535ddfd59b9ef3e96d0..15c7502409035349fadb9459b9d6f2e9dbf08cb3 100644 (file)
 #include "ior.h"
 #include "rootnv50.h"
 
-static const struct nv50_disp_func
+static const struct nvkm_disp_func
 gk104_disp = {
-       .init = gf119_disp_init,
-       .fini = gf119_disp_fini,
-       .intr = gf119_disp_intr,
+       .dtor = nv50_disp_dtor_,
+       .oneinit = nv50_disp_oneinit_,
+       .init = nv50_disp_init_,
+       .fini = nv50_disp_fini_,
+       .intr = nv50_disp_intr_,
+       .init_ = gf119_disp_init,
+       .fini_ = gf119_disp_fini,
+       .intr_ = gf119_disp_intr,
        .intr_error = gf119_disp_intr_error,
        .uevent = &gf119_disp_chan_uevent,
        .super = gf119_disp_super,
index 988eb12237a6edf976c865fc9ad6ba31ded6cec5..fcde0c5da11183dc8aaab8d6577ee1db92e1cc1f 100644 (file)
 #include "ior.h"
 #include "rootnv50.h"
 
-static const struct nv50_disp_func
+static const struct nvkm_disp_func
 gk110_disp = {
-       .init = gf119_disp_init,
-       .fini = gf119_disp_fini,
-       .intr = gf119_disp_intr,
+       .dtor = nv50_disp_dtor_,
+       .oneinit = nv50_disp_oneinit_,
+       .init = nv50_disp_init_,
+       .fini = nv50_disp_fini_,
+       .intr = nv50_disp_intr_,
+       .init_ = gf119_disp_init,
+       .fini_ = gf119_disp_fini,
+       .intr_ = gf119_disp_intr,
        .intr_error = gf119_disp_intr_error,
        .uevent = &gf119_disp_chan_uevent,
        .super = gf119_disp_super,
index 5d8108feeacdb9cdc0102582eff2be33b7116b33..8a072663b062a7195ad781d5f680e806882ccb14 100644 (file)
 #include "ior.h"
 #include "rootnv50.h"
 
-static const struct nv50_disp_func
+static const struct nvkm_disp_func
 gm107_disp = {
-       .init = gf119_disp_init,
-       .fini = gf119_disp_fini,
-       .intr = gf119_disp_intr,
+       .dtor = nv50_disp_dtor_,
+       .oneinit = nv50_disp_oneinit_,
+       .init = nv50_disp_init_,
+       .fini = nv50_disp_fini_,
+       .intr = nv50_disp_intr_,
+       .init_ = gf119_disp_init,
+       .fini_ = gf119_disp_fini,
+       .intr_ = gf119_disp_intr,
        .intr_error = gf119_disp_intr_error,
        .uevent = &gf119_disp_chan_uevent,
        .super = gf119_disp_super,
index f7bb660874768e32526121d7385eee7cda8fc3ad..af21bf0baf7e93135b0355937907271a9d33d1ee 100644 (file)
 #include "ior.h"
 #include "rootnv50.h"
 
-static const struct nv50_disp_func
+static const struct nvkm_disp_func
 gm200_disp = {
-       .init = gf119_disp_init,
-       .fini = gf119_disp_fini,
-       .intr = gf119_disp_intr,
+       .dtor = nv50_disp_dtor_,
+       .oneinit = nv50_disp_oneinit_,
+       .init = nv50_disp_init_,
+       .fini = nv50_disp_fini_,
+       .intr = nv50_disp_intr_,
+       .init_ = gf119_disp_init,
+       .fini_ = gf119_disp_fini,
+       .intr_ = gf119_disp_intr,
        .intr_error = gf119_disp_intr_error,
        .uevent = &gf119_disp_chan_uevent,
        .super = gf119_disp_super,
index af0ca812a39497c147a2957c5eb44ca6b7d6a12e..ac43cfb7c7bd687ebab253777ad98cca8573f781 100644 (file)
 #include "ior.h"
 #include "rootnv50.h"
 
-static const struct nv50_disp_func
+static const struct nvkm_disp_func
 gp100_disp = {
-       .init = gf119_disp_init,
-       .fini = gf119_disp_fini,
-       .intr = gf119_disp_intr,
+       .dtor = nv50_disp_dtor_,
+       .oneinit = nv50_disp_oneinit_,
+       .init = nv50_disp_init_,
+       .fini = nv50_disp_fini_,
+       .intr = nv50_disp_intr_,
+       .init_ = gf119_disp_init,
+       .fini_ = gf119_disp_fini,
+       .intr_ = gf119_disp_intr,
        .intr_error = gf119_disp_intr_error,
        .uevent = &gf119_disp_chan_uevent,
        .super = gf119_disp_super,
index 065fea1bdfd12b996268d99aab34b3ca6d6241d4..235e4b6556eb8bad984db20a92eef15cffd2b898 100644 (file)
@@ -53,11 +53,16 @@ gp102_disp_intr_error(struct nv50_disp *disp, int chid)
        nvkm_wr32(device, 0x6111f0 + (chid * 12), 0x90000000);
 }
 
-static const struct nv50_disp_func
+static const struct nvkm_disp_func
 gp102_disp = {
-       .init = gf119_disp_init,
-       .fini = gf119_disp_fini,
-       .intr = gf119_disp_intr,
+       .dtor = nv50_disp_dtor_,
+       .oneinit = nv50_disp_oneinit_,
+       .init = nv50_disp_init_,
+       .fini = nv50_disp_fini_,
+       .intr = nv50_disp_intr_,
+       .init_ = gf119_disp_init,
+       .fini_ = gf119_disp_fini,
+       .intr_ = gf119_disp_intr,
        .intr_error = gp102_disp_intr_error,
        .uevent = &gf119_disp_chan_uevent,
        .super = gf119_disp_super,
index 22bc269df64acba2aae6525bafced3e13ccd0094..e3d1789e66a8c8bcc755455e1e51a601024982f9 100644 (file)
 #include "ior.h"
 #include "rootnv50.h"
 
-static const struct nv50_disp_func
+static const struct nvkm_disp_func
 gt200_disp = {
-       .init = nv50_disp_init,
-       .fini = nv50_disp_fini,
-       .intr = nv50_disp_intr,
+       .dtor = nv50_disp_dtor_,
+       .oneinit = nv50_disp_oneinit_,
+       .init = nv50_disp_init_,
+       .fini = nv50_disp_fini_,
+       .intr = nv50_disp_intr_,
+       .init_ = nv50_disp_init,
+       .fini_ = nv50_disp_fini,
+       .intr_ = nv50_disp_intr,
        .uevent = &nv50_disp_chan_uevent,
        .super = nv50_disp_super,
        .root = &gt200_disp_root_oclass,
index 63a912b174d7fff0636866e74599e6436912d45f..c38f1a8df8ac0c248455976e55c2c72e212c64f5 100644 (file)
 #include "ior.h"
 #include "rootnv50.h"
 
-static const struct nv50_disp_func
+static const struct nvkm_disp_func
 gt215_disp = {
-       .init = nv50_disp_init,
-       .fini = nv50_disp_fini,
-       .intr = nv50_disp_intr,
+       .dtor = nv50_disp_dtor_,
+       .oneinit = nv50_disp_oneinit_,
+       .init = nv50_disp_init_,
+       .fini = nv50_disp_fini_,
+       .intr = nv50_disp_intr_,
+       .init_ = nv50_disp_init,
+       .fini_ = nv50_disp_fini,
+       .intr_ = nv50_disp_intr,
        .uevent = &nv50_disp_chan_uevent,
        .super = nv50_disp_super,
        .root = &gt215_disp_root_oclass,
index 53879d5271cf730b0352b72990d6b95929798a3d..fa9d44611bcb8178f0fdf074a14f392bd2780b30 100644 (file)
@@ -426,11 +426,16 @@ gv100_disp_init(struct nv50_disp *disp)
        return 0;
 }
 
-static const struct nv50_disp_func
+static const struct nvkm_disp_func
 gv100_disp = {
-       .init = gv100_disp_init,
-       .fini = gv100_disp_fini,
-       .intr = gv100_disp_intr,
+       .dtor = nv50_disp_dtor_,
+       .oneinit = nv50_disp_oneinit_,
+       .init = nv50_disp_init_,
+       .fini = nv50_disp_fini_,
+       .intr = nv50_disp_intr_,
+       .init_ = gv100_disp_init,
+       .fini_ = gv100_disp_fini,
+       .intr_ = gv100_disp_intr,
        .uevent = &gv100_disp_chan_uevent,
        .super = gv100_disp_super,
        .root = &gv100_disp_root_oclass,
index 762a59f24bbb4f68c07c9ce4a1c4e9ec706a5e61..d92921198f47a04aab5e9a9183382f217f6e9ff9 100644 (file)
 #include "ior.h"
 #include "rootnv50.h"
 
-static const struct nv50_disp_func
+static const struct nvkm_disp_func
 mcp77_disp = {
-       .init = nv50_disp_init,
-       .fini = nv50_disp_fini,
-       .intr = nv50_disp_intr,
+       .dtor = nv50_disp_dtor_,
+       .oneinit = nv50_disp_oneinit_,
+       .init = nv50_disp_init_,
+       .fini = nv50_disp_fini_,
+       .intr = nv50_disp_intr_,
+       .init_ = nv50_disp_init,
+       .fini_ = nv50_disp_fini,
+       .intr_ = nv50_disp_intr,
        .uevent = &nv50_disp_chan_uevent,
        .super = nv50_disp_super,
        .root = &g94_disp_root_oclass,
index e5c58aae15de64960421fdae2572c2a345e3184f..644dfe300df5cc6f9b6ad8ebf71c30974d5744ea 100644 (file)
 #include "ior.h"
 #include "rootnv50.h"
 
-static const struct nv50_disp_func
+static const struct nvkm_disp_func
 mcp89_disp = {
-       .init = nv50_disp_init,
-       .fini = nv50_disp_fini,
-       .intr = nv50_disp_intr,
+       .dtor = nv50_disp_dtor_,
+       .oneinit = nv50_disp_oneinit_,
+       .init = nv50_disp_init_,
+       .fini = nv50_disp_fini_,
+       .intr = nv50_disp_intr_,
+       .init_ = nv50_disp_init,
+       .fini_ = nv50_disp_fini,
+       .intr_ = nv50_disp_intr,
        .uevent = &nv50_disp_chan_uevent,
        .super = nv50_disp_super,
        .root = &gt215_disp_root_oclass,
index a12097db2c2a76f96d1750134284a2177a8dc415..454199cc88fba9c399e869d2a8409c2e7a34e083 100644 (file)
 #include "priv.h"
 #include "head.h"
 
-static const struct nvkm_disp_oclass *
-nv04_disp_root(struct nvkm_disp *disp)
-{
-       return &nv04_disp_root_oclass;
-}
-
 static void
 nv04_disp_intr(struct nvkm_disp *disp)
 {
@@ -60,7 +54,7 @@ nv04_disp_intr(struct nvkm_disp *disp)
 static const struct nvkm_disp_func
 nv04_disp = {
        .intr = nv04_disp_intr,
-       .root = nv04_disp_root,
+       .root = &nv04_disp_root_oclass,
 };
 
 int
index 3f20e49070ced83aa61a577d76e2db5338feb892..a4713415a2a8e6e39a3b47a747019ed5f995d23c 100644 (file)
 #include <subdev/devinit.h>
 #include <subdev/timer.h>
 
-static const struct nvkm_disp_oclass *
-nv50_disp_root_(struct nvkm_disp *base)
-{
-       return nv50_disp(base)->func->root;
-}
-
-static void
+void
 nv50_disp_intr_(struct nvkm_disp *base)
 {
        struct nv50_disp *disp = nv50_disp(base);
-       disp->func->intr(disp);
+       disp->func->intr_(disp);
 }
 
-static void
+void
 nv50_disp_fini_(struct nvkm_disp *base)
 {
        struct nv50_disp *disp = nv50_disp(base);
-       disp->func->fini(disp);
+       disp->func->fini_(disp);
 }
 
-static int
+int
 nv50_disp_init_(struct nvkm_disp *base)
 {
        struct nv50_disp *disp = nv50_disp(base);
-       return disp->func->init(disp);
+       return disp->func->init_(disp);
 }
 
-static void *
+void *
 nv50_disp_dtor_(struct nvkm_disp *base)
 {
        struct nv50_disp *disp = nv50_disp(base);
@@ -78,11 +72,11 @@ nv50_disp_dtor_(struct nvkm_disp *base)
        return disp;
 }
 
-static int
+int
 nv50_disp_oneinit_(struct nvkm_disp *base)
 {
        struct nv50_disp *disp = nv50_disp(base);
-       const struct nv50_disp_func *func = disp->func;
+       const struct nvkm_disp_func *func = disp->func;
        struct nvkm_subdev *subdev = &disp->base.engine.subdev;
        struct nvkm_device *device = subdev->device;
        int ret, i;
@@ -142,18 +136,8 @@ nv50_disp_oneinit_(struct nvkm_disp *base)
                              0x1000, 0, disp->inst, &disp->ramht);
 }
 
-static const struct nvkm_disp_func
-nv50_disp_ = {
-       .dtor = nv50_disp_dtor_,
-       .oneinit = nv50_disp_oneinit_,
-       .init = nv50_disp_init_,
-       .fini = nv50_disp_fini_,
-       .intr = nv50_disp_intr_,
-       .root = nv50_disp_root_,
-};
-
 int
-nv50_disp_new_(const struct nv50_disp_func *func, struct nvkm_device *device,
+nv50_disp_new_(const struct nvkm_disp_func *func, struct nvkm_device *device,
               enum nvkm_subdev_type type, int inst, struct nvkm_disp **pdisp)
 {
        struct nv50_disp *disp;
@@ -164,7 +148,7 @@ nv50_disp_new_(const struct nv50_disp_func *func, struct nvkm_device *device,
        disp->func = func;
        *pdisp = &disp->base;
 
-       ret = nvkm_disp_ctor(&nv50_disp_, device, type, inst, &disp->base);
+       ret = nvkm_disp_ctor(func, device, type, inst, &disp->base);
        if (ret)
                return ret;
 
@@ -754,11 +738,16 @@ nv50_disp_init(struct nv50_disp *disp)
        return 0;
 }
 
-static const struct nv50_disp_func
+static const struct nvkm_disp_func
 nv50_disp = {
-       .init = nv50_disp_init,
-       .fini = nv50_disp_fini,
-       .intr = nv50_disp_intr,
+       .dtor = nv50_disp_dtor_,
+       .oneinit = nv50_disp_oneinit_,
+       .init = nv50_disp_init_,
+       .fini = nv50_disp_fini_,
+       .intr = nv50_disp_intr_,
+       .init_ = nv50_disp_init,
+       .fini_ = nv50_disp_fini,
+       .intr_ = nv50_disp_intr,
        .uevent = &nv50_disp_chan_uevent,
        .super = nv50_disp_super,
        .root = &nv50_disp_root_oclass,
index 025cacd7c3b012567f27a52db045f4bf27ff2115..87e934c8d88bd62b341952452f1016f9fd7199d7 100644 (file)
@@ -8,7 +8,7 @@ struct nvkm_head;
 #include <core/enum.h>
 
 struct nv50_disp {
-       const struct nv50_disp_func *func;
+       const struct nvkm_disp_func *func;
        struct nvkm_disp base;
 
        struct workqueue_struct *wq;
@@ -47,28 +47,9 @@ void nv50_disp_super_2_1(struct nv50_disp *, struct nvkm_head *);
 void nv50_disp_super_2_2(struct nv50_disp *, struct nvkm_head *);
 void nv50_disp_super_3_0(struct nv50_disp *, struct nvkm_head *);
 
-int nv50_disp_new_(const struct nv50_disp_func *, struct nvkm_device *, enum nvkm_subdev_type, int,
+int nv50_disp_new_(const struct nvkm_disp_func *, struct nvkm_device *, enum nvkm_subdev_type, int,
                   struct nvkm_disp **);
 
-struct nv50_disp_func {
-       int (*init)(struct nv50_disp *);
-       void (*fini)(struct nv50_disp *);
-       void (*intr)(struct nv50_disp *);
-       void (*intr_error)(struct nv50_disp *, int chid);
-
-       const struct nvkm_event_func *uevent;
-       void (*super)(struct work_struct *);
-
-       const struct nvkm_disp_oclass *root;
-
-       struct {
-               int (*cnt)(struct nvkm_disp *, unsigned long *mask);
-               int (*new)(struct nvkm_disp *, int id);
-       } wndw, head, dac, sor, pior;
-
-       u16 ramht_size;
-};
-
 int nv50_disp_init(struct nv50_disp *);
 void nv50_disp_fini(struct nv50_disp *);
 void nv50_disp_intr(struct nv50_disp *);
index ec57d8b6bce9311dde08d326f482c15f0e282278..3df687781f9ad3225e2f814069363355f75f34ab 100644 (file)
@@ -3,6 +3,7 @@
 #define __NVKM_DISP_PRIV_H__
 #include <engine/disp.h>
 #include "outp.h"
+struct nv50_disp;
 
 int nvkm_disp_ctor(const struct nvkm_disp_func *, struct nvkm_device *, enum nvkm_subdev_type, int,
                   struct nvkm_disp *);
@@ -17,13 +18,34 @@ struct nvkm_disp_func {
        void (*fini)(struct nvkm_disp *);
        void (*intr)(struct nvkm_disp *);
 
-       const struct nvkm_disp_oclass *(*root)(struct nvkm_disp *);
+       const struct nvkm_disp_oclass *root;
+
+       int (*init_)(struct nv50_disp *);
+       void (*fini_)(struct nv50_disp *);
+       void (*intr_)(struct nv50_disp *);
+       void (*intr_error)(struct nv50_disp *, int chid);
+
+       const struct nvkm_event_func *uevent;
+       void (*super)(struct work_struct *);
+
+       struct {
+               int (*cnt)(struct nvkm_disp *, unsigned long *mask);
+               int (*new)(struct nvkm_disp *, int id);
+       } wndw, head, dac, sor, pior;
+
+       u16 ramht_size;
 };
 
 int  nvkm_disp_ntfy(struct nvkm_object *, u32, struct nvkm_event **);
 
 extern const struct nvkm_disp_oclass nv04_disp_root_oclass;
 
+void *nv50_disp_dtor_(struct nvkm_disp *);
+int nv50_disp_oneinit_(struct nvkm_disp *);
+int nv50_disp_init_(struct nvkm_disp *);
+void nv50_disp_fini_(struct nvkm_disp *);
+void nv50_disp_intr_(struct nvkm_disp *);
+
 struct nvkm_disp_oclass {
        int (*ctor)(struct nvkm_disp *, const struct nvkm_oclass *,
                    void *data, u32 size, struct nvkm_object **);
index f5f8dc8e8f35d315b8e7114ee1b28dc9573feb5b..39f1aff1e4752a02765991f07455f08cbac78a52 100644 (file)
@@ -131,11 +131,16 @@ tu102_disp_init(struct nv50_disp *disp)
        return 0;
 }
 
-static const struct nv50_disp_func
+static const struct nvkm_disp_func
 tu102_disp = {
-       .init = tu102_disp_init,
-       .fini = gv100_disp_fini,
-       .intr = gv100_disp_intr,
+       .dtor = nv50_disp_dtor_,
+       .oneinit = nv50_disp_oneinit_,
+       .init = nv50_disp_init_,
+       .fini = nv50_disp_fini_,
+       .intr = nv50_disp_intr_,
+       .init_ = tu102_disp_init,
+       .fini_ = gv100_disp_fini,
+       .intr_ = gv100_disp_intr,
        .uevent = &gv100_disp_chan_uevent,
        .super = gv100_disp_super,
        .root = &tu102_disp_root_oclass,