linux/drivers/gpu/drm/i915
Imre Deak ddf9c53629 drm/i915: add intel_display_power_enabled_sw() for use in atomic ctx
Atm we call intel_display_power_enabled() from
i915_capture_error_state() in IRQ context and then take a mutex. To fix
this add a new intel_display_power_enabled_sw() which returns the domain
state based on software tracking as opposed to reading the actual HW
state.

Since we use domain_use_count for this without locking on the reader
side make sure we increase the counter only after enabling all required
power wells and decrease it before disabling any of these power wells.

Regression introduced in
commit 1b02383464b4a915627ef3b8fd0ad7f07168c54c
Author: Imre Deak <imre.deak@intel.com>
Date:   Tue Sep 24 16:17:09 2013 +0300

    drm/i915: support for multiple power wells

Note that atm we depend on the value returned by
intel_display_power_enabled_sw() in i915_capture_error_state() to avoid
unclaimed register access reports. This was never guaranteed though,
since another thread can disable the power concurrently. If this is a
problem we need another explicit way to disable the reporting during
error captures.

v2:
- remove barriers as the caller can't depend on the value
  returned from i915_capture_error_state_sw() anyway (Ville)
- dump the state of pipe/transcoder power domain state (Daniel)

Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-28 15:05:06 +01: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
dvo.h drm/i915: Remove unused mode_fixup() vfunc of struct intel_dvo_dev_ops 2013-09-05 21:39:59 +02:00
i915_debugfs.c drm/i915: Enabling DebugFS for valleyview forcewake counts 2013-11-28 08:31:46 +01:00
i915_dma.c drm/i915: add a default always-on power well 2013-11-26 20:08:19 +01:00
i915_drv.c drm/i915: Disallow dynamic ppgtt param modification 2013-11-26 10:10:14 +01:00
i915_drv.h drm/i915: add intel_display_power_enabled_sw() for use in atomic ctx 2013-11-28 15:05:06 +01:00
i915_gem_context.c drm/i915: Remove defunct ctx switch comments 2013-11-26 10:12:16 +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 mapping the dma-buf 2013-09-03 19:17:58 +02:00
i915_gem_evict.c drm/i915: trace vm eviction instead of everything 2013-10-01 07:45:20 +02:00
i915_gem_execbuffer.c drm/i915: Missed dropped VMA conversion 2013-11-26 10:12:32 +01:00
i915_gem_gtt.c drm/i915: Move the gtt mm takedown to cleanup 2013-11-26 10:21:27 +01:00
i915_gem_stolen.c Linux 3.12-rc2 2013-09-24 09:32:53 +02:00
i915_gem_tiling.c drm/i915: prevent tiling changes on framebuffer backing storage 2013-10-16 22:04:52 +02:00
i915_gem.c Merge branch 'backlight-rework' into drm-intel-next-queued 2013-11-15 10:02:39 +01:00
i915_gpu_error.c drm/i915/bdw: Update relevant error state 2013-11-08 18:09:43 +01:00
i915_ioc32.c
i915_irq.c drm/i915: dp aux irq support for g4x/vlv 2013-11-18 09:09:22 +01:00
i915_reg.h drm/i915/vlv: use parallel context restore when coming out of RC6 2013-11-28 11:02:06 +01:00
i915_suspend.c drm/i915: do not save/restore backlight registers in KMS 2013-11-14 12:22:32 +01:00
i915_sysfs.c Merge branch 'backlight-rework' into drm-intel-next-queued 2013-11-15 10:02:39 +01:00
i915_trace_points.c
i915_trace.h drm/i915: Add a tracepoint for using a semaphore 2013-10-01 07:45:24 +02:00
i915_ums.c drm/i915: do not save/restore backlight registers in KMS 2013-11-14 12:22:32 +01:00
intel_acpi.c i915: fix ACPI _DSM warning 2013-08-05 19:04:05 +02:00
intel_bios.c drm/i915: Give names to the VBT child device type bits 2013-11-05 07:59:30 +01:00
intel_bios.h drm/i915: Make intel_dp_is_edp() less specific 2013-11-05 07:59:40 +01:00
intel_crt.c drm/i915: Use hsw_crt_get_config on BDW 2013-11-08 18:10:09 +01:00
intel_ddi.c drm/i915: reuse WRPLL when possible 2013-11-18 17:15:03 +01:00
intel_display.c drm/i915: add intel_display_power_enabled_sw() for use in atomic ctx 2013-11-28 15:05:06 +01:00
intel_dp.c drm/i915: dp aux irq support for g4x/vlv 2013-11-18 09:09:22 +01:00
intel_drv.h drm/i915: add intel_display_power_enabled_sw() for use in atomic ctx 2013-11-28 15:05:06 +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: Use adjusted_mode in DSI PLL calculations 2013-09-16 23:36:38 +02:00
intel_dsi.c drm/i915: Use pipe_name() instead of the pipe number 2013-10-16 19:42:52 +02:00
intel_dsi.h drm/i915: add VLV DSI PLL Calculations 2013-09-04 17:34:48 +02:00
intel_dvo.c drm/i915/dvo: call ->mode_set callback only when the port is running 2013-11-04 16:30:33 +01:00
intel_fbdev.c drm/i915: drop DRM_ERROR in intel_fbdev init 2013-11-28 14:55:54 +01:00
intel_hdmi.c Merge branch 'backlight-rework' into drm-intel-next-queued 2013-11-15 10:02:39 +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: make backlight functions take a connector 2013-11-06 17:56:28 +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 Merge branch 'bdw-fixes' into backlight-rework 2013-11-15 09:44:29 +01:00
intel_overlay.c drm/i915: use pointer = k[cmz...]alloc(sizeof(*pointer), ...) pattern 2013-10-01 07:45:01 +02:00
intel_panel.c Merge branch 'bdw-fixes' into backlight-rework 2013-11-15 09:44:29 +01:00
intel_pm.c drm/i915: add intel_display_power_enabled_sw() for use in atomic ctx 2013-11-28 15:05:06 +01:00
intel_ringbuffer.c drm/i915: Add power well arguments to force wake routines. 2013-11-28 08:31:22 +01:00
intel_ringbuffer.h drm/i915: Write RING_TAIL once per-request 2013-09-10 15:35:58 +02:00
intel_sdvo_regs.h
intel_sdvo.c drm/i915/sdvo: Fix up debug output to not split lines 2013-11-28 08:31:49 +01:00
intel_sideband.c drm/i915/vlv: Make the vlv_dpio_read/vlv_dpio_write more PHY centric 2013-11-11 10:57:45 +01:00
intel_sprite.c drm/i915: Enable pipe gamma for sprites 2013-11-21 09:09:37 +01:00
intel_tv.c drm/i915: Rename intel_flush_display_plane to intel_flush_primary_plane 2013-10-10 12:47:02 +02:00
intel_uncore.c drm/i915: make sparse happy for the new vlv mmio read function 2013-11-28 08:31:48 +01:00
Kconfig i915, fbdev: Fix Kconfig typo 2013-11-21 21:59:02 +01:00
Makefile drm/i915: rename intel_fb.c to intel_fbdev.c 2013-10-11 23:37:33 +02:00