Hi, Hsin-yi:
On Fri, 2024-02-23 at 13:23 -0800, Hsin-Yi Wang wrote:
Reviewed-by: CK Hu <ck.hu@xxxxxxxxxxxx>
---drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 12 +++++++-----1 file changed, 7 insertions(+), 5 deletions(-)diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.cindex db43f9dff912..d645b85f9721 100644--- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c+++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c@@ -95,11 +95,13 @@ static void mtk_drm_crtc_finish_page_flip(struct mtk_drm_crtc *mtk_crtc)struct drm_crtc *crtc = &mtk_crtc->base;unsigned long flags;- spin_lock_irqsave(&crtc->dev->event_lock, flags);- drm_crtc_send_vblank_event(crtc, mtk_crtc->event);- drm_crtc_vblank_put(crtc);- mtk_crtc->event = NULL;- spin_unlock_irqrestore(&crtc->dev->event_lock, flags);+ if (mtk_crtc->event) {+ spin_lock_irqsave(&crtc->dev->event_lock, flags);+ drm_crtc_send_vblank_event(crtc, mtk_crtc->event);+ drm_crtc_vblank_put(crtc);+ mtk_crtc->event = NULL;+ spin_unlock_irqrestore(&crtc->dev->event_lock, flags);+ }}static void mtk_drm_finish_page_flip(struct mtk_drm_crtc *mtk_crtc)--2.44.0.rc0.258.g7320e95886-goog ************* MEDIATEK Confidentiality Notice ******************** The information contained in this e-mail message (including any attachments) may be confidential, proprietary, privileged, or otherwise exempt from disclosure under applicable laws. It is intended to be conveyed only to the designated recipient(s). Any use, dissemination, distribution, printing, retaining or copying of this e-mail (including its attachments) by unintended recipient(s) is strictly prohibited and may be unlawful. If you are not an intended recipient of this e-mail, or believe that you have received this e-mail in error, please notify the sender immediately (by replying to this e-mail), delete any and all copies of this e-mail (including any attachments) from your system, and do not disclose the content of this e-mail to any other person. Thank you! |