drm/nouveau: Unset the EDID connector property when the EDID block goes away.
authorFrancisco Jerez <currojerez@riseup.net>
Thu, 14 Jan 2010 14:54:23 +0000 (15:54 +0100)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 14 Jan 2010 23:29:35 +0000 (09:29 +1000)
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_connector.c

index 3dc7e09..8da3528 100644 (file)
@@ -239,8 +239,12 @@ nouveau_connector_detect(struct drm_connector *connector)
                return connector_status_connected;
        }
 
-       kfree(nv_connector->edid);
-       nv_connector->edid = NULL;
+       /* Cleanup the previous EDID block. */
+       if (nv_connector->edid) {
+               drm_mode_connector_update_edid_property(connector, NULL);
+               kfree(nv_connector->edid);
+               nv_connector->edid = NULL;
+       }
 
        i2c = nouveau_connector_ddc_detect(connector, &nv_encoder);
        if (i2c) {