summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/arm/malidp_hw.c
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2017-06-27 15:18:17 +0200
committerSean Paul <seanpaul@chromium.org>2017-06-27 15:18:17 +0200
commitb740e76936c14354a9c5676a3eed839ea8472c41 (patch)
treedd0b74f64007dba28fcf12595af893e367d307ff /drivers/gpu/drm/arm/malidp_hw.c
parentdrm/atomic-helper: Simplify commit tracking locking (diff)
parentBackmerge tag 'v4.12-rc7' into drm-next (diff)
downloadlinux-b740e76936c14354a9c5676a3eed839ea8472c41.tar.xz
linux-b740e76936c14354a9c5676a3eed839ea8472c41.zip
Merge remote-tracking branch 'airlied/drm-next' into drm-misc-next
Required for Daniel's drm_vblank_cleanup cleanup
Diffstat (limited to 'drivers/gpu/drm/arm/malidp_hw.c')
-rw-r--r--drivers/gpu/drm/arm/malidp_hw.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/gpu/drm/arm/malidp_hw.c b/drivers/gpu/drm/arm/malidp_hw.c
index 28360b8542f7..17bca99e8ac8 100644
--- a/drivers/gpu/drm/arm/malidp_hw.c
+++ b/drivers/gpu/drm/arm/malidp_hw.c
@@ -766,12 +766,17 @@ static irqreturn_t malidp_de_irq(int irq, void *arg)
u32 status, mask, dc_status;
irqreturn_t ret = IRQ_NONE;
- if (!drm->dev_private)
- return IRQ_HANDLED;
-
hwdev = malidp->dev;
de = &hwdev->map.de_irq_map;
+ /*
+ * if we are suspended it is likely that we were invoked because
+ * we share an interrupt line with some other driver, don't try
+ * to read the hardware registers
+ */
+ if (hwdev->pm_suspended)
+ return IRQ_NONE;
+
/* first handle the config valid IRQ */
dc_status = malidp_hw_read(hwdev, hwdev->map.dc_base + MALIDP_REG_STATUS);
if (dc_status & hwdev->map.dc_irq_map.vsync_irq) {
@@ -854,6 +859,14 @@ static irqreturn_t malidp_se_irq(int irq, void *arg)
struct malidp_hw_device *hwdev = malidp->dev;
u32 status, mask;
+ /*
+ * if we are suspended it is likely that we were invoked because
+ * we share an interrupt line with some other driver, don't try
+ * to read the hardware registers
+ */
+ if (hwdev->pm_suspended)
+ return IRQ_NONE;
+
status = malidp_hw_read(hwdev, hwdev->map.se_base + MALIDP_REG_STATUS);
if (!(status & hwdev->map.se_irq_map.irq_mask))
return IRQ_NONE;