From: Alexander Koskovich <akoskovich@pm.me>
To: Neil Armstrong <neil.armstrong@linaro.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
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>,
Marijn Suijten <marijn.suijten@somainline.org>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org
Subject: Re: [PATCH v2 3/3] drm/msm/dpu: fix video mode DSC INTF timing width for non 8 bit panels
Date: Thu, 19 Mar 2026 08:48:49 +0000 [thread overview]
Message-ID: <_varXMigTiaLa1CVxsqWY0wJNnR8xZGw5lAS8MmyxrVAjHPK1Mu-H-heiIMxB9SdcJoEhjUDUtUo8dZvTi_GsQwYKsuGnc1tsFlSDqoKfA0=@pm.me> (raw)
In-Reply-To: <c9d14a74-8e59-43bb-827b-577c8f675c8f@linaro.org>
On Thursday, March 19th, 2026 at 4:35 AM, Neil Armstrong <neil.armstrong@linaro.org> wrote:
> On 3/19/26 05:00, Alexander Koskovich wrote:
> > Using bits_per_component * 3 as the divisor for the compressed INTF
> > timing width produces constant FIFO errors for panels such as the BOE
> > BF068MWM-TD0 which is a 10 bit panel.
> >
> > The downstream driver calculates the compressed timing width by
> > dividing the total compressed bytes per line by 3 which does not depend
> > on bits_per_component. Switch the divisor to 24 to match downstream.
> >
> > Signed-off-by: Alexander Koskovich <akoskovich@pm.me>
> > ---
> > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 12 +++++++-----
> > 1 file changed, 7 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
> > index 0ba777bda253..9b046a0e77aa 100644
> > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
> > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
> > @@ -122,19 +122,21 @@ static void drm_mode_to_intf_timing_params(
> > }
> >
> > /*
> > - * for DSI, if compression is enabled, then divide the horizonal active
> > - * timing parameters by compression ratio. bits of 3 components(R/G/B)
> > - * is compressed into bits of 1 pixel.
> > + * For DSI, if DSC is enabled, use a fixed divisor of 24 rather than
> > + * bits_per_component * 3 when calculating the compressed timing width.
> > + *
> > + * This matches the downstream driver and is required for panels with
> > + * bits_per_component != 8.
> > */
> > if (phys_enc->hw_intf->cap->type != INTF_DP && timing->compression_en) {
> > struct drm_dsc_config *dsc =
> > dpu_encoder_get_dsc_config(phys_enc->parent);
> > +
> > /*
> > * TODO: replace drm_dsc_get_bpp_int with logic to handle
> > * fractional part if there is fraction
> > */
> > - timing->width = timing->width * drm_dsc_get_bpp_int(dsc) /
> > - (dsc->bits_per_component * 3);
> > + timing->width = timing->width * drm_dsc_get_bpp_int(dsc) / 24;
>
>
>
> @bits_per_component: Bits per component to code (8/10/12) <= how the DSC pixels are encoded in the stream
> @bits_per_pixel: Target bits per pixel with 4 fractional bits, bits_per_pixel << 4 <= the target display pixels
>
> - bits_per_component is the transport width
> - bits_per_pixel is the display width
> - 3 is the DSC compression ratio
>
> So for a RGB101010 DSC display bits_per_pixel should be 10 << 4
>
> But here you say bits_per_component should be 8 ? can you share the downstream config of your panel ?
This is what is defined downstream for this panel, they're using 8:
https://github.com/NothingOSS/android_kernel_msm-6.1_nothing_sm7635/blob/sm7635/b/mr/vendor/qcom/proprietary/display-devicetree/display/dsi-panel-rm69220-dsc-fhd-plus-120hz-vid-boe.dtsi
>
> Are you sure about the bits_per_component & bits_per_pixel values you set in the dsc parameters ?
I'm pretty sure they're correct, here's the panel driver I have atm:
https://github.com/AKoskovich/linux/blob/asteroids-6.19.y/drivers/gpu/drm/panel/panel-boe-bf068mwm-td0.c
>
> Neil
>
>
> > timing->xres = timing->width;
> > }
> > }
> >
>
>
Thanks,
Alex
next prev parent reply other threads:[~2026-03-19 8:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 3:59 [PATCH v2 0/3] drm/msm: add RGB101010 pixel format and fix 10-bit DSC timing Alexander Koskovich
2026-03-19 4:00 ` [PATCH v2 1/3] drm/mipi-dsi: add RGB101010 pixel format Alexander Koskovich
2026-03-21 18:52 ` Claude review: " Claude Code Review Bot
2026-03-19 4:00 ` [PATCH v2 2/3] drm/msm/dsi: Add support for " Alexander Koskovich
2026-03-19 4:21 ` Dmitry Baryshkov
2026-03-19 9:10 ` Konrad Dybcio
2026-03-19 9:25 ` Alexander Koskovich
2026-03-19 9:39 ` Konrad Dybcio
2026-03-21 18:52 ` Claude review: " Claude Code Review Bot
2026-03-19 4:00 ` [PATCH v2 3/3] drm/msm/dpu: fix video mode DSC INTF timing width for non 8 bit panels Alexander Koskovich
2026-03-19 8:34 ` Neil Armstrong
2026-03-19 8:48 ` Alexander Koskovich [this message]
2026-03-19 10:33 ` Neil Armstrong
2026-03-19 10:04 ` Konrad Dybcio
2026-03-21 18:52 ` Claude review: " Claude Code Review Bot
2026-03-21 18:52 ` Claude review: drm/msm: add RGB101010 pixel format and fix 10-bit DSC timing Claude Code Review Bot
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='_varXMigTiaLa1CVxsqWY0wJNnR8xZGw5lAS8MmyxrVAjHPK1Mu-H-heiIMxB9SdcJoEhjUDUtUo8dZvTi_GsQwYKsuGnc1tsFlSDqoKfA0=@pm.me' \
--to=akoskovich@pm.me \
--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=maarten.lankhorst@linux.intel.com \
--cc=marijn.suijten@somainline.org \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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