drm/nouveau/disp: introduce input/output resource abstraction
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:49 +0000 (14:04 +1000)
In order to properly support the SOR -> SOR + pad macro separation
that occurred with GM20x GPUs, we need to separate OR handling out
of the output path code.

This will be used as the base to support ORs (DAC, SOR, PIOR).

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
25 files changed:
drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild
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/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/ior.c [new file with mode: 0644]
drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h [new file with mode: 0644]
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/piornv50.c
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 a0892d6d9841d3109ad2ed949a0b33f2815c229c..6d68596ecfc2682f04eeee0ef62609e8f241163f 100644 (file)
@@ -9,6 +9,7 @@ struct nvkm_disp {
        struct nvkm_engine engine;
 
        struct list_head head;
+       struct list_head ior;
        struct list_head outp;
        struct list_head conn;
 
index 7062929260bc92dd83f9abdbadd259c105ee293a..5bcdc1162fd59838f0d7f3239109e02454eb504c 100644 (file)
@@ -19,6 +19,7 @@ nvkm-y += nvkm/engine/disp/headnv04.o
 nvkm-y += nvkm/engine/disp/headnv50.o
 nvkm-y += nvkm/engine/disp/headgf119.o
 
+nvkm-y += nvkm/engine/disp/ior.o
 nvkm-y += nvkm/engine/disp/dacnv50.o
 nvkm-y += nvkm/engine/disp/piornv50.o
 nvkm-y += nvkm/engine/disp/sornv50.o
index 1c655c18097e349e1baf2cf14624aea004fe6ca6..24d2f325cbc5ab20c003084ac18c4b89ea7632bd 100644 (file)
@@ -24,6 +24,7 @@
 #include "priv.h"
 #include "conn.h"
 #include "head.h"
+#include "ior.h"
 #include "outp.h"
 
 #include <core/client.h>
@@ -414,6 +415,12 @@ nvkm_disp_dtor(struct nvkm_engine *engine)
                nvkm_outp_del(&outp);
        }
 
