diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-07-22 21:31:08 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-07-25 21:42:59 -0400 |
commit | d0875edd9374296af8702d850254809e34a809cd (patch) | |
tree | f9870d97129af1a7a941904f38fb60401a65b1b0 /drivers/gpu/drm/nouveau/nv50_display.c | |
parent | 49eed80ad0cfa5d5d02992e8088463cbf1a5ff85 (diff) |
drm/nv50: add function to control GPIO IRQ reporting
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_display.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_display.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c index c19ed8c8e3b..fbd91c251ee 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c | |||
@@ -184,7 +184,7 @@ nv50_display_init(struct drm_device *dev) | |||
184 | struct nouveau_timer_engine *ptimer = &dev_priv->engine.timer; | 184 | struct nouveau_timer_engine *ptimer = &dev_priv->engine.timer; |
185 | struct nouveau_channel *evo = dev_priv->evo; | 185 | struct nouveau_channel *evo = dev_priv->evo; |
186 | struct drm_connector *connector; | 186 | struct drm_connector *connector; |
187 | uint32_t val, ram_amount, hpd_en[2]; | 187 | uint32_t val, ram_amount; |
188 | uint64_t start; | 188 | uint64_t start; |
189 | int ret, i; | 189 | int ret, i; |
190 | 190 | ||
@@ -365,26 +365,10 @@ nv50_display_init(struct drm_device *dev) | |||
365 | NV50_PDISPLAY_INTR_EN_CLK_UNK40)); | 365 | NV50_PDISPLAY_INTR_EN_CLK_UNK40)); |
366 | 366 | ||
367 | /* enable hotplug interrupts */ | 367 | /* enable hotplug interrupts */ |
368 | hpd_en[0] = hpd_en[1] = 0; | ||
369 | list_for_each_entry(connector, &dev->mode_config.connector_list, head) { | 368 | list_for_each_entry(connector, &dev->mode_config.connector_list, head) { |
370 | struct nouveau_connector *conn = nouveau_connector(connector); | 369 | struct nouveau_connector *conn = nouveau_connector(connector); |
371 | struct dcb_gpio_entry *gpio; | ||
372 | |||
373 | if (conn->dcb->gpio_tag == 0xff) | ||
374 | continue; | ||
375 | |||
376 | gpio = nouveau_bios_gpio_entry(dev, conn->dcb->gpio_tag); | ||
377 | if (!gpio) | ||
378 | continue; | ||
379 | 370 | ||
380 | hpd_en[gpio->line >> 4] |= (0x00010001 << (gpio->line & 0xf)); | 371 | nv50_gpio_irq_enable(dev, conn->dcb->gpio_tag, true); |
381 | } | ||
382 | |||
383 | nv_wr32(dev, 0xe054, 0xffffffff); | ||
384 | nv_wr32(dev, 0xe050, hpd_en[0]); | ||
385 | if (dev_priv->chipset >= 0x90) { | ||
386 | nv_wr32(dev, 0xe074, 0xffffffff); | ||
387 | nv_wr32(dev, 0xe070, hpd_en[1]); | ||
388 | } | 372 | } |
389 | 373 | ||
390 | return 0; | 374 | return 0; |