]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/nouveau/disp: remove hw-specific customisation of output paths
authorBen Skeggs <bskeggs@redhat.com>
Fri, 19 May 2017 13:59:35 +0000 (23:59 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 16 Jun 2017 04:04:57 +0000 (14:04 +1000)
All of the necessary hw-specific logic is now handled at the output
resource level, so all of this can go away.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
28 files changed:
drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/dacnv50.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.h
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/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/mcp77.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp89.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/outp.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/piornv50.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/priv.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/sornv50.c

index 24d2f325cbc5ab20c003084ac18c4b89ea7632bd..c7c84d34d97e20308b926077e7ed4ce6e8d77281 100644 (file)
@@ -23,6 +23,7 @@
  */
 #include "priv.h"
 #include "conn.h"
+#include "dp.h"
 #include "head.h"
 #include "ior.h"
 #include "outp.h"
@@ -252,7 +253,8 @@ static int
 nvkm_disp_oneinit(struct nvkm_engine *engine)
 {
        struct nvkm_disp *disp = nvkm_disp(engine);
-       struct nvkm_bios *bios = disp->engine.subdev.device->bios;
+       struct nvkm_subdev *subdev = &disp->engine.subdev;
+       struct nvkm_bios *bios = subdev->device->bios;
        struct nvkm_outp *outp, *outt, *pair;
        struct nvkm_conn *conn;
        struct nvkm_head *head;
@@ -265,52 +267,38 @@ nvkm_disp_oneinit(struct nvkm_engine *engine)
        /* Create output path objects for each VBIOS display path. */
        i = -1;
        while ((data = dcb_outp_parse(bios, ++i, &ver, &hdr, &dcbE))) {
-               const struct nvkm_disp_func_outp *outps;
-               int (*ctor)(struct nvkm_disp *, int, struct dcb_output *,
-                           struct nvkm_outp **);
-
                if (dcbE.type == DCB_OUTPUT_UNUSED)
                        continue;
                if (dcbE.type == DCB_OUTPUT_EOL)
                        break;
                outp = NULL;
 
-               switch (dcbE.location) {
-               case 0: outps = &disp->func->outp.internal; break;
-               case 1: outps = &disp->func->outp.external; break;
-               default:
-                       nvkm_warn(&disp->engine.subdev,
-                                 "dcb %d locn %d unknown\n", i, dcbE.location);
-                       continue;
-               }
-
                switch (dcbE.type) {
-               case DCB_OUTPUT_ANALOG: ctor = outps->crt ; break;
-               case DCB_OUTPUT_TV    : ctor = outps->tv  ; break;
-               case DCB_OUTPUT_TMDS  : ctor = outps->tmds; break;
-               case DCB_OUTPUT_LVDS  : ctor = outps->lvds; break;
-               case DCB_OUTPUT_DP    : ctor = outps->dp  ; break;
+               case DCB_OUTPUT_ANALOG:
+               case DCB_OUTPUT_TV:
+               case DCB_OUTPUT_TMDS:
+               case DCB_OUTPUT_LVDS:
+                       ret = nvkm_outp_new(disp, i, &dcbE, &outp);
+                       break;
+               case DCB_OUTPUT_DP:
+                       ret = nvkm_dp_new(disp, i, &dcbE, &outp);
+                       break;
                default:
-                       nvkm_warn(&disp->engine.subdev,
-                                 "dcb %d type %d unknown\n", i, dcbE.type);
+                       nvkm_warn(subdev, "dcb %d type %d unknown\n",
+                                 i, dcbE.type);
                        continue;
                }
 
-               if (ctor)
-                       ret = ctor(disp, i, &dcbE, &outp);
-               else
-                       ret = -ENODEV;
-
                if (ret) {
-                       if (ret == -ENODEV) {
-                               nvkm_debug(&disp->engine.subdev,
-                                          "dcb %d %d/%d not supported\n",
-                                          i, dcbE.location, dcbE.type);
+                       if (outp) {
+                               if (ret != -ENODEV)
+                                       OUTP_ERR(outp, "ctor failed: %d", ret);
+                               else
+                                       OUTP_DBG(outp, "not supported");
+                               nvkm_outp_del(&outp);
                                continue;
                        }
-                       nvkm_error(&disp->engine.subdev,
-                                  "failed to create outp %d\n", i);
-                       nvkm_outp_del(&outp);
+                       nvkm_error(subdev, "failed to create outp %d\n", i);
                        continue;
                }
 
index 0e51e144c1bdb6bfb60df1fceda6621d9bebd05d..64de64fdc9d1bb1bb34e2245a10b3447178dcd76 100644 (file)
  * Authors: Ben Skeggs
  */
 #include "ior.h"
-#include "outp.h"
 
 #include <subdev/timer.h>
 
-static const struct nvkm_output_func
-nv50_dac_output_func = {
-};
-
-int
-nv50_dac_output_new(struct nvkm_disp *disp, int index,
-                   struct dcb_output *dcbE, struct nvkm_output **poutp)
-{
-       return nvkm_output_new_(&nv50_dac_output_func, disp,
-                               index, dcbE, poutp);
-}
-
 int
 nv50_dac_sense(struct nvkm_ior *dac, u32 loadval)
 {
index 2d8f93323309844645afda83ffe35baac12b683a..b531890b1a6f9a7a56366a413782473f2802c6a6 100644 (file)
@@ -580,7 +580,7 @@ nvkm_dp_ctor(struct nvkm_disp *disp, int index, struct dcb_output *dcbE,
        dp->aux = aux;
        if (!dp->aux) {
                OUTP_ERR(&dp->outp, "no aux");
-               return -ENODEV;
+               return -EINVAL;
        }
 
        /* bios data is not optional */
@@ -589,7 +589,7 @@ nvkm_dp_ctor(struct nvkm_disp *disp, int index, struct dcb_output *dcbE,
                                  &hdr, &cnt, &len, &dp->info);
        if (!data) {
                OUTP_ERR(&dp->outp, "no bios dp data");
-               return -ENODEV;
+               return -EINVAL;
        }
 
        OUTP_DBG(&dp->outp, "bios dp %02x %02x %02x %02x",
@@ -616,9 +616,8 @@ nvkm_dp_ctor(struct nvkm_disp *disp, int index, struct dcb_output *dcbE,
 }
 
 int
-nvkm_output_dp_new_(const struct nvkm_output_dp_func *func,
-                   struct nvkm_disp *disp, int index, struct dcb_output *dcbE,
-                   struct nvkm_outp **poutp)
+nvkm_dp_new(struct nvkm_disp *disp, int index, struct dcb_output *dcbE,
+           struct nvkm_outp **poutp)
 {
        struct nvkm_i2c *i2c = disp->engine.subdev.device->i2c;
        struct nvkm_i2c_aux *aux;
@@ -631,7 +630,6 @@ nvkm_output_dp_new_(const struct nvkm_output_dp_func *func,
 
        if (!(dp = kzalloc(sizeof(*dp), GFP_KERNEL)))
                return -ENOMEM;
-       dp->func = func;
        *poutp = &dp->outp;
 
        return nvkm_dp_ctor(disp, index, dcbE, aux, dp);
index edd416c62d3eaadc69eddc991cef5da826a27c3e..34e58b70a3949a55971f8c9e10107aeac97b7111 100644 (file)
@@ -8,7 +8,6 @@
 #include <subdev/bios/dp.h>
 
 struct nvkm_dp {
-       const struct nvkm_output_dp_func *func;
        union {
                struct nvkm_outp base;
                struct nvkm_outp outp;
@@ -32,28 +31,10 @@ struct nvkm_dp {
 
 #define nvkm_output_dp nvkm_dp
 
-struct nvkm_output_dp_func {
-};
-
 int nvkm_output_dp_train(struct nvkm_output *, u32 rate);
 
-int nvkm_output_dp_new_(const struct nvkm_output_dp_func *, struct nvkm_disp *,
-                       int index, struct dcb_output *, struct nvkm_output **);
-
-int nv50_pior_dp_new(struct nvkm_disp *, int, struct dcb_output *,
-                    struct nvkm_output **);
-
-int g94_sor_dp_new(struct nvkm_disp *, int, struct dcb_output *,
-                  struct nvkm_output **);
-
-int gf119_sor_dp_new(struct nvkm_disp *, int, struct dcb_output *,
-                    struct nvkm_output **);
-
-int gm107_sor_dp_new(struct nvkm_disp *, int, struct dcb_output *,
-                    struct nvkm_output **);
-
-int gm200_sor_dp_new(struct nvkm_disp *, int, struct dcb_output *,
-                    struct nvkm_output **);
+int nvkm_dp_new(struct nvkm_disp *, int index, struct dcb_output *,
+               struct nvkm_outp **);
 
 /* DPCD Receiver Capabilities */
 #define DPCD_RC00_DPCD_REV                                              0x00000
index 50fbe1cb6653d73f999a7a14456c108a3e153008..842e1b72ee421eb9a04e31e3199a9f8ccd6fb8ce 100644 (file)
@@ -33,11 +33,6 @@ g84_disp = {
        .super = nv50_disp_super,
        .root = &g84_disp_root_oclass,
        .head.new = nv50_head_new,
-       .outp.internal.crt = nv50_dac_output_new,
-       .outp.internal.tmds = nv50_sor_output_new,
-       .outp.internal.lvds = nv50_sor_output_new,
-       .outp.external.tmds = nv50_pior_output_new,
-       .outp.external.dp = nv50_pior_dp_new,
        .dac = { .nr = 3, .new = nv50_dac_new },
        .sor = { .nr = 2, .new = g84_sor_new },
        .pior = { .nr = 3, .new = nv50_pior_new },
index 8cc2a8c03fc613172fde1b34149320679fffce84..d184e6ab8918d55aee47b32dc0e85089addda061 100644 (file)
@@ -33,12 +33,6 @@ g94_disp = {
        .super = nv50_disp_super,
        .root = &g94_disp_root_oclass,
        .head.new = nv50_head_new,
-       .outp.internal.crt = nv50_dac_output_new,
-       .outp.internal.tmds = nv50_sor_output_new,
-       .outp.internal.lvds = nv50_sor_output_new,
-       .outp.internal.dp = g94_sor_dp_new,
-       .outp.external.tmds = nv50_pior_output_new,
-       .outp.external.dp = nv50_pior_dp_new,
        .dac = { .nr = 3, .new = nv50_dac_new },
        .sor = { .nr = 4, .new = g94_sor_new },
        .pior = { .nr = 3, .new = nv50_pior_new },
index bb816f78230fca560e544d8c94e9747587fb449d..c0d730af4c977a55b5f154c2bc989718a0b842cf 100644 (file)
@@ -502,10 +502,6 @@ gf119_disp = {
        .super = gf119_disp_super,
        .root = &gf119_disp_root_oclass,
        .head.new = gf119_head_new,
-       .outp.internal.crt = nv50_dac_output_new,
-       .outp.internal.tmds = nv50_sor_output_new,
-       .outp.internal.lvds = nv50_sor_output_new,
-       .outp.internal.dp = gf119_sor_dp_new,
        .dac = { .nr = 3, .new = gf119_dac_new },
        .sor = { .nr = 4, .new = gf119_sor_new },
 };
index e45cc01aed1c223a2cb3882a02c72eabb396ad95..e8fe9f315d641f878e2a157d358c88f1301427a0 100644 (file)
@@ -34,10 +34,6 @@ gk104_disp = {
        .super = gf119_disp_super,
        .root = &gk104_disp_root_oclass,
        .head.new = gf119_head_new,
-       .outp.internal.crt = nv50_dac_output_new,
-       .outp.internal.tmds = nv50_sor_output_new,
-       .outp.internal.lvds = nv50_sor_output_new,
-       .outp.internal.dp = gf119_sor_dp_new,
        .dac = { .nr = 3, .new = gf119_dac_new },
        .sor = { .nr = 4, .new = gk104_sor_new },
 };
index e0990ffd3f5799b7ade8ff8a1695631273cd440e..769687502e7a831d9d5e7c3687c41201313a6fbe 100644 (file)
@@ -34,10 +34,6 @@ gk110_disp = {
        .super = gf119_disp_super,
        .root = &gk110_disp_root_oclass,
        .head.new = gf119_head_new,
-       .outp.internal.crt = nv50_dac_output_new,
-       .outp.internal.tmds = nv50_sor_output_new,
-       .outp.internal.lvds = nv50_sor_output_new,
-       .outp.internal.dp = gf119_sor_dp_new,
        .dac = { .nr = 3, .new = gf119_dac_new },
        .sor = { .nr = 4, .new = gk104_sor_new },
 };
index e42ab42b9dd1a49f90118ae4179e96ccbca62522..ede70e5d188e2627e3b87d793d0d9a9cfce8c0c8 100644 (file)
@@ -34,10 +34,6 @@ gm107_disp = {
        .super = gf119_disp_super,
        .root = &gm107_disp_root_oclass,
        .head.new = gf119_head_new,
-       .outp.internal.crt = nv50_dac_output_new,
-       .outp.internal.tmds = nv50_sor_output_new,
-       .outp.internal.lvds = nv50_sor_output_new,
-       .outp.internal.dp = gm107_sor_dp_new,
        .dac = { .nr = 3, .new = gf119_dac_new },
        .sor = { .nr = 4, .new = gm107_sor_new },
 };
index 287c00159481a257b689580bbfcd5a4eef275d07..ae0b97332e46428bd8cc9fc0e63f9031a2f9e79a 100644 (file)
@@ -34,10 +34,6 @@ gm200_disp = {
        .super = gf119_disp_super,
        .root = &gm200_disp_root_oclass,
        .head.new = gf119_head_new,
-       .outp.internal.crt = nv50_dac_output_new,
-       .outp.internal.tmds = nv50_sor_output_new,
-       .outp.internal.lvds = nv50_sor_output_new,
-       .outp.internal.dp = gm200_sor_dp_new,
        .dac = { .nr = 3, .new = gf119_dac_new },
        .sor.nr = 4,
        .sor.new = gm200_sor_new,
index c83883c0bd433397ba33bd9eedf4acf6874ddcbe..c6fe7797a803ed250ec5066bdf34f4ae01456364 100644 (file)
@@ -34,9 +34,6 @@ gp100_disp = {
        .super = gf119_disp_super,
        .root = &gp100_disp_root_oclass,
        .head.new = gf119_head_new,
-       .outp.internal.tmds = nv50_sor_output_new,
-       .outp.internal.lvds = nv50_sor_output_new,
-       .outp.internal.dp = gm200_sor_dp_new,
        .sor.nr = 4,
        .sor.new = gm200_sor_new,
        .sor.magic = gm200_sor_magic,
index bac4d05a0015da96a374352f0f7cb7295696303a..279d125fe2658f0b8fd42dd7a06516486b1ad98b 100644 (file)
@@ -60,9 +60,6 @@ gp102_disp = {
        .super = gf119_disp_super,
        .root = &gp102_disp_root_oclass,
        .head.new = gf119_head_new,
-       .outp.internal.tmds = nv50_sor_output_new,
-       .outp.internal.lvds = nv50_sor_output_new,
-       .outp.internal.dp = gm200_sor_dp_new,
        .sor.nr = 4,
        .sor.new = gm200_sor_new,
        .sor.magic = gm200_sor_magic,
index 387f57bc517b40d88dd8cea8df03df9bec355660..bf00c4e3be3acdb8833cb03dc9c3acf90760f67e 100644 (file)
@@ -33,11 +33,6 @@ gt200_disp = {
        .super = nv50_disp_super,
        .root = &gt200_disp_root_oclass,
        .head.new = nv50_head_new,
-       .outp.internal.crt = nv50_dac_output_new,
-       .outp.internal.tmds = nv50_sor_output_new,
-       .outp.internal.lvds = nv50_sor_output_new,
-       .outp.external.tmds = nv50_pior_output_new,
-       .outp.external.dp = nv50_pior_dp_new,
        .dac = { .nr = 3, .new = nv50_dac_new },
        .sor = { .nr = 2, .new = g84_sor_new },
        .pior = { .nr = 3, .new = nv50_pior_new },
index 0c761feca2d4e7c2ee5be6ed9c68815ca9c8af32..2cdd4d7a98d301fe567fe3e5ab614c5cc9b3e6f9 100644 (file)
@@ -33,12 +33,6 @@ gt215_disp = {
        .super = nv50_disp_super,
        .root = &gt215_disp_root_oclass,
        .head.new = nv50_head_new,
-       .outp.internal.crt = nv50_dac_output_new,
-       .outp.internal.tmds = nv50_sor_output_new,
-       .outp.internal.lvds = nv50_sor_output_new,
-       .outp.internal.dp = g94_sor_dp_new,
-       .outp.external.tmds = nv50_pior_output_new,
-       .outp.external.dp = nv50_pior_dp_new,
        .dac = { .nr = 3, .new = nv50_dac_new },
        .sor = { .nr = 4, .new = gt215_sor_new },
        .pior = { .nr = 3, .new = nv50_pior_new },
index 4f4e4e68de3301a9c7e3fc0f72a28f3829c87dea..d7e0fbb12bf11231898302f50406b91a16566364 100644 (file)
@@ -31,12 +31,6 @@ mcp77_disp = {
        .super = nv50_disp_super,
        .root = &g94_disp_root_oclass,
        .head.new = nv50_head_new,
-       .outp.internal.crt = nv50_dac_output_new,
-       .outp.internal.tmds = nv50_sor_output_new,
-       .outp.internal.lvds = nv50_sor_output_new,
-       .outp.internal.dp = g94_sor_dp_new,
-       .outp.external.tmds = nv50_pior_output_new,
-       .outp.external.dp = nv50_pior_dp_new,
        .dac = { .nr = 3, .new = nv50_dac_new },
        .sor = { .nr = 4, .new = mcp77_sor_new },
        .pior = { .nr = 3, .new = nv50_pior_new },
index 80e0f523f07105e1ffc08c9f94f5529db540ded1..7b75c57c12edf2243ca11b0932ae2211b1d4abf7 100644 (file)
@@ -31,12 +31,6 @@ mcp89_disp = {
        .super = nv50_disp_super,
        .root = &gt215_disp_root_oclass,
        .head.new = nv50_head_new,
-       .outp.internal.crt = nv50_dac_output_new,
-       .outp.internal.tmds = nv50_sor_output_new,
-       .outp.internal.lvds = nv50_sor_output_new,
-       .outp.internal.dp = g94_sor_dp_new,
-       .outp.external.tmds = nv50_pior_output_new,
-       .outp.external.dp = nv50_pior_dp_new,
        .dac = { .nr = 3, .new = nv50_dac_new },
        .sor = { .nr = 4, .new = mcp89_sor_new },
        .pior = { .nr = 3, .new = nv50_pior_new },
index ae570f65e097370babfd35c30d7925e80eec039f..b7365b56ed19f573241c245681c2842b418629fc 100644 (file)
@@ -42,63 +42,6 @@ nv50_disp_root_(struct nvkm_disp *base)
        return nv50_disp(base)->func->root;
 }
 
-static int
-nv50_disp_outp_internal_crt_(struct nvkm_disp *base, int index,
-                            struct dcb_output *dcb, struct nvkm_output **poutp)
-{
-       struct nv50_disp *disp = nv50_disp(base);
-       return disp->func->outp.internal.crt(base, index, dcb, poutp);
-}
-
-static int
-nv50_disp_outp_internal_tmds_(struct nvkm_disp *base, int index,
-                             struct dcb_output *dcb,
-                             struct nvkm_output **poutp)
-{
-       struct nv50_disp *disp = nv50_disp(base);
-       return disp->func->outp.internal.tmds(base, index, dcb, poutp);
-}
-
-static int
-nv50_disp_outp_internal_lvds_(struct nvkm_disp *base, int index,
-                             struct dcb_output *dcb,
-                             struct nvkm_output **poutp)
-{
-       struct nv50_disp *disp = nv50_disp(base);
-       return disp->func->outp.internal.lvds(base, index, dcb, poutp);
-}
-
-static int
-nv50_disp_outp_internal_dp_(struct nvkm_disp *base, int index,
-                           struct dcb_output *dcb, struct nvkm_output **poutp)
-{
-       struct nv50_disp *disp = nv50_disp(base);
-       if (disp->func->outp.internal.dp)
-               return disp->func->outp.internal.dp(base, index, dcb, poutp);
-       return -ENODEV;
-}
-
-static int
-nv50_disp_outp_external_tmds_(struct nvkm_disp *base, int index,
-                             struct dcb_output *dcb,
-                             struct nvkm_output **poutp)
-{
-       struct nv50_disp *disp = nv50_disp(base);
-       if (disp->func->outp.external.tmds)
-               return disp->func->outp.external.tmds(base, index, dcb, poutp);
-       return -ENODEV;
-}
-
-static int
-nv50_disp_outp_external_dp_(struct nvkm_disp *base, int index,
-                           struct dcb_output *dcb, struct nvkm_output **poutp)
-{
-       struct nv50_disp *disp = nv50_disp(base);
-       if (disp->func->outp.external.dp)
-               return disp->func->outp.external.dp(base, index, dcb, poutp);
-       return -ENODEV;
-}
-
 static void
 nv50_disp_intr_(struct nvkm_disp *base)
 {
@@ -121,12 +64,6 @@ nv50_disp_ = {
        .dtor = nv50_disp_dtor_,
        .intr = nv50_disp_intr_,
        .root = nv50_disp_root_,
-       .outp.internal.crt = nv50_disp_outp_internal_crt_,
-       .outp.internal.tmds = nv50_disp_outp_internal_tmds_,
-       .outp.internal.lvds = nv50_disp_outp_internal_lvds_,
-       .outp.internal.dp = nv50_disp_outp_internal_dp_,
-       .outp.external.tmds = nv50_disp_outp_external_tmds_,
-       .outp.external.dp = nv50_disp_outp_external_dp_,
 };
 
 int
@@ -839,11 +776,6 @@ nv50_disp = {
        .super = nv50_disp_super,
        .root = &nv50_disp_root_oclass,
        .head.new = nv50_head_new,
-       .outp.internal.crt = nv50_dac_output_new,
-       .outp.internal.tmds = nv50_sor_output_new,
-       .outp.internal.lvds = nv50_sor_output_new,
-       .outp.external.tmds = nv50_pior_output_new,
-       .outp.external.dp = nv50_pior_dp_new,
        .dac = { .nr = 3, .new = nv50_dac_new },
        .sor = { .nr = 2, .new = nv50_sor_new },
        .pior = { .nr = 3, .new = nv50_pior_new },
index d00ce1da1637478f25476d8b4afff4593659908e..f87422de12b3d3389685d1747700f7c16f326f21 100644 (file)
@@ -32,19 +32,6 @@ int nv50_disp_new_(const struct nv50_disp_func *, struct nvkm_device *,
 int gf119_disp_new_(const struct nv50_disp_func *, struct nvkm_device *,
                    int index, struct nvkm_disp **);
 
-struct nv50_disp_func_outp {
-       int (* crt)(struct nvkm_disp *, int index, struct dcb_output *,
-                   struct nvkm_output **);
-       int (*  tv)(struct nvkm_disp *, int index, struct dcb_output *,
-                   struct nvkm_output **);
-       int (*tmds)(struct nvkm_disp *, int index, struct dcb_output *,
-                   struct nvkm_output **);
-       int (*lvds)(struct nvkm_disp *, int index, struct dcb_output *,
-                   struct nvkm_output **);
-       int (*  dp)(struct nvkm_disp *, int index, struct dcb_output *,
-                   struct nvkm_output **);
-};
-
 struct nv50_disp_func {
        void (*intr)(struct nv50_disp *);
        void (*intr_error)(struct nv50_disp *, int chid);
@@ -58,11 +45,6 @@ struct nv50_disp_func {
                int (*new)(struct nvkm_disp *, int id);
        } head;
 
-       struct {
-               const struct nv50_disp_func_outp internal;
-               const struct nv50_disp_func_outp external;
-       } outp;
-
        struct {
                int nr;
                int (*new)(struct nvkm_disp *, int id);
index 895a84ca1501aa78df10903f4d15db21663ae83e..09e8ebbd4ee915a9c194d3f9221e3db378f0a3c5 100644 (file)
@@ -142,12 +142,15 @@ nvkm_outp_ctor(const struct nvkm_outp_func *func, struct nvkm_disp *disp,
        return 0;
 }
 
+static const struct nvkm_outp_func
+nvkm_outp = {
+};
+
 int
-nvkm_outp_new_(const struct nvkm_outp_func *func,
-              struct nvkm_disp *disp, int index, struct dcb_output *dcbE,
-              struct nvkm_outp **poutp)
+nvkm_outp_new(struct nvkm_disp *disp, int index, struct dcb_output *dcbE,
+             struct nvkm_outp **poutp)
 {
        if (!(*poutp = kzalloc(sizeof(**poutp), GFP_KERNEL)))
                return -ENOMEM;
-       return nvkm_outp_ctor(func, disp, index, dcbE, *poutp);
+       return nvkm_outp_ctor(&nvkm_outp, disp, index, dcbE, *poutp);
 }
index 80d4a0d34f142f21c09f22ee2a57000da2ebf2ff..785a920eaf74eedee0415f9b790aded79ad76cd6 100644 (file)
@@ -23,6 +23,8 @@ struct nvkm_outp {
 
 int nvkm_outp_ctor(const struct nvkm_outp_func *, struct nvkm_disp *,
                   int index, struct dcb_output *, struct nvkm_outp *);
+int nvkm_outp_new(struct nvkm_disp *, int index, struct dcb_output *,
+                 struct nvkm_outp **);
 void nvkm_outp_del(struct nvkm_outp **);
 void nvkm_outp_init(struct nvkm_outp *);
 void nvkm_outp_fini(struct nvkm_outp *);
@@ -37,16 +39,6 @@ struct nvkm_outp_func {
 #define nvkm_output_func nvkm_outp_func
 #define nvkm_output_new_ nvkm_outp_new_
 
-int nvkm_outp_new_(const struct nvkm_outp_func *, struct nvkm_disp *,
-                  int index, struct dcb_output *, struct nvkm_output **);
-
-int nv50_dac_output_new(struct nvkm_disp *, int, struct dcb_output *,
-                       struct nvkm_output **);
-int nv50_sor_output_new(struct nvkm_disp *, int, struct dcb_output *,
-                       struct nvkm_output **);
-int nv50_pior_output_new(struct nvkm_disp *, int, struct dcb_output *,
-                        struct nvkm_output **);
-
 void gm200_sor_magic(struct nvkm_output *outp);
 
 #define OUTP_MSG(o,l,f,a...) do {                                              \
index a3c4386a5a903b9c61c52f8ac3bec25686c23a6c..f66beda1ae11f01142dd5b5a18bd8b54e6d0e1b1 100644 (file)
  * Authors: Ben Skeggs
  */
 #include "ior.h"
-#include "dp.h"
 
 #include <subdev/i2c.h>
 #include <subdev/timer.h>
 
-/******************************************************************************
- * TMDS
- *****************************************************************************/
-static const struct nvkm_output_func
-nv50_pior_output_func = {
-};
-
-int
-nv50_pior_output_new(struct nvkm_disp *disp, int index,
-                    struct dcb_output *dcbE, struct nvkm_output **poutp)
-{
-       return nvkm_output_new_(&nv50_pior_output_func, disp,
-                               index, dcbE, poutp);
-}
-
-/******************************************************************************
- * DisplayPort
- *****************************************************************************/
 static int
 nv50_pior_dp_links(struct nvkm_ior *pior, struct nvkm_i2c_aux *aux)
 {
@@ -55,18 +36,6 @@ nv50_pior_dp_links(struct nvkm_ior *pior, struct nvkm_i2c_aux *aux)
        return 1;
 }
 
-static const struct nvkm_output_dp_func
-nv50_pior_output_dp_func = {
-};
-
-int
-nv50_pior_dp_new(struct nvkm_disp *disp, int index, struct dcb_output *dcbE,
-                struct nvkm_output **poutp)
-{
-       return nvkm_output_dp_new_(&nv50_pior_output_dp_func, disp,
-                                  index, dcbE, poutp);
-}
-
 static void
 nv50_pior_power_wait(struct nvkm_device *device, u32 poff)
 {
index e8dcae14a9ae595b35fdcd9ef0b22b75638cac34..5772f00941292a0bf0c636f0d9f090b85a4b3ed8 100644 (file)
@@ -9,29 +9,11 @@ int nvkm_disp_new_(const struct nvkm_disp_func *, struct nvkm_device *,
                   int index, struct nvkm_disp **);
 void nvkm_disp_vblank(struct nvkm_disp *, int head);
 
-struct nvkm_disp_func_outp {
-       int (* crt)(struct nvkm_disp *, int index, struct dcb_output *,
-                   struct nvkm_output **);
-       int (*  tv)(struct nvkm_disp *, int index, struct dcb_output *,
-                   struct nvkm_output **);
-       int (*tmds)(struct nvkm_disp *, int index, struct dcb_output *,
-                   struct nvkm_output **);
-       int (*lvds)(struct nvkm_disp *, int index, struct dcb_output *,
-                   struct nvkm_output **);
-       int (*  dp)(struct nvkm_disp *, int index, struct dcb_output *,
-                   struct nvkm_output **);
-};
-
 struct nvkm_disp_func {
        void *(*dtor)(struct nvkm_disp *);
        void (*intr)(struct nvkm_disp *);
 
        const struct nvkm_disp_oclass *(*root)(struct nvkm_disp *);
-
-       struct {
-               const struct nvkm_disp_func_outp internal;
-               const struct nvkm_disp_func_outp external;
-       } outp;
 };
 
 int  nvkm_disp_ntfy(struct nvkm_object *, u32, struct nvkm_event **);
index a4a4749d3c4b7ed93b0d7c3af92ddafadf3caf4c..bfc7b0e053a4fb3177b3b14678f7111364bbf391 100644 (file)
@@ -91,17 +91,6 @@ g94_sor_dp_links(struct nvkm_ior *sor, struct nvkm_i2c_aux *aux)
        return 0;
 }
 
-static const struct nvkm_output_dp_func
-g94_sor_dp_func = {
-};
-
-int
-g94_sor_dp_new(struct nvkm_disp *disp, int index, struct dcb_output *dcbE,
-              struct nvkm_output **poutp)
-{
-       return nvkm_output_dp_new_(&g94_sor_dp_func, disp, index, dcbE, poutp);
-}
-
 static bool
 nv50_disp_dptmds_war(struct nvkm_device *device)
 {
index b313beda00d7397608bb903143f065679da2dbc8..d37cd037ee031276a3476d086c518f7e81254163 100644 (file)
@@ -22,7 +22,6 @@
  * Authors: Ben Skeggs
  */
 #include "ior.h"
-#include "nv50.h"
 
 #include <subdev/timer.h>
 
@@ -100,17 +99,6 @@ gf119_sor_dp_links(struct nvkm_ior *sor, struct nvkm_i2c_aux *aux)
        return 0;
 }
 
-static const struct nvkm_output_dp_func
-gf119_sor_dp_func = {
-};
-
-int
-gf119_sor_dp_new(struct nvkm_disp *disp, int index,
-                struct dcb_output *dcbE, struct nvkm_output **poutp)
-{
-       return nvkm_output_dp_new_(&gf119_sor_dp_func, disp, index, dcbE, poutp);
-}
-
 void
 gf119_sor_state(struct nvkm_ior *sor, struct nvkm_ior_state *state)
 {
index 77873874e178b3c38f532b2463243cf9378c53f3..e467f8eaf2eef95002f4b523494f0426026359f9 100644 (file)
@@ -22,7 +22,6 @@
  * Authors: Ben Skeggs <bskeggs@redhat.com>
  */
 #include "ior.h"
-#include "nv50.h"
 
 void
 gm107_sor_dp_pattern(struct nvkm_ior *sor, int pattern)
@@ -36,17 +35,6 @@ gm107_sor_dp_pattern(struct nvkm_ior *sor, int pattern)
                nvkm_mask(device, 0x61c12c + soff, 0x0f0f0f0f, data);
 }
 
-static const struct nvkm_output_dp_func
-gm107_sor_dp_func = {
-};
-
-int
-gm107_sor_dp_new(struct nvkm_disp *disp, int index,
-                struct dcb_output *dcbE, struct nvkm_output **poutp)
-{
-       return nvkm_output_dp_new_(&gm107_sor_dp_func, disp, index, dcbE, poutp);
-}
-
 static const struct nvkm_ior_func
 gm107_sor = {
        .state = gf119_sor_state,
index 9078ba271a1223e7af37731ab10c14b336432a80..0ba7d03efa7818c903dd4532ff6d94f1a798ffa0 100644 (file)
@@ -22,7 +22,6 @@
  * Authors: Ben Skeggs
  */
 #include "ior.h"
-#include "nv50.h"
 
 static void
 gm200_sor_dp_drive(struct nvkm_ior *sor, int ln, int pc, int dc, int pe, int pu)
@@ -46,17 +45,6 @@ gm200_sor_dp_drive(struct nvkm_ior *sor, int ln, int pc, int dc, int pe, int pu)
        nvkm_wr32(device, 0x61c13c + loff, data[3] | (pc << shift));
 }
 
-static const struct nvkm_output_dp_func
-gm200_sor_dp_func = {
-};
-
-int
-gm200_sor_dp_new(struct nvkm_disp *disp, int index, struct dcb_output *dcbE,
-                struct nvkm_output **poutp)
-{
-       return nvkm_output_dp_new_(&gm200_sor_dp_func, disp, index, dcbE, poutp);
-}
-
 void
 gm200_sor_magic(struct nvkm_output *outp)
 {
index 543b6d0ee74cb218a50c1055bfe57f0eb63b6aac..2ca600c744cd5528fa8d0be992ae051df7c15f88 100644 (file)
  * Authors: Ben Skeggs
  */
 #include "ior.h"
-#include "outp.h"
 
 #include <subdev/timer.h>
 
-static const struct nvkm_output_func
-nv50_sor_output_func = {
-};
-
-int
-nv50_sor_output_new(struct nvkm_disp *disp, int index,
-                   struct dcb_output *dcbE, struct nvkm_output **poutp)
-{
-       return nvkm_output_new_(&nv50_sor_output_func, disp,
-                               index, dcbE, poutp);
-}
-
 static void
 nv50_sor_power_wait(struct nvkm_device *device, u32 soff)
 {