]> git.baikalelectronics.ru Git - kernel.git/commit
drm/rockchip: vop: fix irq disabled after vop driver probed
authorSandy Huang <hjc@rock-chips.com>
Tue, 12 Jun 2018 13:20:28 +0000 (15:20 +0200)
committerHeiko Stuebner <heiko@sntech.de>
Mon, 18 Jun 2018 12:59:32 +0000 (14:59 +0200)
commitd18716b28606f7b53c152465fb1157a0f8a7e566
tree0da2eab2d48cac793c8736f7e42092859cdc6850
parent3551a1e016f4e6a5cf8f0a72cc4f2e2b40a6482c
drm/rockchip: vop: fix irq disabled after vop driver probed

The vop irq is shared between vop and iommu and irq probing in the
iommu driver moved to the probe function recently. This can in some
cases lead to a stall if the irq is triggered while the vop driver
still has it disabled, but the vop irq handler gets called.

But there is no real need to disable the irq, as the vop can simply
also track its enabled state and ignore irqs in that case.
For this we can simply check the power-domain state of the vop,
similar to how the iommu driver does it.

So remove the enable/disable handling and add appropriate condition
to the irq handler.

changes in v2:
- move to just check the power-domain state
- add clock handling
changes in v3:
- clarify comment to speak of runtime-pm not power-domain
changes in v4:
- address Marc's comments (clk-enable WARN_ON and style improvement)

Fixes: 6de808f82274 ("iommu/rockchip: Request irqs in rk_iommu_probe()")
Cc: stable@vger.kernel.org
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180612132028.27490-3-heiko@sntech.de
drivers/gpu/drm/rockchip/rockchip_drm_vop.c