Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205103
b: refs/heads/master
c: b01f060
h: refs/heads/master
i:
  205101: d74d620
  205099: 820324c
  205095: 1c346c9
  205087: 4ce8679
v: v3
  • Loading branch information
Ben Skeggs committed Jul 26, 2010
1 parent 171b23a commit f2a103a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d0875edd9374296af8702d850254809e34a809cd
refs/heads/master: b01f06085e62c36659a5b6bde359ed1d98da91d7
15 changes: 15 additions & 0 deletions trunk/drivers/gpu/drm/nouveau/nouveau_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
*/

#include "drmP.h"

#include "nouveau_drv.h"
#include "nouveau_i2c.h"
#include "nouveau_connector.h"
#include "nouveau_encoder.h"

static int
Expand Down Expand Up @@ -271,6 +273,7 @@ nouveau_dp_link_train(struct drm_encoder *encoder)
{
struct drm_device *dev = encoder->dev;
struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
struct nouveau_connector *nv_connector;
struct bit_displayport_encoder_table *dpe;
int dpe_headerlen;
uint8_t config[4], status[3];
Expand All @@ -279,12 +282,21 @@ nouveau_dp_link_train(struct drm_encoder *encoder)

NV_DEBUG_KMS(dev, "link training!!\n");

nv_connector = nouveau_encoder_connector_get(nv_encoder);
if (!nv_connector)
return false;

dpe = nouveau_bios_dp_table(dev, nv_encoder->dcb, &dpe_headerlen);
if (!dpe) {
NV_ERROR(dev, "SOR-%d: no DP encoder table!\n", nv_encoder->or);
return false;
}

/* disable hotplug detect, this flips around on some panels during
* link training.
*/
nv50_gpio_irq_enable(dev, nv_connector->dcb->gpio_tag, false);

if (dpe->script0) {
NV_DEBUG_KMS(dev, "SOR-%d: running DP script 0\n", nv_encoder->or);
nouveau_bios_run_init_table(dev, le16_to_cpu(dpe->script0),
Expand Down Expand Up @@ -423,6 +435,9 @@ nouveau_dp_link_train(struct drm_encoder *encoder)
nv_encoder->dcb);
}

/* re-enable hotplug detect */
nv50_gpio_irq_enable(dev, nv_connector->dcb->gpio_tag, true);

return eq_done;
}

Expand Down

0 comments on commit f2a103a

Please sign in to comment.