~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/gpu/drm/nouveau/nouveau_connector.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
                                      nouveau_connector_hotplug, connector);
117
117
        }
118
118
 
 
119
        if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS ||
 
120
            connector->connector_type == DRM_MODE_CONNECTOR_eDP)
 
121
                nouveau_backlight_exit(connector);
 
122
 
119
123
        kfree(nv_connector->edid);
120
124
        drm_sysfs_connector_remove(connector);
121
125
        drm_connector_cleanup(connector);
438
442
                }
439
443
 
440
444
                /* LVDS always needs gpu scaling */
441
 
                if (nv_connector->dcb->type == DCB_CONNECTOR_LVDS &&
 
445
                if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS &&
442
446
                    value == DRM_MODE_SCALE_NONE)
443
447
                        return -EINVAL;
444
448
 
646
650
                ret = get_slave_funcs(encoder)->get_modes(encoder, connector);
647
651
 
648
652
        if (nv_connector->dcb->type == DCB_CONNECTOR_LVDS ||
 
653
            nv_connector->dcb->type == DCB_CONNECTOR_LVDS_SPWG ||
649
654
            nv_connector->dcb->type == DCB_CONNECTOR_eDP)
650
655
                ret += nouveau_connector_scaler_modes_add(connector);
651
656
 
806
811
                type = DRM_MODE_CONNECTOR_HDMIA;
807
812
                break;
808
813
        case DCB_CONNECTOR_LVDS:
 
814
        case DCB_CONNECTOR_LVDS_SPWG:
809
815
                type = DRM_MODE_CONNECTOR_LVDS;
810
816
                funcs = &nouveau_connector_funcs_lvds;
811
817
                break;
834
840
        drm_connector_helper_add(connector, &nouveau_connector_helper_funcs);
835
841
 
836
842
        /* Check if we need dithering enabled */
837
 
        if (dcb->type == DCB_CONNECTOR_LVDS) {
 
843
        if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS) {
838
844
                bool dummy, is_24bit = false;
839
845
 
840
846
                ret = nouveau_bios_parse_lvds_table(dev, 0, &dummy, &is_24bit);
879
885
                                nv_connector->use_dithering ?
880
886
                                DRM_MODE_DITHERING_ON : DRM_MODE_DITHERING_OFF);
881
887
 
882
 
                if (dcb->type != DCB_CONNECTOR_LVDS) {
 
888
                if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS) {
883
889
                        if (dev_priv->card_type >= NV_50)
884
890
                                connector->polled = DRM_CONNECTOR_POLL_HPD;
885
891
                        else
894
900
        }
895
901
 
896
902
        drm_sysfs_connector_add(connector);
 
903
 
 
904
        if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS ||
 
905
            connector->connector_type == DRM_MODE_CONNECTOR_eDP)
 
906
                nouveau_backlight_init(connector);
 
907
 
897
908
        dcb->drm = connector;
898
909
        return dcb->drm;
899
910