linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@bootlin.com>
To: Jagan Teki <jagan@amarulasolutions.com>
Cc: bbrezillon@kernel.org,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
	Chen-Yu Tsai <wens@csie.org>, Sean Paul <seanpaul@chromium.org>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Jagan Teki <jagan@openedev.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 3/9] drm/sun4i: dsi: Change the start delay calculation
Date: Tue, 19 Mar 2019 11:18:49 +0100	[thread overview]
Message-ID: <20190319101849.a5vzwfkm7sg7wh2l@flea> (raw)
In-Reply-To: <CAMty3ZDbZxbSmkhAL4_==atT2qAsQ7kQRyuOViQxJUqONgZRQg@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 3417 bytes --]

On Mon, Mar 11, 2019 at 08:07:29PM +0530, Jagan Teki wrote:
> On Mon, Mar 11, 2019 at 7:42 PM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> >
> > On Thu, Mar 07, 2019 at 11:24:01PM +0530, Jagan Teki wrote:
> > > Hi Maxime,
> > >
> > > On Fri, Feb 8, 2019 at 3:23 PM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > > >
> > > > The current calculation for the video start delay in the current DSI driver
> > > > is that it is the total vertical size, minus the front porch and sync length,
> > > > plus 1. This equals to the active vertical size plus the back porch plus 1.
> > > >
> > > > That 1 is coming in the Allwinner BSP from an variable that is set to 1.
> > > > However, if we look at the Allwinner BSP more closely, and especially in
> > > > the "legacy" code for the display (in drivers/video/sunxi/legacy/), we can
> > > > see that this variable is actually computed from the porches and the sync
> > > > minus 10, clamped between 8 and 100.
> > > >
> > > > This fixes the start delay symptom we've seen on some panels (vblank
> > > > timeouts with vertical white stripes at the bottom of the panel).
> > > >
> > > > Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
> > > > ---
> > > >  drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 4 +++-
> > > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> > > > index 380fc527a707..9471fa695ec7 100644
> > > > --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> > > > +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> > > > @@ -357,7 +357,9 @@ static void sun6i_dsi_inst_init(struct sun6i_dsi *dsi,
> > > >  static u16 sun6i_dsi_get_video_start_delay(struct sun6i_dsi *dsi,
> > > >                                            struct drm_display_mode *mode)
> > > >  {
> > > > -       return mode->vtotal - (mode->vsync_end - mode->vdisplay) + 1;
> > > > +       u16 start = clamp(mode->vtotal - mode->vdisplay - 10, 8, 100);
> > > > +
> > > > +       return mode->vtotal - (mode->vsync_end - mode->vdisplay) + start;
> > > >  }
> > >
> > > As you stated in commit message about result as "active vertical size
> > > + Back porch" which indeed correct in reverse way of previous code.
> > > but the change seems incorrect to me.
> > >
> > > => mode->vtotal - (mode->vsync_end - mode->vdisplay) + start
> > > => mode->vtotal - (mode->vsync_end - mode->vdisplay) + (mode->vtotal -
> > > mode->vdisplay) # bypass 10 for now
> > > => mode->vtotal - mode->vsync_end +  mode->vdisplay + mode->vtotal -
> > > mode->vdisplay
> > > => (mode->vtotal - mode->vsync_end) + mode->vtotal
> > > => Back porch + mode->vtotal
> > >
> > > but not
> > > => Back porch + mode->vdisplay
> >
> > Why do you think it should be this result?
>
> This is what the commit messages mentioned. which indeed true.
>
> "The current calculation for the video start delay in the current DSI driver
> is that it is the total vertical size, minus the front porch and sync length,
> plus 1. This equals to the active vertical size plus the back porch plus 1."
>
> But the result of the logic is
> => Back porch + mode->vtotal

Again, that commit was assuming that the back porch contained the sync
period, which doesn't seem to be the case. So I'll ask again, what
makes you say this isn't true?

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-03-19 10:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08  9:53 [PATCH v2 0/9] drm/sun4i: dsi: Add burst mode support Maxime Ripard
2019-02-08  9:53 ` [PATCH v2 1/9] fixup! ARM: dts: sun8i-a33: bridgemate: Enable display support Maxime Ripard
2019-02-08  9:57   ` Maxime Ripard
2019-02-08  9:53 ` [PATCH v2 2/9] drm/sun4i: dsi: Restrict DSI tcon clock divider Maxime Ripard
2019-02-08  9:53 ` [PATCH v2 3/9] drm/sun4i: dsi: Change the start delay calculation Maxime Ripard
2019-03-07 17:54   ` Jagan Teki
2019-03-11 14:12     ` Maxime Ripard
2019-03-11 14:37       ` Jagan Teki
2019-03-19 10:18         ` Maxime Ripard [this message]
2019-02-08  9:53 ` [PATCH v2 4/9] drm/sun4i: dsi: Enforce boundaries on the start delay Maxime Ripard
2019-02-08  9:53 ` [PATCH v2 5/9] drm/sun4i: dsi: Fix front vs back porch calculation Maxime Ripard
2019-02-08  9:53 ` [PATCH v2 6/9] drm/sun4i: dsi: Fix DRQ calculation Maxime Ripard
2019-02-08  9:53 ` [PATCH v2 7/9] drm/sun4i: dsi: Rework a bit the hblk calculation Maxime Ripard
2019-02-08  9:53 ` [PATCH v2 8/9] drm/sun4i: dsi: Add burst support Maxime Ripard
2019-02-08  9:53 ` [PATCH v2 9/9] drm/panel: Add Ronbo RB070D30 panel Maxime Ripard
2019-02-08 12:24   ` Konstantin Sudakov
2019-02-11 14:40     ` Maxime Ripard
2019-02-08 18:21   ` Sam Ravnborg

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=20190319101849.a5vzwfkm7sg7wh2l@flea \
    --to=maxime.ripard@bootlin.com \
    --cc=bbrezillon@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jagan@amarulasolutions.com \
    --cc=jagan@openedev.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=seanpaul@chromium.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=wens@csie.org \
    /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 NNTP newsgroup(s).