+       while (!list_empty(&disp->ior)) {
+               struct nvkm_ior *ior =
+                       list_first_entry(&disp->ior, typeof(*ior), head);
+               nvkm_ior_del(&ior);
+       }
+
        while (!list_empty(&disp->head)) {
                struct nvkm_head *head =
                        list_first_entry(&disp->head, typeof(*head), head);
@@ -439,6 +446,7 @@ nvkm_disp_ctor(const struct nvkm_disp_func *func, struct nvkm_device *device,
 {
        disp->func = func;
        INIT_LIST_HEAD(&disp->head);
+       INIT_LIST_HEAD(&disp->ior);
        INIT_LIST_HEAD(&disp->outp);
        INIT_LIST_HEAD(&disp->conn);
        return nvkm_engine_ctor(&nvkm_disp, device, index, true, &disp->engine);
index e8dabedea5dc94979f7c644b82e8d1e81e8e49f5..5e2dbd5de5113438ec9fd29980a4af60a35677f6 100644 (file)
@@ -21,6 +21,7 @@
  *
  * Authors: Ben Skeggs
  */
+#include "ior.h"
 #include "nv50.h"
 #include "outp.h"
 
@@ -124,3 +125,13 @@ nv50_dac_power(NV50_DISP_MTHD_V1)
        );
        return 0;
 }
+
+static const struct nvkm_ior_func
+nv50_dac = {
+};
+
+int
+nv50_dac_new(struct nvkm_disp *disp, int id)
+{
+       return nvkm_ior_new_(&nv50_dac, disp, DAC, id);
+}
index bdaec4e4cb60ba0bdcbe55bc55919f5b055697c4..b8aae872f8733575a4c354fe32f817bf10551be1 100644 (file)
@@ -23,6 +23,7 @@
  */
 #include "nv50.h"
 #include "head.h"
+#include "ior.h"
 #include "rootnv50.h"
 
 static const struct nv50_disp_func
@@ -38,12 +39,15 @@ g84_disp = {
        .outp.external.tmds = nv50_pior_output_new,
        .outp.external.dp = nv50_pior_dp_new,
        .dac.nr = 3,
+       .dac.new = nv50_dac_new,
        .dac.power = nv50_dac_power,
        .dac.sense = nv50_dac_sense,
        .sor.nr = 2,
+       .sor.new = nv50_sor_new,
        .sor.power = nv50_sor_power,
        .sor.hdmi = g84_hdmi_ctrl,
        .pior.nr = 3,
+       .pior.new = nv50_pior_new,
        .pior.power = nv50_pior_power,
 };
 
index 12e4984e5393c81e8ceb87beb7db2bddde677b49..4a959de0d616cab2333d323ab7997e9667d07264 100644 (file)
@@ -23,6 +23,7 @@
  */
 #include "nv50.h"
 #include "head.h"
+#include "ior.h"
 #include "rootnv50.h"
 
 static const struct nv50_disp_func
@@ -39,12 +40,15 @@ g94_disp = {
        .outp.external.tmds = nv50_pior_output_new,
        .outp.external.dp = nv50_pior_dp_new,
        .dac.nr = 3,
+       .dac.new = nv50_dac_new,
        .dac.power = nv50_dac_power,
        .dac.sense = nv50_dac_sense,
        .sor.nr = 4,
+       .sor.new = g94_sor_new,
        .sor.power = nv50_sor_power,
        .sor.hdmi = g84_hdmi_ctrl,
        .pior.nr = 3,
+       .pior.new = nv50_pior_new,
        .pior.power = nv50_pior_power,
 };
 
index d353d29f2ad439aa7337aaf2b417a8d141124798..1a9958c2e73cd6dd60314bca319c1ab02c08b615 100644 (file)
@@ -23,6 +23,7 @@
  */
 #include "nv50.h"
 #include "head.h"
+#include "ior.h"
 #include "rootnv50.h"
 
 #include <subdev/bios.h>
@@ -506,9 +507,11 @@ gf119_disp = {
        .outp.internal.lvds = nv50_sor_output_new,
        .outp.internal.dp = gf119_sor_dp_new,
        .dac.nr = 3,
+       .dac.new = nv50_dac_new,
        .dac.power = nv50_dac_power,
        .dac.sense = nv50_dac_sense,
        .sor.nr = 4,
+       .sor.new = gf119_sor_new,
        .sor.power = nv50_sor_power,
        .sor.hda_eld = gf119_hda_eld,
        .sor.hdmi = gf119_hdmi_ctrl,
index a83684c2c129851e780e8d49ff8ffc636186e054..aeaaf4280d0416e0bff4ae9f84d0d386578cc8e0 100644 (file)
@@ -23,6 +23,7 @@
  */
 #include "nv50.h"
 #include "head.h"
+#include "ior.h"
 #include "rootnv50.h"
 
 static const struct nv50_disp_func
@@ -38,9 +39,11 @@ gk104_disp = {
        .outp.internal.lvds = nv50_sor_output_new,
        .outp.internal.dp = gf119_sor_dp_new,
        .dac.nr = 3,
+       .dac.new = nv50_dac_new,
        .dac.power = nv50_dac_power,
        .dac.sense = nv50_dac_sense,
        .sor.nr = 4,
+       .sor.new = gf119_sor_new,
        .sor.power = nv50_sor_power,
        .sor.hda_eld = gf119_hda_eld,
        .sor.hdmi = gk104_hdmi_ctrl,
index 72a2fc0183b3ae50819eddfbbb25f71bfffbf831..90080c423bdce16bdf02ae1d6a96d35b74bc41e2 100644 (file)
@@ -23,6 +23,7 @@
  */
 #include "nv50.h"
 #include "head.h"
+#include "ior.h"
 #include "rootnv50.h"
 
 static const struct nv50_disp_func
@@ -38,9 +39,11 @@ gk110_disp = {
        .outp.internal.lvds = nv50_sor_output_new,
        .outp.internal.dp = gf119_sor_dp_new,
        .dac.nr = 3,
+       .dac.new = nv50_dac_new,
        .dac.power = nv50_dac_power,
        .dac.sense = nv50_dac_sense,
        .sor.nr = 4,
+       .sor.new = gf119_sor_new,
        .sor.power = nv50_sor_power,
        .sor.hda_eld = gf119_hda_eld,
        .sor.hdmi = gk104_hdmi_ctrl,
index b6658e22b207fb17b93a48ccfec880a47607201f..12ad91b4f36cb655b23e3b31a0ee75e9019a05aa 100644 (file)
@@ -23,6 +23,7 @@
  */
 #include "nv50.h"
 #include "head.h"
+#include "ior.h"
 #include "rootnv50.h"
 
 static const struct nv50_disp_func
@@ -38,9 +39,11 @@ gm107_disp = {
        .outp.internal.lvds = nv50_sor_output_new,
        .outp.internal.dp = gm107_sor_dp_new,
        .dac.nr = 3,
+       .dac.new = nv50_dac_new,
        .dac.power = nv50_dac_power,
        .dac.sense = nv50_dac_sense,
        .sor.nr = 4,
+       .sor.new = gm107_sor_new,
        .sor.power = nv50_sor_power,
        .sor.hda_eld = gf119_hda_eld,
        .sor.hdmi = gk104_hdmi_ctrl,
index e0ea05350dfb2bdc7f59238621be3fc737865800..e62488f97546d8bd4e0b3333b916676d9ce120b1 100644 (file)
@@ -23,6 +23,7 @@
  */
 #include "nv50.h"
 #include "head.h"
+#include "ior.h"
 #include "rootnv50.h"
 
 static const struct nv50_disp_func
@@ -38,9 +39,11 @@ gm200_disp = {
        .outp.internal.lvds = nv50_sor_output_new,
        .outp.internal.dp = gm200_sor_dp_new,
        .dac.nr = 3,
+       .dac.new = nv50_dac_new,
        .dac.power = nv50_dac_power,
        .dac.sense = nv50_dac_sense,
        .sor.nr = 4,
+       .sor.new = gm200_sor_new,
        .sor.power = nv50_sor_power,
        .sor.hda_eld = gf119_hda_eld,
        .sor.hdmi = gk104_hdmi_ctrl,
index 90ea05f98699b116c6f54acc9874e50cdd86002d..f7ba3366024a1e6b7dee5d6cfcaafdb757ffb551 100644 (file)
@@ -23,6 +23,7 @@
  */
 #include "nv50.h"
 #include "head.h"
+#include "ior.h"
 #include "rootnv50.h"
 
 static const struct nv50_disp_func
@@ -33,14 +34,11 @@ gp100_disp = {
        .super = gf119_disp_super,
        .root = &gp100_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,
-       .dac.power = nv50_dac_power,
-       .dac.sense = nv50_dac_sense,
        .sor.nr = 4,
+       .sor.new = gm200_sor_new,
        .sor.power = nv50_sor_power,
        .sor.hda_eld = gf119_hda_eld,
        .sor.hdmi = gk104_hdmi_ctrl,
index 722a057bc9ff29dca93cef7372eb0b9bec2d64c4..80010f2c94b285bd11324ea20da95318cfc38340 100644 (file)
@@ -23,6 +23,7 @@
  */
 #include "nv50.h"
 #include "head.h"
+#include "ior.h"
 #include "rootnv50.h"
 
 static void
@@ -59,14 +60,11 @@ gp102_disp = {
        .super = gf119_disp_super,
        .root = &gp102_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,
-       .dac.power = nv50_dac_power,
-       .dac.sense = nv50_dac_sense,
        .sor.nr = 4,
+       .sor.new = gm200_sor_new,
        .sor.power = nv50_sor_power,
        .sor.hda_eld = gf119_hda_eld,
        .sor.hdmi = gk104_hdmi_ctrl,
index a5710ea0b244167499a3a10c98d4e69d02da7cc1..15a2f3ce3e9cc18d32999538e5ef8c50ad28fea9 100644 (file)
@@ -23,6 +23,7 @@
  */
 #include "nv50.h"
 #include "head.h"
+#include "ior.h"
 #include "rootnv50.h"
 
 static const struct nv50_disp_func
@@ -38,12 +39,15 @@ gt200_disp = {
        .outp.external.tmds = nv50_pior_output_new,
        .outp.external.dp = nv50_pior_dp_new,
        .dac.nr = 3,
+       .dac.new = nv50_dac_new,
        .dac.power = nv50_dac_power,
        .dac.sense = nv50_dac_sense,
        .sor.nr = 2,
+       .sor.new = nv50_sor_new,
        .sor.power = nv50_sor_power,
        .sor.hdmi = g84_hdmi_ctrl,
        .pior.nr = 3,
+       .pior.new = nv50_pior_new,
        .pior.power = nv50_pior_power,
 };
 
index 3c100fc617a64773b3e6e412372f55b5c0f74268..e5ceba9e2ab96dc8344b683f2cc44581580d4196 100644 (file)
@@ -23,6 +23,7 @@
  */
 #include "nv50.h"
 #include "head.h"
+#include "ior.h"
 #include "rootnv50.h"
 
 static const struct nv50_disp_func
@@ -39,13 +40,16 @@ gt215_disp = {
        .outp.external.tmds = nv50_pior_output_new,
        .outp.external.dp = nv50_pior_dp_new,
        .dac.nr = 3,
+       .dac.new = nv50_dac_new,
        .dac.power = nv50_dac_power,
        .dac.sense = nv50_dac_sense,
        .sor.nr = 4,
+       .sor.new = g94_sor_new,
        .sor.power = nv50_sor_power,
        .sor.hda_eld = gt215_hda_eld,
        .sor.hdmi = gt215_hdmi_ctrl,
        .pior.nr = 3,
+       .pior.new = nv50_pior_new,
        .pior.power = nv50_pior_power,
 };
 
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.c
new file mode 100644 (file)
index 0000000..a475ea5
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2017 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 "ior.h"
+
+static const char *
+nvkm_ior_name[] = {
+       [DAC] = "DAC",
+       [SOR] = "SOR",
+       [PIOR] = "PIOR",
+};
+
+struct nvkm_ior *
+nvkm_ior_find(struct nvkm_disp *disp, enum nvkm_ior_type type, int id)
+{
+       struct nvkm_ior *ior;
+       list_for_each_entry(ior, &disp->ior, head) {
+               if (ior->type == type && (id < 0 || ior->id == id))
+                       return ior;
+       }
+       return NULL;
+}
+
+void
+nvkm_ior_del(struct nvkm_ior **pior)
+{
+       struct nvkm_ior *ior = *pior;
+       if (ior) {
+               IOR_DBG(ior, "dtor");
+               list_del(&ior->head);
+               kfree(*pior);
+               *pior = NULL;
+       }
+}
+
+int
+nvkm_ior_new_(const struct nvkm_ior_func *func, struct nvkm_disp *disp,
+             enum nvkm_ior_type type, int id)
+{
+       struct nvkm_ior *ior;
+       if (!(ior = kzalloc(sizeof(*ior), GFP_KERNEL)))
+               return -ENOMEM;
+       ior->func = func;
+       ior->disp = disp;
+       ior->type = type;
+       ior->id = id;
+       snprintf(ior->name, sizeof(ior->name), "%s-%d",
+                nvkm_ior_name[ior->type], ior->id);
+       list_add_tail(&ior->head, &disp->ior);
+       IOR_DBG(ior, "ctor");
+       return 0;
+}
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h b/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
new file mode 100644 (file)
index 0000000..05857fd
--- /dev/null
@@ -0,0 +1,43 @@
+#ifndef __NVKM_DISP_IOR_H__
+#define __NVKM_DISP_IOR_H__
+#include "priv.h"
+
+struct nvkm_ior {
+       const struct nvkm_ior_func *func;
+       struct nvkm_disp *disp;
+       enum nvkm_ior_type {
+               DAC,
+               SOR,
+               PIOR,
+       } type;
+       int id;
+       char name[8];
+
+       struct list_head head;
+};
+
+struct nvkm_ior_func {
+};
+
+int nvkm_ior_new_(const struct nvkm_ior_func *func, struct nvkm_disp *,
+                 enum nvkm_ior_type type, int id);
+void nvkm_ior_del(struct nvkm_ior **);
+struct nvkm_ior *nvkm_ior_find(struct nvkm_disp *, enum nvkm_ior_type, int id);
+
+#define IOR_MSG(i,l,f,a...) do {                                               \
+       struct nvkm_ior *_ior = (i);                                           \
+       nvkm_##l(&_ior->disp->engine.subdev, "%s: "f, _ior->name, ##a);        \
+} while(0)
+#define IOR_WARN(i,f,a...) IOR_MSG((i), warn, f, ##a)
+#define IOR_DBG(i,f,a...) IOR_MSG((i), debug, f, ##a)
+
+int nv50_dac_new(struct nvkm_disp *, int);
+
+int nv50_pior_new(struct nvkm_disp *, int);
+
+int nv50_sor_new(struct nvkm_disp *, int);
+int g94_sor_new(struct nvkm_disp *, int);
+int gf119_sor_new(struct nvkm_disp *, int);
+int gm107_sor_new(struct nvkm_disp *, int);
+int gm200_sor_new(struct nvkm_disp *, int);
+#endif
index aa7ed87825e51a28f7f6b1c8ca4d979ea257e41b..bd67335d5466712e48e155bb9f6cf815fa2da95c 100644 (file)
@@ -23,6 +23,7 @@
  */
 #include "nv50.h"
 #include "head.h"
+#include "ior.h"
 #include "rootnv50.h"
 
 #include <core/client.h>
@@ -149,6 +150,24 @@ nv50_disp_new_(const struct nv50_disp_func *func, struct nvkm_device *device,
                        return ret;
        }
 
+       for (i = 0; func->dac.new && i < func->dac.nr; i++) {
+               ret = func->dac.new(&disp->base, i);
+               if (ret)
+                       return ret;
+       }
+
+       for (i = 0; func->pior.new && i < func->pior.nr; i++) {
+               ret = func->pior.new(&disp->base, i);
+               if (ret)
+                       return ret;
+       }
+
+       for (i = 0; func->sor.new && i < func->sor.nr; i++) {
+               ret = func->sor.new(&disp->base, i);
+               if (ret)
+                       return ret;
+       }
+
        return nvkm_event_init(func->uevent, 1, 1 + (heads * 4), &disp->uevent);
 }
 
@@ -803,11 +822,14 @@ nv50_disp = {
        .outp.external.tmds = nv50_pior_output_new,
        .outp.external.dp = nv50_pior_dp_new,
        .dac.nr = 3,
+       .dac.new = nv50_dac_new,
        .dac.power = nv50_dac_power,
        .dac.sense = nv50_dac_sense,
        .sor.nr = 2,
+       .sor.new = nv50_sor_new,
        .sor.power = nv50_sor_power,
        .pior.nr = 3,
+       .pior.new = nv50_pior_new,
        .pior.power = nv50_pior_power,
 };
 
index 42c2dd83fe569033c5ab28b8964df2fdf287ee68..06249f62747ca879f53152a789978122fc21237f 100644 (file)
@@ -80,12 +80,14 @@ struct nv50_disp_func {
 
        struct {
                int nr;
+               int (*new)(struct nvkm_disp *, int id);
                int (*power)(NV50_DISP_MTHD_V1);
                int (*sense)(NV50_DISP_MTHD_V1);
        } dac;
 
        struct {
                int nr;
+               int (*new)(struct nvkm_disp *, int id);
                int (*power)(NV50_DISP_MTHD_V1);
                int (*hda_eld)(NV50_DISP_MTHD_V1);
                int (*hdmi)(NV50_DISP_MTHD_V1);
@@ -94,6 +96,7 @@ struct nv50_disp_func {
 
        struct {
                int nr;
+               int (*new)(struct nvkm_disp *, int id);
                int (*power)(NV50_DISP_MTHD_V1);
        } pior;
 };
index cf85f8324ad474f68557cda1516d0f568b3ebed4..f81ba52c8c19105755f2e71072006720fb02aa4b 100644 (file)
@@ -21,6 +21,7 @@
  *
  * Authors: Ben Skeggs
  */
+#include "ior.h"
 #include "nv50.h"
 
 #include <core/client.h>
@@ -119,3 +120,13 @@ nv50_pior_power(NV50_DISP_MTHD_V1)
        disp->pior.type[outp->or] = type;
        return 0;
 }
+
+static const struct nvkm_ior_func
+nv50_pior = {
+};
+
+int
+nv50_pior_new(struct nvkm_disp *disp, int id)
+{
+       return nvkm_ior_new_(&nv50_pior, disp, PIOR, id);
+}
index 732dda51375250be8865bb60456b374dffae806f..87b097327e294f66530a489a3954b8cf32fea5cf 100644 (file)
@@ -21,6 +21,7 @@
  *
  * Authors: Ben Skeggs
  */
+#include "ior.h"
 #include "nv50.h"
 
 #include <subdev/timer.h>
@@ -276,3 +277,13 @@ nv50_disp_dptmds_war_2(struct nv50_disp *disp, struct dcb_output *outp)
                nvkm_wr32(device, 0x61c040 + soff + pu_pc * 4, 0x1f008000);
        }
 }
+
+static const struct nvkm_ior_func
+g94_sor = {
+};
+
+int
+g94_sor_new(struct nvkm_disp *disp, int id)
+{
+       return nvkm_ior_new_(&g94_sor, disp, SOR, id);
+}
index dcdb0faaa87a2023214634fd5a910cffbfddde33..6ad8af038eaef56742ac436bdc52e97965d3e093 100644 (file)
@@ -21,6 +21,7 @@
  *
  * Authors: Ben Skeggs
  */
+#include "ior.h"
 #include "nv50.h"
 
 void
@@ -128,3 +129,13 @@ gf119_sor_dp_new(struct nvkm_disp *disp, int index,
 {
        return nvkm_output_dp_new_(&gf119_sor_dp_func, disp, index, dcbE, poutp);
 }
+
+static const struct nvkm_ior_func
+gf119_sor = {
+};
+
+int
+gf119_sor_new(struct nvkm_disp *disp, int id)
+{
+       return nvkm_ior_new_(&gf119_sor, disp, SOR, id);
+}
index 7fcaf0378e81c884ed18944dcb836a3fcb28657b..590d66002c589e8d3c2440329b402b0c125d95b9 100644 (file)
@@ -21,6 +21,7 @@
  *
  * Authors: Ben Skeggs <bskeggs@redhat.com>
  */
+#include "ior.h"
 #include "nv50.h"
 
 int
@@ -51,3 +52,13 @@ gm107_sor_dp_new(struct nvkm_disp *disp, int index,
 {
        return nvkm_output_dp_new_(&gm107_sor_dp_func, disp, index, dcbE, poutp);
 }
+
+static const struct nvkm_ior_func
+gm107_sor = {
+};
+
+int
+gm107_sor_new(struct nvkm_disp *disp, int id)
+{
+       return nvkm_ior_new_(&gm107_sor, disp, SOR, id);
+}
index 82b1f64b83b67a6b8485c616490b3d3c82742f85..df3917cb1cb944933acaf22f605ebbe1118a0441 100644 (file)
@@ -21,6 +21,7 @@
  *
  * Authors: Ben Skeggs
  */
+#include "ior.h"
 #include "nv50.h"
 
 #include <subdev/timer.h>
@@ -128,3 +129,13 @@ gm200_sor_magic(struct nvkm_output *outp)
        if (outp->info.sorconf.link & 2)
                nvkm_mask(device, 0x612388 + soff, 0x0000001f, 0x00000010 | data);
 }
+
+static const struct nvkm_ior_func
+gm200_sor = {
+};
+
+int
+gm200_sor_new(struct nvkm_disp *disp, int id)
+{
+       return nvkm_ior_new_(&gm200_sor, disp, SOR, id);
+}
index 83f44170ddd3bdc555d07de1debc41169c1d27f8..fb43307466cd46b7ff0ba6395819cdf7649e6384 100644 (file)
@@ -21,6 +21,7 @@
  *
  * Authors: Ben Skeggs
  */
+#include "ior.h"
 #include "nv50.h"
 #include "outp.h"
 
@@ -77,3 +78,13 @@ nv50_sor_power(NV50_DISP_MTHD_V1)
        );
        return 0;
 }
+
+static const struct nvkm_ior_func
+nv50_sor = {
+};
+
+int
+nv50_sor_new(struct nvkm_disp *disp, int id)
+{
+       return nvkm_ior_new_(&nv50_sor, disp, SOR, id);
+}