diff options
author | Francisco Jerez <currojerez@riseup.net> | 2010-06-16 09:52:44 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-07-12 20:13:03 -0400 |
commit | 2fa67f12e71d7f8adade7c4e6bb839156dea2365 (patch) | |
tree | b0b51c57c4f5f2f363ed7f4113fa9091dcffbab3 /drivers | |
parent | 7a2e4e03b77b929b10f3007395128a9870090653 (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_connector.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index a8c44c9eedf6..79190206b398 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c | |||
@@ -737,7 +737,7 @@ nouveau_connector_create(struct drm_device *dev, | |||
737 | struct nouveau_connector *nv_connector = NULL; | 737 | struct nouveau_connector *nv_connector = NULL; |
738 | struct drm_connector *connector; | 738 | struct drm_connector *connector; |
739 | struct drm_encoder *encoder; | 739 | struct drm_encoder *encoder; |
740 | int type; | 740 | int type, ret = 0; |
741 | 741 | ||
742 | NV_DEBUG_KMS(dev, "\n"); | 742 | NV_DEBUG_KMS(dev, "\n"); |
743 | 743 | ||
@@ -813,9 +813,21 @@ nouveau_connector_create(struct drm_device *dev, | |||
813 | 813 | ||
814 | if (!connector->encoder_ids[0]) { | 814 | if (!connector->encoder_ids[0]) { |
815 | NV_WARN(dev, " no encoders, ignoring\n"); | 815 | NV_WARN(dev, " no encoders, ignoring\n"); |
816 | drm_connector_cleanup(connector); | 816 | goto fail; |
817 | kfree(connector); | 817 | } |
818 | return 0; | 818 | |
819 | /* Check if we need dithering enabled */ | ||
820 | if (dcb->type == DCB_CONNECTOR_LVDS) { | ||
821 | bool dummy, is_24bit = false; | ||
822 | |||
823 | ret = nouveau_bios_parse_lvds_table(dev, 0, &dummy, &is_24bit); | ||
824 | if (ret) { | ||
825 | NV_ERROR(dev, "Error parsing LVDS table, disabling " | ||
826 | "LVDS\n"); | ||
827 | goto fail; | ||
828 | } | ||
829 | |||
830 | nv_connector->use_dithering = !is_24bit; | ||
819 | } | 831 | } |
820 | 832 | ||
821 | /* Init DVI-I specific properties */ | 833 | /* Init DVI-I specific properties */ |
@@ -865,4 +877,10 @@ nouveau_connector_create(struct drm_device *dev, | |||
865 | 877 | ||
866 | drm_sysfs_connector_add(connector); | 878 | drm_sysfs_connector_add(connector); |
867 | return 0; | 879 | return 0; |
880 | |||
881 | fail: | ||
882 | drm_connector_cleanup(connector); | ||
883 | kfree(connector); | ||
884 | return ret; | ||
885 | |||
868 | } | 886 | } |