OpenCloudOS-Kernel/drivers/gpu/drm/i915
Imre Deak b7e634cc8d drm/i915: vlv: don't unmask IIR[DISPLAY_PIPE_A/B_VBLANK] interrupt
Bspec and the code suggests that the interrupt signaled by IIR[7,5]
(DISPLAY_PIPE_A/B_VBLANK) is a first level IRQ flag for the second
level PIPEA/BSTAT[2] (Start of Vertical Blank) interrupt. Measuring
the relative timings of when IIR[7] and PIPEASTAT[1,2] get set and
checking the effect of unmasking different pipestat and IIR events
shows that this isn't so:

First, ISR/IIR[7] gets set independently of PIPEASTAT[18] (Start of
Vertical Blank Enable) or any other pipestat enable bit, so it isn't
a first level IRQ bit showing the state of PIPEASTAT[2], but is
connected directly to the timing generator.

Second, setting only PIPEASTAT[18] and leaving all other pipestat events
disabled, IIR[6] (DISPLAY_PIPE_A_EVENT) gets set close to the moment when
PIPEASTAT[2] gets set, so the former is a first level interrupt flag for
the latter. The bspec is rather unclear about this, but I also assume
that IIR[6] signals all pipestat A events, except PIPEASTAT[31] (FIFO
Under-run Status).

Third, IIR[7] is set close to the moment when PIPEASTAT[1] (Framestart
Interrupt) gets set, in the mode I used about 12usec after PIPEASTAT[2]
and IIR[6] gets set. This means the IIR[7] isn't marking the start of
vblank, but rather signals the framestart event.

