[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5255301c4520a625144debb9daacdd62ce7dd2cd.camel@mediatek.com>
Date: Mon, 24 Feb 2025 05:31:44 +0000
From: CK Hu (胡俊光) <ck.hu@...iatek.com>
To: Jason-JH Lin (林睿祥) <Jason-JH.Lin@...iatek.com>,
"chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>, "AngeloGioacchino Del
Regno" <angelogioacchino.delregno@...labora.com>
CC: Singo Chang (張興國) <Singo.Chang@...iatek.com>,
"treapking@...omium.org" <treapking@...omium.org>,
Yongqiang Niu (牛永强)
<yongqiang.niu@...iatek.com>, Project_Global_Chrome_Upstream_Group
<Project_Global_Chrome_Upstream_Group@...iatek.com>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
Nancy Lin (林欣螢) <Nancy.Lin@...iatek.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Xavier Chang (張獻文) <Xavier.Chang@...iatek.com>,
Sirius Wang (王皓昱) <Sirius.Wang@...iatek.com>,
"wenst@...omium.org" <wenst@...omium.org>,
"linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] drm/mediatek: Fix config_updating flag never false when
no mbox channel
On Mon, 2025-02-24 at 13:12 +0800, Jason-JH Lin wrote:
> 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.
Reviewed-by: CK Hu <ck.hu@...iatek.com>
>
> Fixes: da03801ad08f ("drm/mediatek: Move mtk_crtc_finish_page_flip() to ddp_cmdq_cb()")
> Signed-off-by: Jason-JH Lin <jason-jh.lin@...iatek.com>
> ---
> drivers/gpu/drm/mediatek/mtk_crtc.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_crtc.c b/drivers/gpu/drm/mediatek/mtk_crtc.c
> index 5674f5707cca..cfc4867296b8 100644
> --- a/drivers/gpu/drm/mediatek/mtk_crtc.c
> +++ b/drivers/gpu/drm/mediatek/mtk_crtc.c
> @@ -620,13 +620,14 @@ static void mtk_crtc_update_config(struct mtk_crtc *mtk_crtc, bool needs_vblank)
>
> mbox_send_message(mtk_crtc->cmdq_client.chan, cmdq_handle);
> mbox_client_txdone(mtk_crtc->cmdq_client.chan, 0);
> + goto update_config_out;
> }
> -#else
> +#endif
> spin_lock_irqsave(&mtk_crtc->config_lock, flags);
> mtk_crtc->config_updating = false;
> spin_unlock_irqrestore(&mtk_crtc->config_lock, flags);
> -#endif
>
> +update_config_out:
> mutex_unlock(&mtk_crtc->hw_lock);
> }
>
Powered by blists - more mailing lists