drm/mediatek: handle events when enabling/disabling crtc
authorBibby Hsieh <bibby.hsieh@mediatek.com>
Tue, 10 Dec 2019 05:05:21 +0000 (13:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Feb 2020 07:36:39 +0000 (08:36 +0100)
commitd80f9dfe47ce542eda62eac5ca67992b28c000e8
tree95e9d7288ddbf7317d12d311a36ff9b468743703
parent57cd234da28cb0cab8ddacdaf7b6e0f39e3b2db5
drm/mediatek: handle events when enabling/disabling crtc

[ Upstream commit 411f5c1eacfebb1f6e40b653d29447cdfe7282aa ]

The driver currently handles vblank events only when updating planes on
an already enabled CRTC. The atomic update API however allows requesting
an event when enabling or disabling a CRTC. This currently leads to
event objects being leaked in the kernel and to events not being sent
out. Fix it.

Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
Signed-off-by: CK Hu <ck.hu@mediatek.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/mediatek/mtk_drm_crtc.c