From: Adam Ford <aford173@gmail.com>
To: Marek Vasut <marex@denx.de>
Cc: dri-devel@lists.freedesktop.org, aford@beaconembedded.com,
Frieder Schrempf <frieder.schrempf@kontron.de>,
Inki Dae <inki.dae@samsung.com>,
Jagan Teki <jagan@amarulasolutions.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Robert Foss <rfoss@kernel.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Marco Felsch <m.felsch@pengutronix.de>,
Michael Tretter <m.tretter@pengutronix.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2 2/2] drm/bridge: samsung-dsim: Fix porch calcalcuation rounding
Date: Mon, 22 Apr 2024 07:09:13 -0500 [thread overview]
Message-ID: <CAHCN7x+DwSSabhGYZ1dnZzwRe+BJfz2H-AXbxjUQWytrq3OMpQ@mail.gmail.com> (raw)
In-Reply-To: <6111fe04-4ecb-428e-9a0c-dc02cadfe3e7@denx.de>
On Sun, Apr 21, 2024 at 9:36 AM Marek Vasut <marex@denx.de> wrote:
>
> On 2/12/24 12:09 AM, Adam Ford wrote:
> > When using video sync pulses, the HFP, HBP, and HSA are divided between
> > the available lanes if there is more than one lane. For certain
> > timings and lane configurations, the HFP may not be evenly divisible.
> > If the HFP is rounded down, it ends up being too small which can cause
> > some monitors to not sync properly. In these instances, adjust htotal
> > and hsync to round the HFP up, and recalculate the htotal.
> >
> > Tested-by: Frieder Schrempf <frieder.schrempf@kontron.de> # Kontron BL i.MX8MM with HDMI monitor
> > Signed-off-by: Adam Ford <aford173@gmail.com>
> > ---
> > V2: No changes
> >
> > diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c
> > index 8476650c477c..52939211fe93 100644
> > --- a/drivers/gpu/drm/bridge/samsung-dsim.c
> > +++ b/drivers/gpu/drm/bridge/samsung-dsim.c
> > @@ -1606,6 +1606,27 @@ static int samsung_dsim_atomic_check(struct drm_bridge *bridge,
> > adjusted_mode->flags |= (DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC);
> > }
> >
> > + /*
> > + * When using video sync pulses, the HFP, HBP, and HSA are divided between
> > + * the available lanes if there is more than one lane. For certain
> > + * timings and lane configurations, the HFP may not be evenly divisible.
> > + * If the HFP is rounded down, it ends up being too small which can cause
> > + * some monitors to not sync properly. In these instances, adjust htotal
> > + * and hsync to round the HFP up, and recalculate the htotal. Through trial
> > + * and error, it appears that the HBP and HSA do not appearto need the same
> > + * correction that HFP does.
> > + */
> > + if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE && dsi->lanes > 1) {
>
> Does this also apply to mode with sync events (I suspect it does), so
> the condition here should likely be if (!...burst mode) , right ?
Thanks for the review!
I was only able to test it with the DSI->ADV6535 bridge, and I'll
admit I don't know a lot about DSI interface since I don't have a copy
of the spec to read.
Are you proposing this should be:
if (!(dsi->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) && dsi->lanes > 1) {
I just want to make sure I understand what you're requesting.
thanks
adam
next prev parent reply other threads:[~2024-04-22 12:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20240211230943eucas1p23524077c0e8e7431c2af6f3153935bd5@eucas1p2.samsung.com>
2024-02-11 23:09 ` [PATCH V2 1/2] drm/bridge: samsung-dsim: Set P divider based on min/max of fin pll Adam Ford
2024-02-11 23:09 ` [PATCH V2 2/2] drm/bridge: samsung-dsim: Fix porch calcalcuation rounding Adam Ford
2024-04-16 12:15 ` Adam Ford
2024-04-21 14:06 ` Marek Vasut
2024-04-22 12:09 ` Adam Ford [this message]
2024-04-22 12:30 ` Marek Vasut
2024-04-22 13:04 ` Adam Ford
2024-04-22 19:43 ` Marek Vasut
2024-04-25 9:18 ` Marek Szyprowski
2024-04-25 20:30 ` Adam Ford
2024-04-26 5:28 ` Marek Szyprowski
2024-05-07 8:40 ` Frieder Schrempf
2024-02-27 22:22 ` [PATCH V2 1/2] drm/bridge: samsung-dsim: Set P divider based on min/max of fin pll Adam Ford
2024-04-21 14:05 ` Marek Vasut
2024-04-25 9:18 ` Marek Szyprowski
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=CAHCN7x+DwSSabhGYZ1dnZzwRe+BJfz2H-AXbxjUQWytrq3OMpQ@mail.gmail.com \
--to=aford173@gmail.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=aford@beaconembedded.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=frieder.schrempf@kontron.de \
--cc=inki.dae@samsung.com \
--cc=jagan@amarulasolutions.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=m.felsch@pengutronix.de \
--cc=m.szyprowski@samsung.com \
--cc=m.tretter@pengutronix.de \
--cc=maarten.lankhorst@linux.intel.com \
--cc=marex@denx.de \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).