Commit 981a8162 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/disp: s/nvkm_connector/nvkm_conn/

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent f3e70d29
...@@ -210,7 +210,7 @@ static int ...@@ -210,7 +210,7 @@ static int
nvkm_disp_fini(struct nvkm_engine *engine, bool suspend) nvkm_disp_fini(struct nvkm_engine *engine, bool suspend)
{ {
struct nvkm_disp *disp = nvkm_disp(engine); struct nvkm_disp *disp = nvkm_disp(engine);
struct nvkm_connector *conn; struct nvkm_conn *conn;
struct nvkm_outp *outp; struct nvkm_outp *outp;
list_for_each_entry(outp, &disp->outp, head) { list_for_each_entry(outp, &disp->outp, head) {
...@@ -218,7 +218,7 @@ nvkm_disp_fini(struct nvkm_engine *engine, bool suspend) ...@@ -218,7 +218,7 @@ nvkm_disp_fini(struct nvkm_engine *engine, bool suspend)
} }
list_for_each_entry(conn, &disp->conn, head) { list_for_each_entry(conn, &disp->conn, head) {
nvkm_connector_fini(conn); nvkm_conn_fini(conn);
} }
return 0; return 0;
...@@ -228,11 +228,11 @@ static int ...@@ -228,11 +228,11 @@ static int
nvkm_disp_init(struct nvkm_engine *engine) nvkm_disp_init(struct nvkm_engine *engine)
{ {
struct nvkm_disp *disp = nvkm_disp(engine); struct nvkm_disp *disp = nvkm_disp(engine);
struct nvkm_connector *conn; struct nvkm_conn *conn;
struct nvkm_outp *outp; struct nvkm_outp *outp;
list_for_each_entry(conn, &disp->conn, head) { list_for_each_entry(conn, &disp->conn, head) {
nvkm_connector_init(conn); nvkm_conn_init(conn);
} }
list_for_each_entry(outp, &disp->outp, head) { list_for_each_entry(outp, &disp->outp, head) {
...@@ -246,7 +246,7 @@ static void * ...@@ -246,7 +246,7 @@ static void *
nvkm_disp_dtor(struct nvkm_engine *engine) nvkm_disp_dtor(struct nvkm_engine *engine)
{ {
struct nvkm_disp *disp = nvkm_disp(engine); struct nvkm_disp *disp = nvkm_disp(engine);
struct nvkm_connector *conn; struct nvkm_conn *conn;
struct nvkm_outp *outp; struct nvkm_outp *outp;
void *data = disp; void *data = disp;
...@@ -265,7 +265,7 @@ nvkm_disp_dtor(struct nvkm_engine *engine) ...@@ -265,7 +265,7 @@ nvkm_disp_dtor(struct nvkm_engine *engine)
while (!list_empty(&disp->conn)) { while (!list_empty(&disp->conn)) {
conn = list_first_entry(&disp->conn, typeof(*conn), head); conn = list_first_entry(&disp->conn, typeof(*conn), head);
list_del(&conn->head); list_del(&conn->head);
nvkm_connector_del(&conn); nvkm_conn_del(&conn);
} }
return data; return data;
...@@ -286,7 +286,7 @@ nvkm_disp_ctor(const struct nvkm_disp_func *func, struct nvkm_device *device, ...@@ -286,7 +286,7 @@ nvkm_disp_ctor(const struct nvkm_disp_func *func, struct nvkm_device *device,
{ {
struct nvkm_bios *bios = device->bios; struct nvkm_bios *bios = device->bios;
struct nvkm_outp *outp, *outt, *pair; struct nvkm_outp *outp, *outt, *pair;
struct nvkm_connector *conn; struct nvkm_conn *conn;
struct nvbios_connE connE; struct nvbios_connE connE;
struct dcb_output dcbE; struct dcb_output dcbE;
u8 hpd = 0, ver, hdr; u8 hpd = 0, ver, hdr;
...@@ -404,12 +404,12 @@ nvkm_disp_ctor(const struct nvkm_disp_func *func, struct nvkm_device *device, ...@@ -404,12 +404,12 @@ nvkm_disp_ctor(const struct nvkm_disp_func *func, struct nvkm_device *device,
continue; continue;
/* apparently we need to create a new one! */ /* apparently we need to create a new one! */
ret = nvkm_connector_new(disp, i, &connE, &outp->conn); ret = nvkm_conn_new(disp, i, &connE, &outp->conn);
if (ret) { if (ret) {
nvkm_error(&disp->engine.subdev, nvkm_error(&disp->engine.subdev,
"failed to create output %d conn: %d\n", "failed to create output %d conn: %d\n",
outp->index, ret); outp->index, ret);
nvkm_connector_del(&outp->conn); nvkm_conn_del(&outp->conn);
list_del(&outp->head); list_del(&outp->head);
nvkm_outp_del(&outp); nvkm_outp_del(&outp);
continue; continue;
......
...@@ -30,9 +30,9 @@ ...@@ -30,9 +30,9 @@
#include <nvif/event.h> #include <nvif/event.h>
static int static int
nvkm_connector_hpd(struct nvkm_notify *notify) nvkm_conn_hpd(struct nvkm_notify *notify)
{ {
struct nvkm_connector *conn = container_of(notify, typeof(*conn), hpd); struct nvkm_conn *conn = container_of(notify, typeof(*conn), hpd);
struct nvkm_disp *disp = conn->disp; struct nvkm_disp *disp = conn->disp;
struct nvkm_gpio *gpio = disp->engine.subdev.device->gpio; struct nvkm_gpio *gpio = disp->engine.subdev.device->gpio;
const struct nvkm_gpio_ntfy_rep *line = notify->data; const struct nvkm_gpio_ntfy_rep *line = notify->data;
...@@ -52,21 +52,21 @@ nvkm_connector_hpd(struct nvkm_notify *notify) ...@@ -52,21 +52,21 @@ nvkm_connector_hpd(struct nvkm_notify *notify)
} }
void void
nvkm_connector_fini(struct nvkm_connector *conn) nvkm_conn_fini(struct nvkm_conn *conn)
{ {
nvkm_notify_put(&conn->hpd); nvkm_notify_put(&conn->hpd);
} }
void void
nvkm_connector_init(struct nvkm_connector *conn) nvkm_conn_init(struct nvkm_conn *conn)
{ {
nvkm_notify_get(&conn->hpd); nvkm_notify_get(&conn->hpd);
} }
void void
nvkm_connector_del(struct nvkm_connector **pconn) nvkm_conn_del(struct nvkm_conn **pconn)
{ {
struct nvkm_connector *conn = *pconn; struct nvkm_conn *conn = *pconn;
if (conn) { if (conn) {
nvkm_notify_fini(&conn->hpd); nvkm_notify_fini(&conn->hpd);
kfree(*pconn); kfree(*pconn);
...@@ -75,8 +75,8 @@ nvkm_connector_del(struct nvkm_connector **pconn) ...@@ -75,8 +75,8 @@ nvkm_connector_del(struct nvkm_connector **pconn)
} }
static void static void
nvkm_connector_ctor(struct nvkm_disp *disp, int index, nvkm_conn_ctor(struct nvkm_disp *disp, int index, struct nvbios_connE *info,
struct nvbios_connE *info, struct nvkm_connector *conn) struct nvkm_conn *conn)
{ {
static const u8 hpd[] = { 0x07, 0x08, 0x51, 0x52, 0x5e, 0x5f, 0x60 }; static const u8 hpd[] = { 0x07, 0x08, 0x51, 0x52, 0x5e, 0x5f, 0x60 };
struct nvkm_gpio *gpio = disp->engine.subdev.device->gpio; struct nvkm_gpio *gpio = disp->engine.subdev.device->gpio;
...@@ -105,7 +105,7 @@ nvkm_connector_ctor(struct nvkm_disp *disp, int index, ...@@ -105,7 +105,7 @@ nvkm_connector_ctor(struct nvkm_disp *disp, int index,
return; return;
} }
ret = nvkm_notify_init(NULL, &gpio->event, nvkm_connector_hpd, ret = nvkm_notify_init(NULL, &gpio->event, nvkm_conn_hpd,
true, &(struct nvkm_gpio_ntfy_req) { true, &(struct nvkm_gpio_ntfy_req) {
.mask = NVKM_GPIO_TOGGLED, .mask = NVKM_GPIO_TOGGLED,
.line = func.line, .line = func.line,
...@@ -122,11 +122,11 @@ nvkm_connector_ctor(struct nvkm_disp *disp, int index, ...@@ -122,11 +122,11 @@ nvkm_connector_ctor(struct nvkm_disp *disp, int index,
} }
int int
nvkm_connector_new(struct nvkm_disp *disp, int index, nvkm_conn_new(struct nvkm_disp *disp, int index, struct nvbios_connE *info,
struct nvbios_connE *info, struct nvkm_connector **pconn) struct nvkm_conn **pconn)
{ {
if (!(*pconn = kzalloc(sizeof(**pconn), GFP_KERNEL))) if (!(*pconn = kzalloc(sizeof(**pconn), GFP_KERNEL)))
return -ENOMEM; return -ENOMEM;
nvkm_connector_ctor(disp, index, info, *pconn); nvkm_conn_ctor(disp, index, info, *pconn);
return 0; return 0;
} }
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include <subdev/bios.h> #include <subdev/bios.h>
#include <subdev/bios/conn.h> #include <subdev/bios/conn.h>
struct nvkm_connector { struct nvkm_conn {
struct nvkm_disp *disp; struct nvkm_disp *disp;
int index; int index;
struct nvbios_connE info; struct nvbios_connE info;
...@@ -16,14 +16,14 @@ struct nvkm_connector { ...@@ -16,14 +16,14 @@ struct nvkm_connector {
struct list_head head; struct list_head head;
}; };
int nvkm_connector_new(struct nvkm_disp *, int index, struct nvbios_connE *, int nvkm_conn_new(struct nvkm_disp *, int index, struct nvbios_connE *,
struct nvkm_connector **); struct nvkm_conn **);
void nvkm_connector_del(struct nvkm_connector **); void nvkm_conn_del(struct nvkm_conn **);
void nvkm_connector_init(struct nvkm_connector *); void nvkm_conn_init(struct nvkm_conn *);
void nvkm_connector_fini(struct nvkm_connector *); void nvkm_conn_fini(struct nvkm_conn *);
#define CONN_MSG(c,l,f,a...) do { \ #define CONN_MSG(c,l,f,a...) do { \
struct nvkm_connector *_conn = (c); \ struct nvkm_conn *_conn = (c); \
nvkm_##l(&_conn->disp->engine.subdev, "conn %02x:%02x%02x: "f"\n", \ nvkm_##l(&_conn->disp->engine.subdev, "conn %02x:%02x%02x: "f"\n", \
_conn->index, _conn->info.location, _conn->info.type, ##a); \ _conn->index, _conn->info.location, _conn->info.type, ##a); \
} while(0) } while(0)
......
...@@ -482,7 +482,7 @@ nvkm_dp_hpd(struct nvkm_notify *notify) ...@@ -482,7 +482,7 @@ nvkm_dp_hpd(struct nvkm_notify *notify)
{ {
const struct nvkm_i2c_ntfy_rep *line = notify->data; const struct nvkm_i2c_ntfy_rep *line = notify->data;
struct nvkm_dp *dp = container_of(notify, typeof(*dp), hpd); struct nvkm_dp *dp = container_of(notify, typeof(*dp), hpd);
struct nvkm_connector *conn = dp->outp.conn; struct nvkm_conn *conn = dp->outp.conn;
struct nvkm_disp *disp = dp->outp.disp; struct nvkm_disp *disp = dp->outp.disp;
struct nvif_notify_conn_rep_v0 rep = {}; struct nvif_notify_conn_rep_v0 rep = {};
...@@ -503,7 +503,7 @@ nvkm_dp_irq(struct nvkm_notify *notify) ...@@ -503,7 +503,7 @@ nvkm_dp_irq(struct nvkm_notify *notify)
{ {
const struct nvkm_i2c_ntfy_rep *line = notify->data; const struct nvkm_i2c_ntfy_rep *line = notify->data;
struct nvkm_dp *dp = container_of(notify, typeof(*dp), irq); struct nvkm_dp *dp = container_of(notify, typeof(*dp), irq);
struct nvkm_connector *conn = dp->outp.conn; struct nvkm_conn *conn = dp->outp.conn;
struct nvkm_disp *disp = dp->outp.disp; struct nvkm_disp *disp = dp->outp.disp;
struct nvif_notify_conn_rep_v0 rep = { struct nvif_notify_conn_rep_v0 rep = {
.mask = NVIF_NOTIFY_CONN_V0_IRQ, .mask = NVIF_NOTIFY_CONN_V0_IRQ,
......
...@@ -16,7 +16,7 @@ struct nvkm_outp { ...@@ -16,7 +16,7 @@ struct nvkm_outp {
int or; int or;
struct list_head head; struct list_head head;
struct nvkm_connector *conn; struct nvkm_conn *conn;
}; };
void nvkm_outp_ctor(const struct nvkm_outp_func *, struct nvkm_disp *, void nvkm_outp_ctor(const struct nvkm_outp_func *, struct nvkm_disp *,
......
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