Patch "drm/mediatek: Use spin_lock_irqsave() for CRTC event lock" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/mediatek: Use spin_lock_irqsave() for CRTC event lock

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-mediatek-use-spin_lock_irqsave-for-crtc-event-lo.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 57c12412e36647f00531aa0b8f0dde2a284b0317
Author: Fei Shao <fshao@xxxxxxxxxxxx>
Date:   Wed Aug 28 18:14:47 2024 +0800

    drm/mediatek: Use spin_lock_irqsave() for CRTC event lock
    
    [ Upstream commit be03b30b7aa99aca876fbc7c1c1b73b2d0339321 ]
    
    Use the state-aware spin_lock_irqsave() and spin_unlock_irqrestore()
    to avoid unconditionally re-enabling the local interrupts.
    
    Fixes: 411f5c1eacfe ("drm/mediatek: handle events when enabling/disabling crtc")
    Signed-off-by: Fei Shao <fshao@xxxxxxxxxxxx>
    Link: https://patchwork.kernel.org/project/dri-devel/patch/20240828101511.3269822-1-fshao@xxxxxxxxxxxx/
    Signed-off-by: Chun-Kuang Hu <chunkuang.hu@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
index 5a1c8b26f1bb1..659112da47b69 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
@@ -450,6 +450,7 @@ static void mtk_crtc_ddp_hw_fini(struct mtk_drm_crtc *mtk_crtc)
 {
 	struct drm_device *drm = mtk_crtc->base.dev;
 	struct drm_crtc *crtc = &mtk_crtc->base;
+	unsigned long flags;
 	int i;
 
 	for (i = 0; i < mtk_crtc->ddp_comp_nr; i++) {
@@ -481,10 +482,10 @@ static void mtk_crtc_ddp_hw_fini(struct mtk_drm_crtc *mtk_crtc)
 	pm_runtime_put(drm->dev);
 
 	if (crtc->state->event && !crtc->state->active) {
-		spin_lock_irq(&crtc->dev->event_lock);
+		spin_lock_irqsave(&crtc->dev->event_lock, flags);
 		drm_crtc_send_vblank_event(crtc, crtc->state->event);
 		crtc->state->event = NULL;
-		spin_unlock_irq(&crtc->dev->event_lock);
+		spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
 	}
 }
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux