All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinay Simha B N <simhavcs@gmail.com>
To: Jiri Vanek <jirivanek1@gmail.com>
Cc: Jonas Karlman <jonas@kwiboo.se>, David Airlie <airlied@linux.ie>,
	Robert Foss <robert.foss@linaro.org>,
	"open list:DRM PANEL DRIVERS" <dri-devel@lists.freedesktop.org>,
	Neil Armstrong <narmstrong@baylibre.com>,
	open list <linux-kernel@vger.kernel.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH 2/2] drm/bridge/tc358775: Fix DSI clock division for vsync delay calculation
Date: Fri, 17 Jun 2022 10:03:40 +0530	[thread overview]
Message-ID: <CAGWqDJ6Boq5x4DofKx=US_Yx6_46JGTHuaLbEKq-uXRAz-35AA@mail.gmail.com> (raw)
In-Reply-To: <20220615222221.1501-3-jirivanek1@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1497 bytes --]

Reviewed-by: Vinay Simha BN <simhavcs@gmail.com>

On Thu, Jun 16, 2022 at 3:55 AM Jiri Vanek <jirivanek1@gmail.com> wrote:

> Use the same PCLK divide option (divide DSI clock to generate pixel clock)
> which is set to LVDS Configuration Register (LVCFG) also for a VSync delay
> calculation. Without this change an auxiliary variable could underflow
> during the calculation for some dual-link LVDS panels and then calculated
> VSync delay is wrong. This leads to a shifted picture on a panel.
>
> Tested-by: Jiri Vanek <jirivanek1@gmail.com>
> Signed-off-by: Jiri Vanek <jirivanek1@gmail.com>
> ---
>  drivers/gpu/drm/bridge/tc358775.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/tc358775.c
> b/drivers/gpu/drm/bridge/tc358775.c
> index cd2721ab02a9..fecb8558b49a 100644
> --- a/drivers/gpu/drm/bridge/tc358775.c
> +++ b/drivers/gpu/drm/bridge/tc358775.c
> @@ -430,7 +430,7 @@ static void tc_bridge_enable(struct drm_bridge *bridge)
>                 val = TC358775_VPCTRL_MSF(1);
>
>         dsiclk = mode->crtc_clock * 3 * tc->bpc / tc->num_dsi_lanes / 1000;
> -       clkdiv = dsiclk / DIVIDE_BY_3 * tc->lvds_link;
> +       clkdiv = dsiclk / (tc->lvds_link == DUAL_LINK ? DIVIDE_BY_6 :
> DIVIDE_BY_3);
>         byteclk = dsiclk / 4;
>         t1 = hactive * (tc->bpc * 3 / 8) / tc->num_dsi_lanes;
>         t2 = ((100000 / clkdiv)) * (hactive + hback_porch + hsync_len +
> hfront_porch) / 1000;
> --
> 2.30.2
>
>

-- 
regards,
vinaysimha

[-- Attachment #2: Type: text/html, Size: 2156 bytes --]

  reply	other threads:[~2022-06-17  7:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-15 22:22 [PATCH 0/2] Fixes for TC358775 DSI to LVDS bridge Jiri Vanek
2022-06-15 22:22 ` Jiri Vanek
2022-06-15 22:22 ` [PATCH 1/2] drm/bridge/tc358775: Return before displaying inappropriate error message Jiri Vanek
2022-06-15 22:22   ` Jiri Vanek
2022-06-17  4:32   ` Vinay Simha B N
2022-06-15 22:22 ` [PATCH 2/2] drm/bridge/tc358775: Fix DSI clock division for vsync delay calculation Jiri Vanek
2022-06-15 22:22   ` Jiri Vanek
2022-06-17  4:33   ` Vinay Simha B N [this message]
2022-06-20 19:43 ` [PATCH 0/2] Fixes for TC358775 DSI to LVDS bridge Robert Foss
2022-06-20 19:43   ` Robert Foss

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='CAGWqDJ6Boq5x4DofKx=US_Yx6_46JGTHuaLbEKq-uXRAz-35AA@mail.gmail.com' \
    --to=simhavcs@gmail.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jirivanek1@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=robert.foss@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.