alistair23-linux/drivers/gpu/drm/i915
Daniel Vetter ca9bfa7eed drm/i915: fixup interlaced vertical timings confusion, part 1
We have a pretty decent confusion about vertical timings of interlaced
modes. Peter Ross has written a patch that makes interlace modes work
on a lot more platforms/output combinations by doubling the vertical
timings.

The issue with that patch is that core drm _does_ support specifying
whether we want these vertical timings in fields or frames, we just
haven't managed to consistently use this facility. The relavant
function is drm_mode_set_crtcinfo, which fills in the crtc timing
information.

The first thing to note is that the drm core keeps interlaced modes in
frames, but displays modelines in fields. So when the crtc modeset
helper copies over the mode into adjusted_mode it will already contain
vertical timings in half-frames. The result is that the fixup code in
intel_crtc_mode_fixup doesn't actually do anything (in most cases at
least).

Now gen3+ natively supports interlaced modes and wants the vertical
timings in frames. Which is what sdvo already fixes up, at least under
some conditions.

There are a few other place that demand vertical timings in fields
but never actually deal with interlaced modes, so use frame timings
for consistency, too. These are:
- lvds panel,
- dvo encoders - dvo is the only way gen2 could support interlaced
  mode, but currently we don't support any encoders that do.
- tv out - despite that the tv dac sends out an interlaced signal it
  expects a progressive mode pipe configuration.
All these encoders enforce progressive modes by resetting
interlace_allowed.

Hence we always want crtc vertical timings in frames. Enforce this in
our crtc mode_fixup function and rip out any redudant timing
computations from the encoders' mode_fixup function.

v2-4: Adjust the vertical timings a bit.

v5: Split out the 'subtract-one for interlaced' fixes.

v6: Clarify issues around tv-out and gen2.

Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Tested-by: Christopher Egert <cme3000@gmail.com>
Tested-by: Alfonso Fiore <alfonso.fiore@gmail.com>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-10 17:24:06 +01:00
..
dvo.h
dvo_ch7xxx.c
dvo_ch7017.c
dvo_ivch.c
dvo_sil164.c
dvo_tfp410.c
i915_debugfs.c Merge remote-tracking branch 'airlied/drm-fixes' into drm-intel-next-queued 2012-02-10 17:14:49 +01:00
i915_dma.c Merge remote-tracking branch 'airlied/drm-fixes' into drm-intel-next-queued 2012-02-10 17:14:49 +01:00
i915_drv.c Merge remote-tracking branch 'airlied/drm-fixes' into drm-intel-next-queued 2012-02-10 17:14:49 +01:00
i915_drv.h Merge remote-tracking branch 'airlied/drm-fixes' into drm-intel-next-queued 2012-02-10 17:14:49 +01:00
i915_gem.c drm/i915: enable ppgtt 2012-02-09 21:49:30 +01:00
i915_gem_debug.c
i915_gem_evict.c drm/i915: argument to control retiring behavior 2012-01-26 11:19:19 +01:00
i915_gem_execbuffer.c Merge remote-tracking branch 'airlied/drm-fixes' into drm-intel-next-queued 2012-02-10 17:14:49 +01:00
i915_gem_gtt.c drm/i915: ppgtt binding/unbinding support 2012-02-09 21:25:23 +01:00
i915_gem_tiling.c drm/i915: swizzling support for snb/ivb 2012-02-08 23:16:24 +01:00
i915_ioc32.c
i915_irq.c Merge remote-tracking branch 'airlied/drm-fixes' into drm-intel-next-queued 2012-02-10 17:14:49 +01:00
i915_reg.h drm/i915: clean up interlaced pipeconf bit definitions 2012-02-10 17:21:49 +01:00
i915_suspend.c drm/i915: Re-enable gen7 RC6 and GPU turbo after resume. 2012-01-24 13:25:10 -08:00
i915_trace.h
i915_trace_points.c
intel_acpi.c drm/i915: Silence _DSM errors 2012-01-16 21:08:19 +01:00
intel_bios.c drm/i915: Use kcalloc instead of kzalloc to allocate array 2012-01-17 17:33:24 +01:00
intel_bios.h drm/i915: VBT Parser cleanup for eDP block 2012-01-13 08:37:44 -08:00
intel_crt.c CHROMIUM: i915: Add DMI override to skip CRT initialization on ZGB 2012-01-12 12:30:25 -08:00
intel_display.c drm/i915: fixup interlaced vertical timings confusion, part 1 2012-02-10 17:24:06 +01:00
intel_dp.c Merge remote-tracking branch 'airlied/drm-fixes' into drm-intel-next-queued 2012-02-10 17:14:49 +01:00
intel_drv.h drm/i915: Separate fence pin counting from normal bind pin counting 2012-01-29 18:23:37 +01:00
intel_dvo.c drm/i915: fixup interlaced vertical timings confusion, part 1 2012-02-10 17:24:06 +01:00
intel_fb.c drm/i915: add SNB and IVB video sprite support v6 2012-01-03 09:31:09 -08:00
intel_hdmi.c drm/i915: HDMI hot remove notification to audio driver 2011-12-19 19:15:48 -08:00
intel_i2c.c gpu: Add export.h as required to drivers/gpu files. 2011-10-31 19:32:03 -04:00
intel_lvds.c drm/i915: no lvds quirk for AOpen MP45 2012-02-08 09:20:49 -08:00
intel_modes.c
intel_opregion.c
intel_overlay.c drm/i915: fixup interlaced vertical timings confusion, part 1 2012-02-10 17:24:06 +01:00
intel_panel.c drm/i915: fixup interlaced vertical timings confusion, part 1 2012-02-10 17:24:06 +01:00
intel_ringbuffer.c Merge remote-tracking branch 'airlied/drm-fixes' into drm-intel-next-queued 2012-02-10 17:14:49 +01:00
intel_ringbuffer.h drm/i915: switch ring->id to be a real id 2012-01-29 17:32:58 +01:00
intel_sdvo.c drm/i915: fixup interlaced vertical timings confusion, part 1 2012-02-10 17:24:06 +01:00
intel_sdvo_regs.h misc latin1 to utf8 conversions 2012-01-02 13:04:55 +01:00
intel_sprite.c Merge remote-tracking branch 'airlied/drm-fixes' into drm-intel-next-queued 2012-02-10 17:14:49 +01:00
intel_tv.c drm/i915: fixup interlaced vertical timings confusion, part 1 2012-02-10 17:24:06 +01:00
Makefile drm/i915: kill i915_mem.c 2012-01-17 20:01:01 +01:00