diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-09-23 02:37:39 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-09-24 02:28:50 -0400 |
commit | 80dad869a3bc30b4e6c3ae527f94abbe9bb497f5 (patch) | |
tree | 8ffd4a39b1b6b7314a8fb5fc450deccf12037325 /drivers/gpu/drm/nouveau | |
parent | 9bb5863ab4c2bad487e9d02fabde60e858c22411 (diff) |
drm/nouveau: fix panels using straps-based mode detection
nouveau_bios_fp_mode() zeroes the mode struct before filling in relevant
entries. This nukes the mode id initialised by drm_mode_create(), and
causes warnings from idr when we try to remove the mode.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_connector.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index 98c214c3492..4b286a8c30c 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c | |||
@@ -594,8 +594,10 @@ nouveau_connector_get_modes(struct drm_connector *connector) | |||
594 | if (nv_encoder->dcb->type == OUTPUT_LVDS && | 594 | if (nv_encoder->dcb->type == OUTPUT_LVDS && |
595 | (nv_encoder->dcb->lvdsconf.use_straps_for_mode || | 595 | (nv_encoder->dcb->lvdsconf.use_straps_for_mode || |
596 | dev_priv->vbios.fp_no_ddc) && nouveau_bios_fp_mode(dev, NULL)) { | 596 | dev_priv->vbios.fp_no_ddc) && nouveau_bios_fp_mode(dev, NULL)) { |
597 | nv_connector->native_mode = drm_mode_create(dev); | 597 | struct drm_display_mode mode; |
598 | nouveau_bios_fp_mode(dev, nv_connector->native_mode); | 598 | |
599 | nouveau_bios_fp_mode(dev, &mode); | ||
600 | nv_connector->native_mode = drm_mode_duplicate(dev, &mode); | ||
599 | } | 601 | } |
600 | 602 | ||
601 | /* Find the native mode if this is a digital panel, if we didn't | 603 | /* Find the native mode if this is a digital panel, if we didn't |