Skip to content

Commit e5838a2

Browse files
Jason-JH Lingregkh
authored andcommitted
drm/mediatek: Fix config_updating flag never false when no mbox channel
[ Upstream commit 4ba973c ] When CONFIG_MTK_CMDQ is enabled, if the display is controlled by the CPU while other hardware is controlled by the GCE, the display will encounter a mbox request channel failure. However, it will still enter the CONFIG_MTK_CMDQ statement, causing the config_updating flag to never be set to false. As a result, no page flip event is sent back to user space, and the screen does not update. Fixes: da03801 ("drm/mediatek: Move mtk_crtc_finish_page_flip() to ddp_cmdq_cb()") Signed-off-by: Jason-JH Lin <[email protected]> Reviewed-by: CK Hu <[email protected]> Link: https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/ Signed-off-by: Chun-Kuang Hu <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 02e9406 commit e5838a2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/gpu/drm/mediatek/mtk_crtc.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,13 +620,16 @@ static void mtk_crtc_update_config(struct mtk_crtc *mtk_crtc, bool needs_vblank)
620620

621621
mbox_send_message(mtk_crtc->cmdq_client.chan, cmdq_handle);
622622
mbox_client_txdone(mtk_crtc->cmdq_client.chan, 0);
623+
goto update_config_out;
623624
}
624-
#else
625+
#endif
625626
spin_lock_irqsave(&mtk_crtc->config_lock, flags);
626627
mtk_crtc->config_updating = false;
627628
spin_unlock_irqrestore(&mtk_crtc->config_lock, flags);
628-
#endif
629629

630+
#if IS_REACHABLE(CONFIG_MTK_CMDQ)
631+
update_config_out:
632+
#endif
630633
mutex_unlock(&mtk_crtc->hw_lock);
631634
}
632635

0 commit comments

Comments
 (0)