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) {
}
list_for_each_entry(conn, &disp->conn, head) {
- nvkm_connector_fini(conn);
+ nvkm_conn_fini(conn);
}
return 0;
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) {
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;
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;
{
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;
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;
#include <nvif/event.h>
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;
}
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);
}
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;
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,
}
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;
}
#include <subdev/bios.h>
#include <subdev/bios/conn.h>
-struct nvkm_connector {
+struct nvkm_conn {
struct nvkm_disp *disp;
int index;
struct nvbios_connE info;
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)
{
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 = {};
{
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,
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 *,