diff options
author | Bibby Hsieh <bibby.hsieh@mediatek.com> | 2020-02-17 12:10:19 +0300 |
---|---|---|
committer | CK Hu <ck.hu@mediatek.com> | 2020-02-18 11:14:38 +0300 |
commit | 839cbf0531428f3f9535077a461b8631359c1165 (patch) | |
tree | ef280a68fe3a4fdb6cd04facace9524e6b29f95c /drivers/gpu/drm/mediatek | |
parent | 60fa8c13ab1a33b8b958efb1510ec2fd8a064bcc (diff) | |
download | linux-839cbf0531428f3f9535077a461b8631359c1165.tar.xz |
drm/mediatek: Make sure previous message done or be aborted before send
Mediatek CMDQ driver removed atomic parameter and implementation
related to atomic. DRM driver need to make sure previous message
done or be aborted before we send next message.
If previous message is still waiting for event, it means the
setting hasn't been updated into display hardware register,
we can abort the message and send next message to update the
newest setting into display hardware.
If previous message already started, we have to wait it until
transmission has been completed.
So we flush mbox client before we send new message to controller
driver.
Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
Signed-off-by: CK Hu <ck.hu@mediatek.com>
Diffstat (limited to 'drivers/gpu/drm/mediatek')
-rw-r--r-- | drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c index debcd8e5658a..fe85e487e477 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c @@ -486,6 +486,7 @@ static void mtk_drm_crtc_hw_config(struct mtk_drm_crtc *mtk_crtc) } #if IS_REACHABLE(CONFIG_MTK_CMDQ) if (mtk_crtc->cmdq_client) { + mbox_flush(mtk_crtc->cmdq_client->chan, 2000); cmdq_handle = cmdq_pkt_create(mtk_crtc->cmdq_client, PAGE_SIZE); cmdq_pkt_clear_event(cmdq_handle, mtk_crtc->cmdq_event); cmdq_pkt_wfe(cmdq_handle, mtk_crtc->cmdq_event); |