Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 179891
b: refs/heads/master
c: c8ebe27
h: refs/heads/master
i:
  179889: 8005ef5
  179887: 2bb8fc1
v: v3
  • Loading branch information
Xavier Chantry authored and Ben Skeggs committed Jan 14, 2010
1 parent 739a8bc commit f4cdcdf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3d9aefb8bd1be2b5e07acf0f938c21769f03cc64
refs/heads/master: c8ebe275790f2c5efc3ffec515c93b7a139829d3
17 changes: 13 additions & 4 deletions trunk/drivers/gpu/drm/nouveau/nouveau_connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,16 @@ nouveau_encoder_connector_get(struct nouveau_encoder *encoder)
static void
nouveau_connector_destroy(struct drm_connector *drm_connector)
{
struct nouveau_connector *connector = nouveau_connector(drm_connector);
struct drm_device *dev = connector->base.dev;
struct nouveau_connector *nv_connector =
nouveau_connector(drm_connector);
struct drm_device *dev = nv_connector->base.dev;

NV_DEBUG_KMS(dev, "\n");

if (!connector)
if (!nv_connector)
return;

kfree(nv_connector->edid);
drm_sysfs_connector_remove(drm_connector);
drm_connector_cleanup(drm_connector);
kfree(drm_connector);
Expand Down Expand Up @@ -237,6 +239,9 @@ nouveau_connector_detect(struct drm_connector *connector)
return connector_status_connected;
}

kfree(nv_connector->edid);
nv_connector->edid = NULL;

i2c = nouveau_connector_ddc_detect(connector, &nv_encoder);
if (i2c) {
nouveau_connector_ddc_prepare(connector, &flags);
Expand Down Expand Up @@ -687,8 +692,12 @@ nouveau_connector_create_lvds(struct drm_device *dev,
*/
if (!nv_connector->edid && !nv_connector->native_mode &&
!dev_priv->VBIOS.pub.fp_no_ddc) {
nv_connector->edid =
struct edid *edid =
(struct edid *)nouveau_bios_embedded_edid(dev);
if (edid) {
nv_connector->edid = kmalloc(EDID_LENGTH, GFP_KERNEL);
*(nv_connector->edid) = *edid;
}
}

if (!nv_connector->edid)
Expand Down

0 comments on commit f4cdcdf

Please sign in to comment.