From: "CK Hu (胡俊光)" <ck.hu@mediatek.com>
To: "p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
"iasnezhkov@gmail.com" <iasnezhkov@gmail.com>,
"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>
Cc: "simona@ffwll.ch" <simona@ffwll.ch>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
"airlied@gmail.com" <airlied@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH] drm/mediatek: dsi: return tx_len for write transfers in mtk_dsi_host_transfer()
Date: Fri, 27 Nov 2026 09:29:36 +0000 [thread overview]
Message-ID: <b14890fcde4432e9eb81887166f76df65012ab9a.camel@mediatek.com> (raw)
In-Reply-To: <20261126003311.49008-1-iasnezhkov@gmail.com>
On Thu, 2026-11-26 at 00:33 +0000, Ilia Snezhkov via B4 Relay wrote:
> From: Ilia Snezhkov <iasnezhkov@gmail.com>
>
> Per struct mipi_dsi_host_ops .transfer() documentation in
> include/drm/drm_mipi_dsi.h, on success .transfer() must return the
> number of bytes transmitted for write packets or the number of bytes
> received for read packets.
>
> mtk_dsi_host_transfer() currently sets recv_cnt = 0 for non-read
> messages, returning 0 instead of msg->tx_len. Callers checking for short
> writes against msg->tx_len observe a spurious 0-byte transfer.
>
> Return msg->tx_len on successful write transfers.
>
> Found and drafted with an AI coding assistant.
Reviewed-by: CK Hu <ck.hu@mediatek.com>
>
> Fixes: 21898816831f ("drm/mediatek: add dsi transfer function")
> Signed-off-by: Ilia Snezhkov <iasnezhkov@gmail.com>
> ---
> drivers/gpu/drm/mediatek/mtk_dsi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
> index f82506e..e2179b4 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
> @@ -1156,7 +1156,7 @@ static ssize_t mtk_dsi_host_transfer(struct mipi_dsi_host *host,
> goto restore_dsi_mode;
>
> if (!MTK_DSI_HOST_IS_READ(msg->type)) {
> - recv_cnt = 0;
> + recv_cnt = msg->tx_len;
> goto restore_dsi_mode;
> }
>
prev parent reply other threads:[~2026-11-27 9:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 0:33 [PATCH] drm/mediatek: dsi: return tx_len for write transfers in mtk_dsi_host_transfer() Ilia Snezhkov via B4 Relay
2026-11-27 9:29 ` CK Hu (胡俊光) [this message]
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=b14890fcde4432e9eb81887166f76df65012ab9a.camel@mediatek.com \
--to=ck.hu@mediatek.com \
--cc=airlied@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chunkuang.hu@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=iasnezhkov@gmail.com \
--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=p.zabel@pengutronix.de \
--cc=simona@ffwll.ch \
/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