aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatoliy Klymenko <[email protected]>2024-01-23 18:54:00 -0800
committerTomi Valkeinen <[email protected]>2024-02-07 15:17:18 +0200
commit7717fc5b22e59975c88a8f2b222b5cee4531de61 (patch)
treedec3e94f9d40c743f4c81a36726cc194f297f5f0
parentb214b37c902d25623b4a1265f485f34e0e3024c0 (diff)
drm: xlnx: zynqmp_dpsub: Clear status register ASAP
Clear status register as soon as we read it. Addressing comments from https://lore.kernel.org/dri-devel/[email protected]/ Signed-off-by: Anatoliy Klymenko <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/xlnx/zynqmp_dp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c
index d60b7431603f..5a3335e1fffa 100644
--- a/drivers/gpu/drm/xlnx/zynqmp_dp.c
+++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c
@@ -1624,6 +1624,8 @@ static irqreturn_t zynqmp_dp_irq_handler(int irq, void *data)
u32 status, mask;
status = zynqmp_dp_read(dp, ZYNQMP_DP_INT_STATUS);
+ /* clear status register as soon as we read it */
+ zynqmp_dp_write(dp, ZYNQMP_DP_INT_STATUS, status);
mask = zynqmp_dp_read(dp, ZYNQMP_DP_INT_MASK);
if (!(status & ~mask))
return IRQ_NONE;
@@ -1634,8 +1636,6 @@ static irqreturn_t zynqmp_dp_irq_handler(int irq, void *data)
if (status & ZYNQMP_DP_INT_CHBUF_OVERFLW_MASK)
dev_dbg_ratelimited(dp->dev, "overflow interrupt\n");
- zynqmp_dp_write(dp, ZYNQMP_DP_INT_STATUS, status);
-
if (status & ZYNQMP_DP_INT_VBLANK_START)
zynqmp_dpsub_drm_handle_vblank(dp->dpsub);