linux/drivers/gpu/drm/i915
Daniel Vetter 1dd246fb16 drm/i915: improve SERR_INT clearing for fifo underrun reporting
The current code won't report any fifo underruns on cpt if just one
pipe has fifo underrun reporting disabled. We can't enable the
interrupts, but we can still check the per-transcoder bits and so
report the underrun delayed if:
- We always clear the transcoder's bit (and none of the other bits)
  when enabling.
- We check the transcoder's bit after disabling (to avoid racing with
  the interrupt handler).

v2: I've forgotten to actually remove the old SERR_INT clearing.

v3: Use transcoder_name as suggested by Paulo Zanoni. Paulo also
noticed a logic bug: When an underrun interrupt fires we report it
both in the interrupt handler and when checking for underruns when
disabling it in cpt_set_fifo_underrun_reporting. But that second check
is only required if the interrupt is disabled and we're switching of
underrun reporting (e.g. because we're disabling the crtc). Hence
check for that condition.

At first I wanted to rework the code to pass that bit of information
from the uppper functions down to cpt_set_fifo_underrun_reporting. But
that turned out too messy. Hence the quick&dirty check whether the
south error interrupt source is masked off or not.

v4: Streamline the control flow a bit.

v5: s/pipe/pch transcoder/ in the dmesg output, suggested by Paulo.

v6: Review from Paulo:
- Reorder the was_enabled assignment to only read the register when we
  need it. Also add a comment that we need to do that before updating
  the register.
- s/%i/%c/ fix for the debug output.
- Fix the checkpath complaint in the SERR_INT_TRANS_FIFO_UNDERRUN
  #define.

v7: Hopefully put that elusive SERR hunk back into this patch, spotted
by Paulo.

Cc: Paulo Zanoni <przanoni@gmail.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-11 14:34:32 +02:00
..
dvo_ch7xxx.c drm/i915: add support for dvo Chrontel 7010B 2013-05-20 22:02:49 +02:00
dvo_ch7017.c
dvo_ivch.c
dvo_ns2501.c
dvo_sil164.c
dvo_tfp410.c
dvo.h
i915_debugfs.c drm/i915: convert debugfs creation/destruction to table 2013-07-08 22:04:46 +02:00
i915_dma.c drm/i915: don't frob mm.suspended when not using ums 2013-07-10 14:30:25 +02:00
i915_drv.c drm/i915: don't frob mm.suspended when not using ums 2013-07-10 14:30:25 +02:00
i915_drv.h drm/i915: remove unused members from drm_i915_private 2013-07-10 14:57:06 +02:00
i915_gem_context.c drm/i915: Getter/setter for object attributes 2013-07-08 22:04:34 +02:00
i915_gem_debug.c
i915_gem_dmabuf.c drm/i915: fix dmabuf vmap support 2013-05-01 16:09:31 +10:00
i915_gem_evict.c drm/i915: Embed drm_mm_node in i915 gem obj 2013-07-08 22:04:36 +02:00
i915_gem_execbuffer.c drm/i915: don't frob mm.suspended when not using ums 2013-07-10 14:30:25 +02:00
i915_gem_gtt.c drm/i915: Embed drm_mm_node in i915 gem obj 2013-07-08 22:04:36 +02:00
i915_gem_stolen.c drm/i915: WARN if the bios reserved range is bigger than stolen size 2013-07-09 16:53:24 +02:00
i915_gem_tiling.c drm/i915: Getter/setter for object attributes 2013-07-08 22:04:34 +02:00
i915_gem.c drm/i915: don't frob mm.suspended when not using ums 2013-07-10 14:30:25 +02:00
i915_ioc32.c
i915_irq.c drm/i915: improve SERR_INT clearing for fifo underrun reporting 2013-07-11 14:34:32 +02:00
i915_reg.h drm/i915: improve SERR_INT clearing for fifo underrun reporting 2013-07-11 14:34:32 +02:00
i915_suspend.c drm/i915: protect backlight registers and data with a spinlock 2013-04-25 14:10:10 +02:00
i915_sysfs.c drm/i915: add error_state sysfs entry 2013-07-01 19:39:31 +02:00
i915_trace_points.c
i915_trace.h drm/i915: Getter/setter for object attributes 2013-07-08 22:04:34 +02:00
i915_ums.c drm/i915: scrap register address storage 2013-06-10 19:54:14 +02:00
intel_acpi.c
intel_bios.c drm/i915: Organize VBT stuff inside drm_i915_private 2013-05-10 21:56:46 +02:00
intel_bios.h drm/i915: set CPT FDI RX polarity bits based on VBT 2013-04-18 09:43:31 +02:00
intel_crt.c drm/i915: document why dvo/sdvo/crt need a special dpms function 2013-05-31 20:54:04 +02:00
intel_ddi.c drm/i915: fix the "ghost eDP" encoder unwind path 2013-06-28 14:14:19 +02:00
intel_display.c drm/i915: Fix VLV DP RBR/HDMI/DAC PLL LPF coefficients 2013-07-09 22:27:33 +02:00
intel_dp.c drm/i915: get mode clock when reading the pipe config v9 2013-07-01 19:37:53 +02:00
intel_drv.h drm/i915: Move fbc members out of line 2013-07-01 11:28:00 +02:00
intel_dvo.c drm/i915: fix dvo DPLL regression 2013-07-08 22:04:37 +02:00
intel_fb.c drm/i915: Getter/setter for object attributes 2013-07-08 22:04:34 +02:00
intel_hdmi.c Revert "drm/i915: Don't use the HDMI port color range bit on Valleyview" 2013-07-01 11:14:53 +02:00
intel_i2c.c drm/i915: avoid premature DP AUX timeouts 2013-05-22 13:51:26 +02:00
intel_lvds.c drm/i915: s/pre_pll/pre/ on the lvds port enable function 2013-07-01 11:27:54 +02: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: tune down DIDL warning about too many outputs 2013-07-01 11:14:42 +02:00
intel_overlay.c drm/i915: Getter/setter for object attributes 2013-07-08 22:04:34 +02:00
intel_panel.c drm/i915: Fix WARN_ON() on UP machines 2013-05-23 12:51:30 +02:00
intel_pm.c drm/i915: Getter/setter for object attributes 2013-07-08 22:04:34 +02:00
intel_ringbuffer.c drm/i915: Getter/setter for object attributes 2013-07-08 22:04:34 +02:00
intel_ringbuffer.h drm/i915: store ring hangcheck action 2013-06-13 17:42:17 +02:00
intel_sdvo_regs.h
intel_sdvo.c drm/i915: pixel multiplier readout support for pch ports 2013-07-01 11:28:01 +02:00
intel_sideband.c drm/i915: change VLV IOSF sideband accessors to not return error code 2013-05-23 23:25:42 +02:00
intel_sprite.c drm/i915: Getter/setter for object attributes 2013-07-08 22:04:34 +02:00
intel_tv.c drm/i915: consolidate and tighten encoder cloning checks 2013-06-05 12:33:14 +02:00
Makefile drm/i915: group sideband register accessors to a new file 2013-05-23 23:24:03 +02:00