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

« back to all changes in this revision

Viewing changes to drivers/gpu/drm/i915/intel_tv.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:
1006
1006
        const struct video_levels *video_levels;
1007
1007
        const struct color_conversion *color_conversion;
1008
1008
        bool burst_ena;
 
1009
        int pipe = intel_crtc->pipe;
1009
1010
 
1010
1011
        if (!tv_mode)
1011
1012
                return; /* can't happen (mode_prepare prevents this) */
1149
1150
                           ((video_levels->black << TV_BLACK_LEVEL_SHIFT) |
1150
1151
                            (video_levels->blank << TV_BLANK_LEVEL_SHIFT)));
1151
1152
        {
1152
 
                int pipeconf_reg = (intel_crtc->pipe == 0) ?
1153
 
                        PIPEACONF : PIPEBCONF;
1154
 
                int dspcntr_reg = (intel_crtc->plane == 0) ?
1155
 
                        DSPACNTR : DSPBCNTR;
 
1153
                int pipeconf_reg = PIPECONF(pipe);
 
1154
                int dspcntr_reg = DSPCNTR(intel_crtc->plane);
1156
1155
                int pipeconf = I915_READ(pipeconf_reg);
1157
1156
                int dspcntr = I915_READ(dspcntr_reg);
1158
 
                int dspbase_reg = (intel_crtc->plane == 0) ?
1159
 
                        DSPAADDR : DSPBADDR;
 
1157
                int dspbase_reg = DSPADDR(intel_crtc->plane);
1160
1158
                int xpos = 0x0, ypos = 0x0;
1161
1159
                unsigned int xsize, ysize;
1162
1160
                /* Pipe must be off here */
1363
1361
        if (intel_tv->base.base.crtc && intel_tv->base.base.crtc->enabled) {
1364
1362
                type = intel_tv_detect_type(intel_tv, connector);
1365
1363
        } else if (force) {
1366
 
                struct drm_crtc *crtc;
1367
 
                int dpms_mode;
 
1364
                struct intel_load_detect_pipe tmp;
1368
1365
 
1369
 
                crtc = intel_get_load_detect_pipe(&intel_tv->base, connector,
1370
 
                                                  &mode, &dpms_mode);
1371
 
                if (crtc) {
 
1366
                if (intel_get_load_detect_pipe(&intel_tv->base, connector,
 
1367
                                               &mode, &tmp)) {
1372
1368
                        type = intel_tv_detect_type(intel_tv, connector);
1373
 
                        intel_release_load_detect_pipe(&intel_tv->base, connector,
1374
 
                                                       dpms_mode);
 
1369
                        intel_release_load_detect_pipe(&intel_tv->base,
 
1370
                                                       connector,
 
1371
                                                       &tmp);
1375
1372
                } else
1376
1373
                        return connector_status_unknown;
1377
1374
        } else
1380
1377
        if (type < 0)
1381
1378
                return connector_status_disconnected;
1382
1379
 
 
1380
        intel_tv->type = type;
1383
1381
        intel_tv_find_better_format(connector);
 
1382
 
1384
1383
        return connector_status_connected;
1385
1384
}
1386
1385
 
1672
1671
         *
1673
1672
         * More recent chipsets favour HDMI rather than integrated S-Video.
1674
1673
         */
1675
 
        connector->polled =
1676
 
                DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT;
 
1674
        connector->polled = DRM_CONNECTOR_POLL_CONNECT;
1677
1675
 
1678
1676
        drm_connector_init(dev, connector, &intel_tv_connector_funcs,
1679
1677
                           DRM_MODE_CONNECTOR_SVIDEO);