]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: vlv: fix mapping of pipestat enable to status bits
authorImre Deak <imre.deak@intel.com>
Mon, 10 Feb 2014 16:42:48 +0000 (18:42 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 12 Feb 2014 17:52:58 +0000 (18:52 +0100)
commite3f13129bb8aca0576992d9e041324a2fd713cef
treeb1b5efe0c220cb86c1124c896217883b714354dc
parentf88f147e4fd89334f7e8cb10ef2b7c06c474ca47
drm/i915: vlv: fix mapping of pipestat enable to status bits

At least on VLV we can't get at the pipestat status bits by simply right
shifting the corresponding enable bits. The mapping between enable and
status bits for the sprite0,1 flip done and the PSR events don't follow
this rule, so we need to map them separately.

The PSR enable for pipe A is DPFLIPSTAT[22], but I haven't added support
for this, since there is no user of it atm. Until support is added WARN
if someone tries to enable PSR interrupts, or tries to enable the same
(1 << 6) bit on pipe B, which MBZ.

v2:
- inline the status->enable mask mapping (Ville)
- fix bogus use of status bits in enable mask (Ville)

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/i915_reg.h