drm/nouveau/disp: rename nvkm_output to nvkm_outp
authorBen Skeggs <bskeggs@redhat.com>
Fri, 19 May 2017 13:59:34 +0000 (23:59 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 16 Jun 2017 04:04:46 +0000 (14:04 +1000)
This isn't technically "output", but, "display/output path".

Not all users of nvkm_output have been changed here.  The remaining
ones belong to code that's disappearing in upcoming commits.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c
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/rootnv50.c

index 1efe91b1e22b164e02c55acf0d3db5ef2f9c29fa..53309214718b59210a4c1bf40e0070cc584f4b20 100644 (file)
@@ -96,7 +96,7 @@ nvkm_disp_hpd_ctor(struct nvkm_object *object, void *data, u32 size,
        union {
                struct nvif_notify_conn_req_v0 v0;
        } *req = data;
-       struct nvkm_output *outp;
+       struct nvkm_outp *outp;
        int ret = -ENOSYS;
 
        if (!(ret = nvif_unpack(ret, &data, &size, req->v0, 0, 0, false))) {
@@ -211,10 +211,10 @@ nvkm_disp_fini(struct nvkm_engine *engine, bool suspend)
 {
        struct nvkm_disp *disp = nvkm_disp(engine);
        struct nvkm_connector *conn;
-       struct nvkm_output *outp;
+       struct nvkm_outp *outp;
 
        list_for_each_entry(outp, &disp->outp, head) {
-               nvkm_output_fini(outp);
+               nvkm_outp_fini(outp);
        }
 
        list_for_each_entry(conn, &disp->conn, head) {
@@ -229,14 +229,14 @@ nvkm_disp_init(struct nvkm_engine *engine)
 {
        struct nvkm_disp *disp = nvkm_disp(engine);
        struct nvkm_connector *conn;
-       struct nvkm_output *outp;
+       struct nvkm_outp *outp;
 
        list_for_each_entry(conn, &disp->conn, head) {
                nvkm_connector_init(conn);
        }
 
        list_for_each_entry(outp, &disp->outp, head) {
-               nvkm_output_init(outp);
+               nvkm_outp_init(outp);
        }
 
        return 0;
@@ -247,7 +247,7 @@ nvkm_disp_dtor(struct nvkm_engine *engine)
 {
        struct nvkm_disp *disp = nvkm_disp(engine);
        struct nvkm_connector *conn;
-       struct nvkm_output *outp;
+       struct nvkm_outp *outp;
        void *data = disp;
 
        if (disp->func->dtor)
@@ -259,7 +259,7 @@ nvkm_disp_dtor(struct nvkm_engine *engine)
        while (!list_empty(&disp->outp)) {
                outp = list_first_entry(&disp->outp, typeof(*outp), head);
                list_del(&outp->head);
-               nvkm_output_del(&outp);
+               nvkm_outp_del(&outp);
        }
 
        while (!list_empty(&disp->conn)) {
@@ -285,7 +285,7 @@ nvkm_disp_ctor(const struct nvkm_disp_func *func, struct nvkm_device *device,
               int index, int heads, struct nvkm_disp *disp)
 {
        struct nvkm_bios *bios = device->bios;
-       struct nvkm_output *outp, *outt, *pair;
+       struct nvkm_outp *outp, *outt, *pair;
        struct nvkm_connector *conn;
        struct nvbios_connE connE;
        struct dcb_output dcbE;
@@ -307,7 +307,7 @@ nvkm_disp_ctor(const struct nvkm_disp_func *func, struct nvkm_device *device,
        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_output **);
+                           struct nvkm_outp **);
 
                if (dcbE.type == DCB_OUTPUT_UNUSED)
                        continue;
@@ -350,7 +350,7 @@ nvkm_disp_ctor(const struct nvkm_disp_func *func, struct nvkm_device *device,
                        }
                        nvkm_error(&disp->engine.subdev,
                                   "failed to create output %d\n", i);
-                       nvkm_output_del(&outp);
+                       nvkm_outp_del(&outp);
                        continue;
                }
 
@@ -411,7 +411,7 @@ nvkm_disp_ctor(const struct nvkm_disp_func *func, struct nvkm_device *device,
                                   outp->index, ret);
                        nvkm_connector_del(&outp->conn);
                        list_del(&outp->head);
-                       nvkm_output_del(&outp);
+                       nvkm_outp_del(&outp);
                        continue;
                }
 
index 1a3c460bcfe9f759fa7df4a6b960948a40fa19a5..35d9f0fc3fe86d597a48792dd2cee54a67d274a9 100644 (file)
@@ -566,7 +566,7 @@ nvkm_output_dp_ctor(const struct nvkm_output_dp_func *func,
        u32 data;
        int ret;
 
-       nvkm_output_ctor(&nvkm_output_dp_func, disp, index, dcbE, &outp->base);
+       nvkm_outp_ctor(&nvkm_output_dp_func, disp, index, dcbE, &outp->base);
        outp->func = func;
        outp->aux = aux;
        if (!outp->aux) {
index bbe5ec0dedb26474f6a6fcce0fc5646c5e8cb26b..f030ff51d076ca89e26bf8763cb93abad7fa7ea0 100644 (file)
 #include <subdev/i2c.h>
 
 void
-nvkm_output_fini(struct nvkm_output *outp)
+nvkm_outp_fini(struct nvkm_outp *outp)
 {
        if (outp->func->fini)
                outp->func->fini(outp);
 }
 
 void
-nvkm_output_init(struct nvkm_output *outp)
+nvkm_outp_init(struct nvkm_outp *outp)
 {
        if (outp->func->init)
                outp->func->init(outp);
 }
 
 void
-nvkm_output_del(struct nvkm_output **poutp)
+nvkm_outp_del(struct nvkm_outp **poutp)
 {
-       struct nvkm_output *outp = *poutp;
+       struct nvkm_outp *outp = *poutp;
        if (outp && !WARN_ON(!outp->func)) {
                if (outp->func->dtor)
                        *poutp = outp->func->dtor(outp);
@@ -54,8 +54,8 @@ nvkm_output_del(struct nvkm_output **poutp)
 }
 
 void
-nvkm_output_ctor(const struct nvkm_output_func *func, struct nvkm_disp *disp,
-                int index, struct dcb_output *dcbE, struct nvkm_output *outp)
+nvkm_outp_ctor(const struct nvkm_outp_func *func, struct nvkm_disp *disp,
+              int index, struct dcb_output *dcbE, struct nvkm_outp *outp)
 {
        struct nvkm_i2c *i2c = disp->engine.subdev.device->i2c;
 
@@ -75,13 +75,13 @@ nvkm_output_ctor(const struct nvkm_output_func *func, struct nvkm_disp *disp,
 }
 
 int
-nvkm_output_new_(const struct nvkm_output_func *func,
-                struct nvkm_disp *disp, int index, struct dcb_output *dcbE,
-                struct nvkm_output **poutp)
+nvkm_outp_new_(const struct nvkm_outp_func *func,
+              struct nvkm_disp *disp, int index, struct dcb_output *dcbE,
+              struct nvkm_outp **poutp)
 {
        if (!(*poutp = kzalloc(sizeof(**poutp), GFP_KERNEL)))
                return -ENOMEM;
 
-       nvkm_output_ctor(func, disp, index, dcbE, *poutp);
+       nvkm_outp_ctor(func, disp, index, dcbE, *poutp);
        return 0;
 }
index 07727198d7cec592471b07403de8ba30335a9ed6..b3e3030d6ef4c68f8a831e10731b6ddccb9b0cdd 100644 (file)
@@ -5,8 +5,8 @@
 #include <subdev/bios.h>
 #include <subdev/bios/dcb.h>
 
-struct nvkm_output {
-       const struct nvkm_output_func *func;
+struct nvkm_outp {
+       const struct nvkm_outp_func *func;
        struct nvkm_disp *disp;
        int index;
        struct dcb_output info;
@@ -19,19 +19,24 @@ struct nvkm_output {
        struct nvkm_connector *conn;
 };
 
-struct nvkm_output_func {
-       void *(*dtor)(struct nvkm_output *);
-       void (*init)(struct nvkm_output *);
-       void (*fini)(struct nvkm_output *);
+void nvkm_outp_ctor(const struct nvkm_outp_func *, 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 *);
+
+struct nvkm_outp_func {
+       void *(*dtor)(struct nvkm_outp *);
+       void (*init)(struct nvkm_outp *);
+       void (*fini)(struct nvkm_outp *);
 };
 
-void nvkm_output_ctor(const struct nvkm_output_func *, struct nvkm_disp *,
-                     int index, struct dcb_output *, struct nvkm_output *);
-int nvkm_output_new_(const struct nvkm_output_func *, struct nvkm_disp *,
-                    int index, struct dcb_output *, struct nvkm_output **);
-void nvkm_output_del(struct nvkm_output **);
-void nvkm_output_init(struct nvkm_output *);
-void nvkm_output_fini(struct nvkm_output *);
+#define nvkm_output nvkm_outp
+#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 **);
@@ -45,7 +50,7 @@ u32 g94_sor_dp_lane_map(struct nvkm_device *, u8 lane);
 void gm200_sor_magic(struct nvkm_output *outp);
 
 #define OUTP_MSG(o,l,f,a...) do {                                              \
-       struct nvkm_output *_outp = (o);                                       \
+       struct nvkm_outp *_outp = (o);                                         \
        nvkm_##l(&_outp->disp->engine.subdev, "outp %02x:%04x:%04x: "f"\n",    \
                 _outp->index, _outp->info.hasht, _outp->info.hashm, ##a);     \
 } while(0)
index e70dc6a9ff7d5fe65d4e2ef42d8dc8cd99372be4..2e73aeb86070d0e5df7a7fcaff0f4d0344fc5da1 100644 (file)
@@ -76,8 +76,7 @@ nv50_disp_root_mthd_(struct nvkm_object *object, u32 mthd, void *data, u32 size)
        struct nv50_disp_root *root = nv50_disp_root(object);
        struct nv50_disp *disp = root->disp;
        const struct nv50_disp_func *func = disp->func;
-       struct nvkm_output *outp = NULL;
-       struct nvkm_output *temp;
+       struct nvkm_outp *temp, *outp = NULL;
        u16 type, mask = 0;
        int head, ret = -ENOSYS;