diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-09-23 08:44:01 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-09-24 02:05:28 +0200 |
commit | a5d60827a6bf9e7345f9e50423c1673ec4e14568 (patch) | |
tree | 68a1005b810a5fd26e5290d20c57a2c89e2f88c2 /drivers | |
parent | drm/ttm: Clear the ghost cpu_writers flag on ttm_buffer_object_transfer. (diff) | |
download | linux-a5d60827a6bf9e7345f9e50423c1673ec4e14568.tar.xz linux-a5d60827a6bf9e7345f9e50423c1673ec4e14568.zip |
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>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-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 87186a4bbf03..fc737037f751 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c @@ -558,8 +558,10 @@ nouveau_connector_get_modes(struct drm_connector *connector) if (nv_encoder->dcb->type == OUTPUT_LVDS && (nv_encoder->dcb->lvdsconf.use_straps_for_mode || dev_priv->vbios.fp_no_ddc) && nouveau_bios_fp_mode(dev, NULL)) { - nv_connector->native_mode = drm_mode_create(dev); - nouveau_bios_fp_mode(dev, nv_connector->native_mode); + struct drm_display_mode mode; + + nouveau_bios_fp_mode(dev, &mode); + nv_connector->native_mode = drm_mode_duplicate(dev, &mode); } /* Find the native mode if this is a digital panel, if we didn't |