summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_connector.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2013-02-03 20:29:53 +1000
committerBen Skeggs <bskeggs@redhat.com>2013-02-20 16:00:49 +1000
commit23fc09ee09c3b8f904a2220c7f71b2ff04e91219 (patch)
tree40bbc63d8ed760b9c58a3c67d140008f72f5490e /drivers/gpu/drm/nouveau/nouveau_connector.c
parente18c080fb8695d038f69c26c248f5ecbd9e8aa77 (diff)
drm/nouveau/drm: store full dcb gpio function data in connector
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_connector.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_connector.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
index 2f3e40ec86a0..a64e8777cbe9 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -111,8 +111,8 @@ nouveau_connector_destroy(struct drm_connector *connector)
drm = nouveau_drm(dev);
gpio = nouveau_gpio(drm->device);
- if (gpio && nv_connector->hpd != DCB_GPIO_UNUSED) {
- gpio->isr_del(gpio, 0, nv_connector->hpd, 0xff,
+ if (gpio && nv_connector->hpd.func != DCB_GPIO_UNUSED) {
+ gpio->isr_del(gpio, 0, nv_connector->hpd.func, 0xff,
nouveau_connector_hotplug, connector);
}
@@ -976,8 +976,10 @@ nouveau_connector_create(struct drm_device *dev, int index)
if (olddcb_conntab(dev)[3] >= 4)
entry |= (u32)ROM16(nv_connector->dcb[2]) << 16;
- nv_connector->hpd = ffs((entry & 0x07033000) >> 12);
- nv_connector->hpd = hpd[nv_connector->hpd];
+ ret = gpio->find(gpio, 0, hpd[ffs((entry & 0x07033000) >> 12)],
+ DCB_GPIO_UNUSED, &nv_connector->hpd);
+ if (ret)
+ nv_connector->hpd.func = DCB_GPIO_UNUSED;
nv_connector->type = nv_connector->dcb[0];
if (drm_conntype_from_dcb(nv_connector->type) ==
@@ -1000,7 +1002,7 @@ nouveau_connector_create(struct drm_device *dev, int index)
}
} else {
nv_connector->type = DCB_CONNECTOR_NONE;
- nv_connector->hpd = DCB_GPIO_UNUSED;
+ nv_connector->hpd.func = DCB_GPIO_UNUSED;
}
/* no vbios data, or an unknown dcb connector type - attempt to
@@ -1127,8 +1129,8 @@ nouveau_connector_create(struct drm_device *dev, int index)
}
connector->polled = DRM_CONNECTOR_POLL_CONNECT;
- if (gpio && nv_connector->hpd != DCB_GPIO_UNUSED) {
- ret = gpio->isr_add(gpio, 0, nv_connector->hpd, 0xff,
+ if (gpio && nv_connector->hpd.func != DCB_GPIO_UNUSED) {
+ ret = gpio->isr_add(gpio, 0, nv_connector->hpd.func, 0xff,
nouveau_connector_hotplug, connector);
if (ret == 0)
connector->polled = DRM_CONNECTOR_POLL_HPD;