Based on the above, we don't need to unmask IIR[7] when waiting for
start of vblank events, but we can rely on IIR[6] being always unmasked,
which will signal when PIPEASTAT[2] gets set. Doing this will also get
rid of the overhead of getting an interrupt and servicing IIR[7], which
is atm raised always some time after IIR[6]/PIPEASTAT[2] is raised.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-05 17:02:07 +01:00
..
Kconfig i915, fbdev: Fix Kconfig typo 2013-11-21 21:59:02 +01:00
Makefile drm/i915: move module parameters into a struct, in a new file 2014-01-27 17:16:45 +01:00
dvo.h drm/i915: Remove unused mode_fixup() vfunc of struct intel_dvo_dev_ops 2013-09-05 21:39:59 +02:00
dvo_ch7xxx.c drm/i915: dvo_ch7xxx: fix vsync polarity setting 2013-07-25 16:10:22 +02:00
dvo_ch7017.c
dvo_ivch.c
dvo_ns2501.c drm/i915/ns2501: Rip out the reenable hack 2013-11-04 16:32:31 +01:00
dvo_sil164.c
dvo_tfp410.c
i915_debugfs.c drm/i915: Add debugfs hooks for messign with watermark latencies 2014-01-28 20:13:18 +01:00
i915_dma.c Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued 2014-01-30 12:56:51 +01:00
i915_drv.c drm/i915: Reorganize display pipe register accesses 2014-02-05 00:46:08 +01:00
i915_drv.h drm/i915: Reorganize display pipe register accesses 2014-02-05 00:46:08 +01:00
i915_gem.c drm/i915: Treat using a purged buffer as a source of EFAULT 2014-02-04 17:03:32 +01:00
i915_gem_context.c drm/i915: check for oom when allocating private_default_ctx 2014-02-04 12:10:26 +01:00
i915_gem_debug.c drm/i915: Fix #endif comment 2013-08-09 10:45:52 +02:00
i915_gem_dmabuf.c drm/i915: Pin pages whilst allocating for dma-buf vmap() 2013-11-29 15:51:20 +01:00
i915_gem_evict.c drm/i915: Kerneldoc for i915_gem_evict.c 2014-01-29 22:19:17 +01:00
i915_gem_execbuffer.c drm/i915: move module parameters into a struct, in a new file 2014-01-27 17:16:45 +01:00
i915_gem_gtt.c drm/i915: move module parameters into a struct, in a new file 2014-01-27 17:16:45 +01:00
i915_gem_stolen.c drm/i915: Fix the offset issue for the stolen GEM objects 2014-01-28 09:04:42 +01:00
i915_gem_tiling.c drm/i915: Make pin count per VMA 2013-12-18 15:27:49 +01:00
i915_gpu_error.c drm/i915: Don't access snooped pages through the GTT (even for error capture) 2014-01-30 17:25:39 +01:00
i915_ioc32.c
i915_irq.c drm/i915: vlv: don't unmask IIR[DISPLAY_PIPE_A/B_VBLANK] interrupt 2014-02-05 17:02:07 +01:00
i915_params.c drm/i915: drop i915_ prefix from enable_rc6, enable_fbc, enable_ppgtt parameters 2014-01-27 17:24:03 +01:00
i915_reg.h drm/i915: Reorganize display pipe register accesses 2014-02-05 00:46:08 +01:00
i915_suspend.c drm/i915: Kill most of the FBC register save/restore 2014-01-25 21:17:03 +01:00
i915_sysfs.c drm/i915: add some runtime PM get/put calls 2013-12-10 22:50:17 +01:00
i915_trace.h drm/i915: Add a tracepoint for using a semaphore 2013-10-01 07:45:24 +02:00
i915_trace_points.c
i915_ums.c drm/i915: Only restore backlight combination mode reg for ums 2014-01-24 17:22:45 +01:00
intel_acpi.c ACPI: Eliminate the DEVICE_ACPI_HANDLE() macro 2013-11-14 23:17:21 +01:00
intel_bios.c drm/i915: move module parameters into a struct, in a new file 2014-01-27 17:16:45 +01:00
intel_bios.h drm/i915: parse backlight modulation frequency from the BIOS VBT 2013-12-16 10:02:48 +01:00
intel_crt.c drm/i915: Shuffle modeset reset handling around 2014-01-24 17:22:52 +01:00
intel_ddi.c drm/i915: fix WRPLL clock calculation 2014-01-24 17:23:00 +01:00
intel_display.c Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued 2014-01-30 12:56:51 +01:00
intel_dp.c drm/i915: fix initial timestamps for PP sequencing logic 2014-01-29 20:46:05 +01:00
intel_drv.h drm/i915: debugfs: Add support for probing DP sink CRC. 2014-01-27 09:55:46 +01:00
intel_dsi.c drm/i915: Parametrize the dphy and other spec specific parameters 2013-12-11 23:52:20 +01:00
intel_dsi.h drm/i915: Parametrize the dphy and other spec specific parameters 2013-12-11 23:52:20 +01:00
intel_dsi_cmd.c drm/i915/dsi: s/size_t/int/ 2013-09-04 17:34:51 +02:00
intel_dsi_cmd.h drm/i915/dsi: s/size_t/int/ 2013-09-04 17:34:51 +02:00
intel_dsi_pll.c drm/i915: Try harder to get best m, n, p values with minimal error 2013-12-11 23:52:18 +01:00
intel_dvo.c drm/i915: Return a drm_mode_status enum in the mode_valid vfuncs 2013-11-28 16:49:33 +01:00
intel_fbdev.c Merge branch 'topic/ppgtt' into drm-intel-next-queued 2014-01-25 21:14:57 +01:00
intel_hdmi.c drm/i915: Reorganize display pipe register accesses 2014-02-05 00:46:08 +01:00
intel_i2c.c drm/i915/vlv: split CCK and DDR freq usage 2013-11-05 19:28:47 +01:00
intel_lvds.c drm/i915: move module parameters into a struct, in a new file 2014-01-27 17:16:45 +01:00
intel_modes.c drm/i915: Add "Automatic" mode for the "Broadcast RGB" property 2013-01-20 13:09:44 +01:00
intel_opregion.c drm/i915: Eliminate lots of WARNs when there's no backlight present 2014-01-22 10:34:38 +01:00
intel_overlay.c Merge branch 'topic/ppgtt' into drm-intel-next-queued 2014-01-25 21:14:57 +01:00
intel_panel.c drm/i915: move module parameters into a struct, in a new file 2014-01-27 17:16:45 +01:00
intel_pm.c drm/i915/vlv: WA to fix Voltage not getting dropped to Vmin when Gfx is power gated. 2014-02-04 11:59:19 +01:00
intel_ringbuffer.c Merge branch 'topic/ppgtt' into drm-intel-next-queued 2014-01-25 21:14:57 +01:00
intel_ringbuffer.h drm/i915: Use hangcheck score to find guilty context 2014-02-04 11:57:24 +01:00
intel_sdvo.c drm/i915: Don't cast away const from infoframe buffer 2013-12-10 14:49:04 +01:00
intel_sdvo_regs.h drm/i915: use __packed instead of __attribute__((packed)) 2013-12-03 18:19:49 +01:00
intel_sideband.c drm/i915: Use FLISDSI interface for band gap reset 2013-12-11 23:52:17 +01:00
intel_sprite.c drm/i915: Shuffle sprite register writes into a tighter group 2014-01-24 17:22:53 +01:00
intel_tv.c drm/i915/tv: add ->get_config callback 2013-11-18 22:24:33 +01:00
intel_uncore.c Merge branch 'topic/ppgtt' into drm-intel-next-queued 2014-01-25 21:14:57 +01:00