diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-07-23 11:39:03 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-07-26 11:43:06 +1000 |
commit | b01f06085e62c36659a5b6bde359ed1d98da91d7 (patch) | |
tree | 129f8e5dfc73d5fe7cbd281cafc6ebac3f628d93 /drivers/gpu/drm/nouveau | |
parent | d0875edd9374296af8702d850254809e34a809cd (diff) |
drm/nouveau: disable hotplug detect around DP link training
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_dp.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_dp.c b/drivers/gpu/drm/nouveau/nouveau_dp.c index 184bc9570b1..64b43958e58 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dp.c +++ b/drivers/gpu/drm/nouveau/nouveau_dp.c @@ -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 @@ -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]; @@ -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), @@ -423,6 +435,9 @@ stop: nv_encoder->dcb); } + /* re-enable hotplug detect */ + nv50_gpio_irq_enable(dev, nv_connector->dcb->gpio_tag, true); + return eq_done; } |