Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358287
b: refs/heads/master
c: 23fc09e
h: refs/heads/master
i:
  358285: e057f40
  358283: 7a8719b
  358279: 21167e7
  358271: ac67c13
v: v3
  • Loading branch information
Ben Skeggs committed Feb 20, 2013
1 parent ff81df1 commit 780eeda
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e18c080fb8695d038f69c26c248f5ecbd9e8aa77
refs/heads/master: 23fc09ee09c3b8f904a2220c7f71b2ff04e91219
16 changes: 9 additions & 7 deletions trunk/drivers/gpu/drm/nouveau/nouveau_connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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) ==
Expand All @@ -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
Expand Down Expand Up @@ -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;
Expand Down
5 changes: 4 additions & 1 deletion trunk/drivers/gpu/drm/nouveau/nouveau_connector.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
#include <drm/drm_edid.h>
#include "nouveau_crtc.h"

#include <subdev/bios.h>
#include <subdev/bios/gpio.h>

struct nouveau_i2c_port;

enum nouveau_underscan_type {
Expand Down Expand Up @@ -59,9 +62,9 @@ enum nouveau_dithering_depth {
struct nouveau_connector {
struct drm_connector base;
enum dcb_connector_type type;
struct dcb_gpio_func hpd;
u8 index;
u8 *dcb;
u8 hpd;

int dithering_mode;
int dithering_depth;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/gpu/drm/nouveau/nouveau_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ nouveau_display_init(struct drm_device *dev)
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
struct nouveau_connector *conn = nouveau_connector(connector);
if (gpio)
gpio->irq(gpio, 0, conn->hpd, 0xff, true);
gpio->irq(gpio, 0, conn->hpd.func, 0xff, true);
}

return ret;
Expand All @@ -252,7 +252,7 @@ nouveau_display_fini(struct drm_device *dev)
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
struct nouveau_connector *conn = nouveau_connector(connector);
if (gpio)
gpio->irq(gpio, 0, conn->hpd, 0xff, false);
gpio->irq(gpio, 0, conn->hpd.func, 0xff, false);
}

drm_kms_helper_poll_disable(dev);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/gpu/drm/nouveau/nouveau_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ nouveau_dp_link_train(struct drm_encoder *encoder, u32 datarate,
* we take during link training (DP_SET_POWER is one), we need
* to ignore them for the moment to avoid races.
*/
gpio->irq(gpio, 0, nv_connector->hpd, 0xff, false);
gpio->irq(gpio, 0, nv_connector->hpd.func, 0xff, false);

/* enable down-spreading and execute pre-train script from vbios */
dp_link_train_init(dev, &dp, nv_encoder->dp.dpcd[3] & 1);
Expand Down Expand Up @@ -300,7 +300,7 @@ nouveau_dp_link_train(struct drm_encoder *encoder, u32 datarate,
dp_link_train_fini(dev, &dp);

/* re-enable hotplug detect */
gpio->irq(gpio, 0, nv_connector->hpd, 0xff, true);
gpio->irq(gpio, 0, nv_connector->hpd.func, 0xff, true);
return true;
}

Expand Down

0 comments on commit 780eeda

Please sign in to comment.