diff options
author | Keith Packard <keithp@neko.keithp.com> | 2007-07-09 21:29:55 -0700 |
---|---|---|
committer | Keith Packard <keithp@neko.keithp.com> | 2007-07-13 13:39:36 -0700 |
commit | 6f18300aed1340348c6d395f326061b5315be643 (patch) | |
tree | d66e1598f709c7359fefcba8c3b1532814742f77 /src/i830_display.c | |
parent | 04130ac6b705aa49161fb6dae83ad0bdd76e89d9 (diff) |
Eliminate bogus (and harmful) blanking adjustment for load detect.
Instead of always adding blanking to mode lines, use the FORCE_BORDER option
on i9xx hardware where it works, and dynamically add a bit of border if
necessary on i8xx hardware to make load detection work. This may cause
flashing when a usable crtc is not otherwise idle when load detection is
requested.
Diffstat (limited to 'src/i830_display.c')
-rw-r--r-- | src/i830_display.c | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/src/i830_display.c b/src/i830_display.c index f3b5c50a..ff25b297 100644 --- a/src/i830_display.c +++ b/src/i830_display.c @@ -1169,13 +1169,6 @@ i830_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode, OUTREG(vtot_reg, (adjusted_mode->CrtcVDisplay - 1) | ((adjusted_mode->CrtcVTotal - 1) << 16)); - /* - * Give us some border at the bottom for load detection - */ - adjusted_mode->CrtcVBlankStart = adjusted_mode->CrtcVSyncStart; - if (adjusted_mode->CrtcVBlankEnd - adjusted_mode->CrtcVBlankStart < 3) - adjusted_mode->CrtcVBlankStart = adjusted_mode->CrtcVBlankEnd - 3; - OUTREG(vblank_reg, (adjusted_mode->CrtcVBlankStart - 1) | ((adjusted_mode->CrtcVBlankEnd - 1) << 16)); OUTREG(vsync_reg, (adjusted_mode->CrtcVSyncStart - 1) | @@ -1437,25 +1430,36 @@ i830GetLoadDetectPipe(xf86OutputPtr output) ScrnInfoPtr pScrn = output->scrn; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); I830OutputPrivatePtr intel_output = output->driver_private; - xf86CrtcPtr crtc; + xf86CrtcPtr supported_crtc =NULL; + xf86CrtcPtr detect_crtc = NULL; int i; if (output->crtc) return output->crtc; for (i = 0; i < xf86_config->num_crtc; i++) - if (output->possible_crtcs & (1 << i)) + { + xf86CrtcPtr crtc; + if (!(output->possible_crtcs & (1 << i))) + continue; + crtc = xf86_config->crtc[i]; + if (!crtc->enabled) + { + detect_crtc = crtc; break; - - if (i == xf86_config->num_crtc) + } + if (!supported_crtc) + supported_crtc = crtc; + } + if (!detect_crtc) + detect_crtc = supported_crtc; + if (!detect_crtc) return NULL; - crtc = xf86_config->crtc[i]; - - output->crtc = crtc; + output->crtc = detect_crtc; intel_output->load_detect_temp = TRUE; - return crtc; + return detect_crtc; } void |