From: jason-jh.lin <jason-jh.lin@mediatek.com>
To: Chun-Kuang Hu <chunkuang.hu@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>
Cc: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
Yongqiang Niu <yongqiang.niu@mediatek.com>,
<dri-devel@lists.freedesktop.org>,
<linux-mediatek@lists.infradead.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <hsinyi@chromium.org>,
<fshao@chromium.org>, <jason-jh.lin@mediatek.com>,
<nancy.lin@mediatek.com>, <singo.chang@mediatek.com>
Subject: [v2 PATCH 3/3] drm/mediatek: Fix cursor plane is not config when primary is updating
Date: Thu, 30 Sep 2021 10:47:04 +0800 [thread overview]
Message-ID: <20210930024704.6966-4-jason-jh.lin@mediatek.com> (raw)
In-Reply-To: <20210930024704.6966-1-jason-jh.lin@mediatek.com>
If cursor plane has updated but primary plane config task is not
finished, mtk_drm_crtc_update_config will call mbox_flush() to clear
all task in current GCE thread and let cursor plane re-send a new
GCE task with cursor + primary plane config to replace the unfinished
GCE task.
So the plane config flag should not be cleared when mailbox callback
with a error status.
Fixes: 9efb16c2fdd6 ("drm/mediatek: Clear pending flag when cmdq packet is done")
Signed-off-by: jason-jh.lin <jason-jh.lin@mediatek.com>
---
drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
index 274e5c67507d..b96dbc867890 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
@@ -281,6 +281,9 @@ static void ddp_cmdq_cb(struct mbox_client *cl, void *mssg)
struct mtk_crtc_state *state;
unsigned int i;
+ if (data->sta < 0)
+ return;
+
state = to_mtk_crtc_state(mtk_crtc->base.state);
state->pending_config = false;
--
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
next prev parent reply other threads:[~2021-09-30 2:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-30 2:47 [v2 PATCH 0/3] Fix the issues caused by CMDQ refinement of mtk-drm jason-jh.lin
2021-09-30 2:47 ` [v2 PATCH 1/3] drm/mediatek: Fix crash at using pkt->cl->chan in cmdq_pkt_finalize jason-jh.lin
2021-09-30 7:12 ` Enric Balletbo Serra
2021-09-30 13:11 ` Chun-Kuang Hu
2021-09-30 13:48 ` Enric Balletbo Serra
2021-10-01 15:52 ` Chun-Kuang Hu
2021-10-06 11:04 ` Enric Balletbo Serra
2021-09-30 2:47 ` [v2 PATCH 2/3] drm/mediatek: Fix pkt buf alloc once but free many times jason-jh.lin
2021-09-30 2:47 ` jason-jh.lin [this message]
2021-09-30 13:12 ` [v2 PATCH 3/3] drm/mediatek: Fix cursor plane is not config when primary is updating Chun-Kuang Hu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210930024704.6966-4-jason-jh.lin@mediatek.com \
--to=jason-jh.lin@mediatek.com \
--cc=airlied@linux.ie \
--cc=chunkuang.hu@kernel.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=fshao@chromium.org \
--cc=hsinyi@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=nancy.lin@mediatek.com \
--cc=p.zabel@pengutronix.de \
--cc=singo.chang@mediatek.com \
--cc=yongqiang.niu@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox