mirror of https://gitee.com/openkylin/linux.git
drm/nouveau: Put the dithering check back in nouveau_connector_create.
a7b9f9e5adef dropped it by accident. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Tested-by: Thibaut Girka <thib@sitedethib.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
7a2e4e03b7
commit
2fa67f12e7
|
@ -737,7 +737,7 @@ nouveau_connector_create(struct drm_device *dev,
|
||||||
struct nouveau_connector *nv_connector = NULL;
|
struct nouveau_connector *nv_connector = NULL;
|
||||||
struct drm_connector *connector;
|
struct drm_connector *connector;
|
||||||
struct drm_encoder *encoder;
|
struct drm_encoder *encoder;
|
||||||
int type;
|
int type, ret = 0;
|
||||||
|
|
||||||
NV_DEBUG_KMS(dev, "\n");
|
NV_DEBUG_KMS(dev, "\n");
|
||||||
|
|
||||||
|
@ -813,9 +813,21 @@ nouveau_connector_create(struct drm_device *dev,
|
||||||
|
|
||||||
if (!connector->encoder_ids[0]) {
|
if (!connector->encoder_ids[0]) {
|
||||||
NV_WARN(dev, " no encoders, ignoring\n");
|
NV_WARN(dev, " no encoders, ignoring\n");
|
||||||
drm_connector_cleanup(connector);
|
goto fail;
|
||||||
kfree(connector);
|
}
|
||||||
return 0;
|
|
||||||
|
/* 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 */
|
/* Init DVI-I specific properties */
|
||||||
|
@ -865,4 +877,10 @@ nouveau_connector_create(struct drm_device *dev,
|
||||||
|
|
||||||
drm_sysfs_connector_add(connector);
|
drm_sysfs_connector_add(connector);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
fail:
|
||||||
|
drm_connector_cleanup(connector);
|
||||||
|
kfree(connector);
|
||||||
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue