]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
drm/rockchip: Clear all interrupts before requesting the IRQ
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 20 Feb 2018 13:01:18 +0000 (13:01 +0000)
committerHeiko Stuebner <heiko@sntech.de>
Wed, 14 Mar 2018 13:02:05 +0000 (14:02 +0100)
commit5f9e93fed4d45e9a8f84728aff1a8f2ab8922902
treee927501cc748b896159558c7be94e56ec56dc630
parentce31ddd5c40c0662ffb9957b868fbd58f6eac5b3
drm/rockchip: Clear all interrupts before requesting the IRQ

Calling request_irq() followed by disable_irq() is usually a bad idea,
specially if the interrupt can be pending, and you're not yet in a
position to handle it.

This is exactly what happens on my kevin system when rebooting in a
second kernel using kexec: Some interrupt is left pending from
the previous kernel, and we take it too early, before disable_irq()
could do anything.

Let's clear the pending interrupts as we initialize the HW, and move
the interrupt request after that point. This ensures that we're in
a sane state when the interrupt is requested.

Cc: stable@vger.kernel.org
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
[adapted to recent rockchip-drm changes]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20180220130120.5254-2-marc.zyngier@arm.com
drivers/gpu/drm/rockchip/rockchip_drm_vop.c