linux_dsm_epyc7002/drivers/gpu/drm/i915
Ben Widawsky 4848405cce drm/i915: make PM interrupt writes non-destructive
PM interrupts have an expanded role on HSW. It helps route the EBOX
interrupts. This patch is necessary to make the existing code which
touches the mask, and enable registers more friendly to other code paths
that also will need these registers.

To be more explicit:
At preinstall all interrupts are masked and disabled. This implies that
preinstall should always happen before any enabling/disabling of RPS or
other interrupts.

The PMIMR is touched by the workqueue, so enable/disable touch IER and
IIR. Similarly, the code currently expects IMR has no use outside of the
RPS related interrupts so they unconditionally set 0, or ~0. We could
use IER in the workqueue, and IMR elsewhere, but since the workqueue
use-case is more transient the existing usage makes sense.

Disable RPS events:
IER := IER & ~GEN6_PM_RPS_EVENTS // Disable RPS related interrupts
IIR := GEN6_PM_RPS_EVENTS // Disable any outstanding interrupts

Enable RPS events:
IER := IER | GEN6_PM_RPS_EVENTS // Enable the RPS related interrupts
IIR := GEN6_PM_RPS_EVENTS // Make sure there were no leftover events
(really shouldn't happen)

v2: Shouldn't destroy PMIIR or PMIMR VEBOX interrupt state in
enable/disable rps functions (Haihao)

v3: Bug found by Chris where we were clearing the wrong bits at rps
disable.
    expanded commit message

v4: v3 was based off the wrong branch

v5: Added the setting of PMIMR because of previous patch update

CC: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-05-31 20:54:17 +02:00
..
dvo_ch7xxx.c drm/i915: add support for dvo Chrontel 7010B 2013-05-20 22:02:49 +02:00
dvo_ch7017.c drm/i915/dvo: implement get_hw_state 2012-09-06 07:58:52 +02:00
dvo_ivch.c drm/i915/dvo: implement get_hw_state 2012-09-06 07:58:52 +02:00
dvo_ns2501.c drm/i915/dvo: implement get_hw_state 2012-09-06 07:58:52 +02:00
dvo_sil164.c drm/i915/dvo: implement get_hw_state 2012-09-06 07:58:52 +02:00
dvo_tfp410.c drm/i915/dvo: implement get_hw_state 2012-09-06 07:58:52 +02:00
dvo.h Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
i915_debugfs.c drm/i915: change VLV IOSF sideband accessors to not return error code 2013-05-23 23:25:42 +02:00
i915_dma.c drm/i915: release scratch page at module unload 2013-05-31 20:53:59 +02:00
i915_drv.c drm/i915: add HAS_VEBOX 2013-05-31 20:54:11 +02:00
i915_drv.h drm/i915: add HAS_VEBOX 2013-05-31 20:54:11 +02:00
i915_gem_context.c drm/i915: context debug messages 2013-05-31 20:53:58 +02:00
i915_gem_debug.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
i915_gem_dmabuf.c drm/i915: fix dmabuf vmap support 2013-05-01 16:09:31 +10:00
i915_gem_evict.c drm/i915: Create a gtt structure 2013-01-17 22:33:56 +01:00
i915_gem_execbuffer.c Merge tag 'drm-intel-next-2013-03-23' of git://people.freedesktop.org/~danvet/drm-intel into drm-next 2013-04-05 10:18:13 +10:00
i915_gem_gtt.c Linux 3.10-rc2 2013-05-21 09:52:16 +02:00
i915_gem_stolen.c drm/i915: allow stolen, pre-allocated objects to avoid GTT allocation v2 2013-05-10 21:56:37 +02:00
i915_gem_tiling.c drm/i915: Increase max fence pitch limit to 256KB on IVB+ 2013-04-18 09:43:20 +02:00
i915_gem.c drm/i915: Vebox ringbuffer init 2013-05-31 20:54:12 +02:00
i915_ioc32.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
i915_irq.c drm/i915: make PM interrupt writes non-destructive 2013-05-31 20:54:17 +02:00
i915_reg.h drm/i915: make PM interrupt writes non-destructive 2013-05-31 20:54:17 +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: change VLV IOSF sideband accessors to not return error code 2013-05-23 23:25:42 +02:00
i915_trace_points.c drm/i915: [sparse] trivial sparse fixes 2012-04-18 10:34:49 +02:00
i915_trace.h drm/i915: Allow DRM_ROOT_ONLY|DRM_MASTER to submit privileged batchbuffers 2012-10-17 21:06:59 +02:00
i915_ums.c drm/i915: Apply OCD to data/link m/n register #defines 2013-05-06 11:27:57 +02:00
intel_acpi.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
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: hw state readout&check support for cpu_transcoder 2013-05-31 20:54:03 +02:00
intel_display.c drm/i915: release cursor when crtc is destroyed 2013-05-31 20:54:07 +02:00
intel_dp.c drm/i915: remove unused is_cpu_edp() 2013-05-31 20:54:01 +02:00
intel_drv.h drm/i915: add haswell_update_sprite_wm 2013-05-31 20:53:52 +02:00
intel_dvo.c drm/i915: document why dvo/sdvo/crt need a special dpms function 2013-05-31 20:54:04 +02:00
intel_fb.c drm/i915: clear the stolen fb before resuming 2013-05-07 22:25:11 +02:00
intel_hdmi.c drm/i915: rename VLV IOSF sideband functions logically 2013-05-23 23:25:10 +02:00
intel_i2c.c drm/i915: Don't touch South Display when PCH_NOP 2013-04-08 20:53:00 +02:00
intel_lvds.c drm/i915: add encoder get_config function v5 2013-05-21 09:55:19 +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 Linux 3.10-rc2 2013-05-21 09:52:16 +02:00
intel_overlay.c drm/i915: avoid big kmallocs on reading error state 2013-05-23 12:59:25 +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: make PM interrupt writes non-destructive 2013-05-31 20:54:17 +02:00
intel_ringbuffer.c drm/i915: Vebox ringbuffer init 2013-05-31 20:54:12 +02:00
intel_ringbuffer.h drm/i915: Vebox ringbuffer init 2013-05-31 20:54:12 +02:00
intel_sdvo_regs.h drm/i915: clear the entire sdvo infoframe buffer 2012-10-24 15:12:48 +02:00
intel_sdvo.c drm/i915: document why dvo/sdvo/crt need a special dpms function 2013-05-31 20:54:04 +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: add "enable" argument to intel_update_sprite_watermarks 2013-05-31 20:53:52 +02:00
intel_tv.c drm/i915: Organize VBT stuff inside drm_i915_private 2013-05-10 21:56:46 +02:00
Makefile drm/i915: group sideband register accessors to a new file 2013-05-23 23:24:03 +02:00