Commit d7ce92e2 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/disp: rename nvkm_output to nvkm_outp

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: default avatarBen Skeggs <bskeggs@redhat.com>
parent af85389c
......@@ -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;
}
......
......@@ -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) {
......
......@@ -28,23 +28,23 @@
#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;
}
......@@ -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)
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment