Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205043
b: refs/heads/master
c: 2fa67f1
h: refs/heads/master
i:
  205041: ffb19e9
  205039: 4faca39
v: v3
  • Loading branch information
Francisco Jerez authored and Ben Skeggs committed Jul 13, 2010
1 parent 9724b2b commit 429a6f8
Show file tree
Hide file tree
Showing 2 changed files with 23 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: 7a2e4e03b77b929b10f3007395128a9870090653
refs/heads/master: 2fa67f12e71d7f8adade7c4e6bb839156dea2365
26 changes: 22 additions & 4 deletions trunk/drivers/gpu/drm/nouveau/nouveau_connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ nouveau_connector_create(struct drm_device *dev,
struct nouveau_connector *nv_connector = NULL;
struct drm_connector *connector;
struct drm_encoder *encoder;
int type;
int type, ret = 0;

NV_DEBUG_KMS(dev, "\n");

Expand Down Expand Up @@ -813,9 +813,21 @@ nouveau_connector_create(struct drm_device *dev,

if (!connector->encoder_ids[0]) {
NV_WARN(dev, " no encoders, ignoring\n");
drm_connector_cleanup(connector);
kfree(connector);
return 0;
goto fail;
}

/* Check if we need dithering enabled */
if (dcb->type == DCB_CONNECTOR_LVDS) {
bool dummy, is_24bit = false;

ret = nouveau_bios_parse_lvds_table(dev, 0, &dummy, &is_24bit);
if (ret) {
NV_ERROR(dev, "Error parsing LVDS table, disabling "
"LVDS\n");
goto fail;
}

nv_connector->use_dithering = !is_24bit;
}

/* Init DVI-I specific properties */
Expand Down Expand Up @@ -865,4 +877,10 @@ nouveau_connector_create(struct drm_device *dev,

drm_sysfs_connector_add(connector);
return 0;

fail:
drm_connector_cleanup(connector);
kfree(connector);
return ret;

}

0 comments on commit 429a6f8

Please sign in to comment.