From: Marijn Suijten <marijn.suijten@somainline.org>
To: Pengyu Luo <mitltlatltl@gmail.com>
Cc: Rob Clark <robin.clark@oss.qualcomm.com>,
Dmitry Baryshkov <lumag@kernel.org>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Jessica Zhang <jesszhan0024@gmail.com>,
Sean Paul <sean@poorly.run>, David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>,
linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] drm/msm/dsi: fix hdisplay calculation for CMD mode panel
Date: Sun, 29 Mar 2026 20:04:29 +0200 [thread overview]
Message-ID: <acloO6wNq4ObclGZ@SoMainline.org> (raw)
In-Reply-To: <20260307111250.105772-2-mitltlatltl@gmail.com>
On 2026-03-07 19:12:49, Pengyu Luo wrote:
> ac47870fd795 incorrecly broke hdisplay calculation for CMD mode, fix
> it.
Where's the what/how/why? This commit message explains exactly nothing while a
description is a requirement for submitting patches upstream:
https://docs.kernel.org/process/submitting-patches.html#describe-your-changes
Take my version of this patch as an example.
>
> Fixes: ac47870fd795 ("drm/msm/dsi: fix hdisplay calculation when programming dsi registers")
> Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com>
> ---
> drivers/gpu/drm/msm/dsi/dsi_host.c | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
> index 7c16216e8b..f63165c7ce 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_host.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
> @@ -1016,8 +1016,9 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
> /*
> * DPU sends 3 bytes per pclk cycle to DSI. If widebus is
> * enabled, MDP always sends out 48-bit compressed data per
> - * pclk and on average, DSI consumes an amount of compressed
> - * data equivalent to the uncompressed pixel depth per pclk.
> + * pclk and on average, for video mode, DSI consumes only an
> + * amount of compressed data equivalent to the uncompressed
> + * pixel depth per pclk.
This needs a source and justification (in the commit message). For most
panels where bpc is simply 8, the resulting rate is the same as when widebus is
disabled, meaning that widebus has no effect on the pclk rate in video-mode?
- Marijn
> *
> * Calculate the number of pclks needed to transmit one line of
> * the compressed data.
> @@ -1029,10 +1030,14 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
> * unused anyway.
> */
> h_total -= hdisplay;
> - if (wide_bus_enabled)
> - bits_per_pclk = dsc->bits_per_component * 3;
> - else
> + if (wide_bus_enabled) {
> + if (msm_host->mode_flags & MIPI_DSI_MODE_VIDEO)
> + bits_per_pclk = dsc->bits_per_component * 3;
> + else
> + bits_per_pclk = 48;
> + } else {
> bits_per_pclk = 24;
> + }
>
> hdisplay = DIV_ROUND_UP(msm_dsc_get_bytes_per_line(msm_host->dsc) * 8, bits_per_pclk);
>
> --
> 2.53.0
>
next prev parent reply other threads:[~2026-03-29 18:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-07 11:12 [PATCH 1/2] drm/msm/dsi: fix bits_per_pclk Pengyu Luo
2026-03-07 11:12 ` [PATCH 2/2] drm/msm/dsi: fix hdisplay calculation for CMD mode panel Pengyu Luo
2026-03-29 18:04 ` Marijn Suijten [this message]
2026-03-20 1:48 ` [PATCH 1/2] drm/msm/dsi: fix bits_per_pclk Dmitry Baryshkov
2026-03-20 11:11 ` Pengyu Luo
2026-03-27 19:47 ` Dmitry Baryshkov
2026-04-14 10:13 ` Luca Weiss
2026-04-14 18:11 ` Dmitry Baryshkov
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=acloO6wNq4ObclGZ@SoMainline.org \
--to=marijn.suijten@somainline.org \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=mitltlatltl@gmail.com \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--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