From 981a8162e2f8282c90f6523324bb51720699bc6a Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Fri, 19 May 2017 23:59:34 +1000 Subject: [PATCH] drm/nouveau/disp: s/nvkm_connector/nvkm_conn/ Signed-off-by: Ben Skeggs --- .../gpu/drm/nouveau/nvkm/engine/disp/base.c | 18 +++++++------- .../gpu/drm/nouveau/nvkm/engine/disp/conn.c | 24 +++++++++---------- .../gpu/drm/nouveau/nvkm/engine/disp/conn.h | 14 +++++------ drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 4 ++-- .../gpu/drm/nouveau/nvkm/engine/disp/outp.h | 2 +- 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c index 53309214718b..34dc165394e1 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c @@ -210,7 +210,7 @@ static int nvkm_disp_fini(struct nvkm_engine *engine, bool suspend) { struct nvkm_disp *disp = nvkm_disp(engine); - struct nvkm_connector *conn; + struct nvkm_conn *conn; struct nvkm_outp *outp; list_for_each_entry(outp, &disp->outp, head) { @@ -218,7 +218,7 @@ nvkm_disp_fini(struct nvkm_engine *engine, bool suspend) } list_for_each_entry(conn, &disp->conn, head) { - nvkm_connector_fini(conn); + nvkm_conn_fini(conn); } return 0; @@ -228,11 +228,11 @@ static int nvkm_disp_init(struct nvkm_engine *engine) { struct nvkm_disp *disp = nvkm_disp(engine); - struct nvkm_connector *conn; + struct nvkm_conn *conn; struct nvkm_outp *outp; list_for_each_entry(conn, &disp->conn, head) { - nvkm_connector_init(conn); + nvkm_conn_init(conn); } list_for_each_entry(outp, &disp->outp, head) { @@ -246,7 +246,7 @@ static void * nvkm_disp_dtor(struct nvkm_engine *engine) { struct nvkm_disp *disp = nvkm_disp(engine); - struct nvkm_connector *conn; + struct nvkm_conn *conn; struct nvkm_outp *outp; void *data = disp; @@ -265,7 +265,7 @@ nvkm_disp_dtor(struct nvkm_engine *engine) while (!list_empty(&disp->conn)) { conn = list_first_entry(&disp->conn, typeof(*conn), head); list_del(&conn->head); - nvkm_connector_del(&conn); + nvkm_conn_del(&conn); } return data; @@ -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_outp *outp, *outt, *pair; - struct nvkm_connector *conn; + struct nvkm_conn *conn; struct nvbios_connE connE; struct dcb_output dcbE; u8 hpd = 0, ver, hdr; @@ -404,12 +404,12 @@ nvkm_disp_ctor(const struct nvkm_disp_func *func, struct nvkm_device *device, continue; /* 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) { nvkm_error(&disp->engine.subdev, "failed to create output %d conn: %d\n", outp->index, ret); - nvkm_connector_del(&outp->conn); + nvkm_conn_del(&outp->conn); list_del(&outp->head); nvkm_outp_del(&outp); continue; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.c index c6910d644a3d..febc5c274488 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.c @@ -30,9 +30,9 @@ #include 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_gpio *gpio = disp->engine.subdev.device->gpio; const struct nvkm_gpio_ntfy_rep *line = notify->data; @@ -52,21 +52,21 @@ nvkm_connector_hpd(struct nvkm_notify *notify) } void -nvkm_connector_fini(struct nvkm_connector *conn) +nvkm_conn_fini(struct nvkm_conn *conn) { nvkm_notify_put(&conn->hpd); } void -nvkm_connector_init(struct nvkm_connector *conn) +nvkm_conn_init(struct nvkm_conn *conn) { nvkm_notify_get(&conn->hpd); } 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) { nvkm_notify_fini(&conn->hpd); kfree(*pconn); @@ -75,8 +75,8 @@ nvkm_connector_del(struct nvkm_connector **pconn) } static void -nvkm_connector_ctor(struct nvkm_disp *disp, int index, - struct nvbios_connE *info, struct nvkm_connector *conn) +nvkm_conn_ctor(struct nvkm_disp *disp, int index, struct nvbios_connE *info, + struct nvkm_conn *conn) { static const u8 hpd[] = { 0x07, 0x08, 0x51, 0x52, 0x5e, 0x5f, 0x60 }; struct nvkm_gpio *gpio = disp->engine.subdev.device->gpio; @@ -105,7 +105,7 @@ nvkm_connector_ctor(struct nvkm_disp *disp, int index, 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) { .mask = NVKM_GPIO_TOGGLED, .line = func.line, @@ -122,11 +122,11 @@ nvkm_connector_ctor(struct nvkm_disp *disp, int index, } int -nvkm_connector_new(struct nvkm_disp *disp, int index, - struct nvbios_connE *info, struct nvkm_connector **pconn) +nvkm_conn_new(struct nvkm_disp *disp, int index, struct nvbios_connE *info, + struct nvkm_conn **pconn) { if (!(*pconn = kzalloc(sizeof(**pconn), GFP_KERNEL))) return -ENOMEM; - nvkm_connector_ctor(disp, index, info, *pconn); + nvkm_conn_ctor(disp, index, info, *pconn); return 0; } diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.h b/drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.h index ed32fe7f1864..de962b7b026d 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.h @@ -6,7 +6,7 @@ #include #include -struct nvkm_connector { +struct nvkm_conn { struct nvkm_disp *disp; int index; struct nvbios_connE info; @@ -16,14 +16,14 @@ struct nvkm_connector { struct list_head head; }; -int nvkm_connector_new(struct nvkm_disp *, int index, struct nvbios_connE *, - struct nvkm_connector **); -void nvkm_connector_del(struct nvkm_connector **); -void nvkm_connector_init(struct nvkm_connector *); -void nvkm_connector_fini(struct nvkm_connector *); +int nvkm_conn_new(struct nvkm_disp *, int index, struct nvbios_connE *, + struct nvkm_conn **); +void nvkm_conn_del(struct nvkm_conn **); +void nvkm_conn_init(struct nvkm_conn *); +void nvkm_conn_fini(struct nvkm_conn *); #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", \ _conn->index, _conn->info.location, _conn->info.type, ##a); \ } while(0) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c index 8a68761edc49..d62e93bb0f70 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c @@ -482,7 +482,7 @@ nvkm_dp_hpd(struct nvkm_notify *notify) { const struct nvkm_i2c_ntfy_rep *line = notify->data; 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 nvif_notify_conn_rep_v0 rep = {}; @@ -503,7 +503,7 @@ nvkm_dp_irq(struct nvkm_notify *notify) { const struct nvkm_i2c_ntfy_rep *line = notify->data; 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 nvif_notify_conn_rep_v0 rep = { .mask = NVIF_NOTIFY_CONN_V0_IRQ, diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h b/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h index b3e3030d6ef4..682fc99c9351 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h @@ -16,7 +16,7 @@ struct nvkm_outp { int or; struct list_head head; - struct nvkm_connector *conn; + struct nvkm_conn *conn; }; void nvkm_outp_ctor(const struct nvkm_outp_func *, struct nvkm_disp *, -- 2.20.1