]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/gpu/drm/i915/i915_irq.c
drm/i915: unify PM interrupt preinstall sequence
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 12 Jul 2013 20:43:25 +0000 (22:43 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 16 Jul 2013 06:14:30 +0000 (08:14 +0200)
commitd18ea1b58a5003eb6fca03aff03c4c01321e6cb1
tree1a95ffb03a9df3468f547524ede686cf9b35a667
parent63573eb7ba3d1bdc1db25fe79314609a4189a306
drm/i915: unify PM interrupt preinstall sequence

Since the addition of VECS we have a slightly different enable
sequence for PM interrupts on ivb/hsw vs snb and vlv. Usually that
will end up in hard to track down surprises.

Hence unifiy things and since we have copies of this code in 3 places
now, extract it into its own little helper.

Note that this changes the irq preinstall sequence a bit for snb and
vlv: We now also clear the PM registers in the preinstall hook, in
addition to the PM register clearing/setup already done when actually
enabling rps. So this doesn't fix a bug but simply unifies the code
across all platforms. After the postinstall hook is similarly unified
we can rip out the then redundant PM interrupt setup from the rps
code.

v3: Rebase on top of the retained double-GTIIR clearing. Also
resurrect the masking/disabling of the gen6+ PM interrupts as spotted
by Ben Widaswky.

v4: Move the DE interrupt reset code out of gen5_gt_irq_preinstall
back to ironlake_irq_preinstall where it really belongs. Spotted by
Paulo.

v3: Improve the commit message to more clearly spell out why we want
to unify the code and what exactly changes.

Cc: Paulo Zanoni <przanoni@gmail.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
[danvet: s/GT/PM/ to fix up a comment which Ben spotted while
reviewing.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_irq.c