diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-07-22 21:39:03 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-07-25 21:43:06 -0400 |
commit | b01f06085e62c36659a5b6bde359ed1d98da91d7 (patch) | |
tree | 129f8e5dfc73d5fe7cbd281cafc6ebac3f628d93 /drivers | |
parent | d0875edd9374296af8702d850254809e34a809cd (diff) |
drm/nouveau: disable hotplug detect around DP link training
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers')
-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 184bc9570b1c..64b43958e582 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dp.c +++ b/drivers/gpu/drm/nouveau/nouveau_dp.c | |||
@@ -23,8 +23,10 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "drmP.h" | 25 | #include "drmP.h" |
26 | |||
26 | #include "nouveau_drv.h" | 27 | #include "nouveau_drv.h" |
27 | #include "nouveau_i2c.h" | 28 | #include "nouveau_i2c.h" |
29 | #include "nouveau_connector.h" | ||
28 | #include "nouveau_encoder.h" | 30 | #include "nouveau_encoder.h" |
29 | 31 | ||
30 | static int | 32 | static int |
@@ -271,6 +273,7 @@ nouveau_dp_link_train(struct drm_encoder *encoder) | |||
271 | { | 273 | { |
272 | struct drm_device *dev = encoder->dev; | 274 | struct drm_device *dev = encoder->dev; |
273 | struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); | 275 | struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); |
276 | struct nouveau_connector *nv_connector; | ||
274 | struct bit_displayport_encoder_table *dpe; | 277 | struct bit_displayport_encoder_table *dpe; |
275 | int dpe_headerlen; | 278 | int dpe_headerlen; |
276 | uint8_t config[4], status[3]; | 279 | uint8_t config[4], status[3]; |
@@ -279,12 +282,21 @@ nouveau_dp_link_train(struct drm_encoder *encoder) | |||
279 | 282 | ||
280 | NV_DEBUG_KMS(dev, "link training!!\n"); | 283 | NV_DEBUG_KMS(dev, "link training!!\n"); |
281 | 284 | ||
285 | nv_connector = nouveau_encoder_connector_get(nv_encoder); | ||
286 | if (!nv_connector) | ||
287 | return false; | ||
288 | |||
282 | dpe = nouveau_bios_dp_table(dev, nv_encoder->dcb, &dpe_headerlen); | 289 | dpe = nouveau_bios_dp_table(dev, nv_encoder->dcb, &dpe_headerlen); |
283 | if (!dpe) { | 290 | if (!dpe) { |
284 | NV_ERROR(dev, "SOR-%d: no DP encoder table!\n", nv_encoder->or); | 291 | NV_ERROR(dev, "SOR-%d: no DP encoder table!\n", nv_encoder->or); |
285 | return false; | 292 | return false; |
286 | } | 293 | } |
287 | 294 | ||
295 | /* disable hotplug detect, this flips around on some panels during | ||
296 | * link training. | ||
297 | */ | ||
298 | nv50_gpio_irq_enable(dev, nv_connector->dcb->gpio_tag, false); | ||
299 | |||
288 | if (dpe->script0) { | 300 | if (dpe->script0) { |
289 | NV_DEBUG_KMS(dev, "SOR-%d: running DP script 0\n", nv_encoder->or); | 301 | NV_DEBUG_KMS(dev, "SOR-%d: running DP script 0\n", nv_encoder->or); |
290 | nouveau_bios_run_init_table(dev, le16_to_cpu(dpe->script0), | 302 | nouveau_bios_run_init_table(dev, le16_to_cpu(dpe->script0), |
@@ -423,6 +435,9 @@ stop: | |||
423 | nv_encoder->dcb); | 435 | nv_encoder->dcb); |
424 | } | 436 | } |
425 | 437 | ||
438 | /* re-enable hotplug detect */ | ||
439 | nv50_gpio_irq_enable(dev, nv_connector->dcb->gpio_tag, true); | ||
440 | |||
426 | return eq_done; | 441 | return eq_done; |
427 | } | 442 | } |
428 | 443 | ||