drm/i915/gen8: Disable master intr before reading
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Mon, 15 Oct 2018 14:14:38 +0000 (17:14 +0300)
committerMika Kuoppala <mika.kuoppala@linux.intel.com>
Tue, 16 Oct 2018 10:11:22 +0000 (13:11 +0300)
commit4376b9c965c0563b1f95e8b7fae560e8e4890c00
tree0768a1fe2b3b9ba1c6da2149af446c4b27c7c49c
parent04c388d429568f03e2719bfb56ebfdb115896bd0
drm/i915/gen8: Disable master intr before reading

Disable master interrupt before reading level indications.
This will close a race where we get a level indication between
reading and disabling, generating an extra interrupt where we
could have avoided one.

Further, as the reading acts also as a post, replace the
write/post on the irq reset with the helper. On enabling side,
posting doesn't serve any purpose so it can also be replaced
with helper.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20181015141440.21845-1-mika.kuoppala@linux.intel.com
drivers/gpu/drm/i915/i915_irq.c