LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Xin Ji <xji@analogixsemi.com>
To: Robert Foss <robert.foss@linaro.org>
Cc: Nicolas Boichat <drinkcat@google.com>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Boris Brezillon <boris.brezillon@collabora.com>,
	Sam Ravnborg <sam@ravnborg.org>,
	Hsin-Yi Wang <hsinyi@chromium.org>, Torsten Duwe <duwe@lst.de>,
	Vasily Khoruzhick <anarsoul@gmail.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Bernie Liang <bliang@analogixsemi.com>,
	Qilin Wen <qwen@analogixsemi.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	devel@driverdev.osuosl.org
Subject: Re: [PATCH v1 1/1] drm/bridge: anx7625: Tune K value for IVO panel
Date: Fri, 6 Aug 2021 16:58:29 +0800	[thread overview]
Message-ID: <20210806085829.GA2189624@anxtwsw-Precision-3640-Tower> (raw)
In-Reply-To: <CAG3jFyuGJZ4ig6nFxXJJ0d-7ob2+=po2cxSuN29wedV5xVE+gA@mail.gmail.com>

On Thu, Aug 05, 2021 at 09:05:29PM +0200, Robert Foss wrote:
> Hey Xin,
> 
> Thanks for submitting this.
> 
> On Thu, 5 Aug 2021 at 09:31, Xin Ji <xji@analogixsemi.com> wrote:
> >
> > IVO panel require less input video clock variation than video clock
> > variation in DP CTS spec.
> >
> > This patch decreases the K value of ANX7625 which will shrink eDP Tx
> > video clock variation to meet IVO panel's requirement.
> >
> > Signed-off-by: Xin Ji <xji@analogixsemi.com>
> > ---
> >  drivers/gpu/drm/bridge/analogix/anx7625.c | 17 ++++++++++++++---
> >  drivers/gpu/drm/bridge/analogix/anx7625.h |  4 +++-
> >  2 files changed, 17 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
> > index a3d82377066b..ceed1c7f3f28 100644
> > --- a/drivers/gpu/drm/bridge/analogix/anx7625.c
> > +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
> > @@ -384,6 +384,18 @@ static int anx7625_odfc_config(struct anx7625_data *ctx,
> >         return ret;
> >  }
> >
> > +static int anx7625_set_k_value(struct anx7625_data *ctx)
> 
> Pardon my ignorance, but I don't know what a K-value is. Could you add
> a comment detailing
> what the K-value does?

Hi Robert Foss, OK, I'll add more comment.
Thanks,
Xin
> 
> > +{
> > +       struct edid *edid = (struct edid *)ctx->slimport_edid_p.edid_raw_data;
> > +
> > +       if (edid->mfg_id[0] == IVO_MID0 && edid->mfg_id[1] == IVO_MID1)
> > +               return anx7625_reg_write(ctx, ctx->i2c.rx_p1_client,
> > +                                        MIPI_DIGITAL_ADJ_1, 0x3B);
> > +
> > +       return anx7625_reg_write(ctx, ctx->i2c.rx_p1_client,
> > +                                MIPI_DIGITAL_ADJ_1, 0x3D);
> > +}
> > +
> >  static int anx7625_dsi_video_timing_config(struct anx7625_data *ctx)
> >  {
> >         struct device *dev = &ctx->client->dev;
> > @@ -470,9 +482,8 @@ static int anx7625_dsi_video_timing_config(struct anx7625_data *ctx)
> >                         MIPI_PLL_N_NUM_15_8, (n >> 8) & 0xff);
> >         ret |= anx7625_reg_write(ctx, ctx->i2c.rx_p1_client, MIPI_PLL_N_NUM_7_0,
> >                         (n & 0xff));
> > -       /* Diff */
> > -       ret |= anx7625_reg_write(ctx, ctx->i2c.rx_p1_client,
> > -                       MIPI_DIGITAL_ADJ_1, 0x3D);
> > +       /* Diff and K value */
> 
> With a proper comment above, this comment is no longer needed.
OK
> 
> > +       anx7625_set_k_value(ctx);
> >
> >         ret |= anx7625_odfc_config(ctx, post_divider - 1);
> >
> > diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.h b/drivers/gpu/drm/bridge/analogix/anx7625.h
> > index 034c3840028f..6dcf64c703f9 100644
> > --- a/drivers/gpu/drm/bridge/analogix/anx7625.h
> > +++ b/drivers/gpu/drm/bridge/analogix/anx7625.h
> > @@ -210,7 +210,9 @@
> >  #define  MIPI_VIDEO_STABLE_CNT           0x0A
> >
> >  #define  MIPI_LANE_CTRL_10               0x0F
> > -#define  MIPI_DIGITAL_ADJ_1   0x1B
> > +#define  MIPI_DIGITAL_ADJ_1     0x1B
> > +#define  IVO_MID0               0x26
> > +#define  IVO_MID1               0xCF
> >
> >  #define  MIPI_PLL_M_NUM_23_16   0x1E
> >  #define  MIPI_PLL_M_NUM_15_8    0x1F
> > --
> > 2.25.1
> >
> 
> LGTM with the above fix.
> 
> Reviewed-by: Robert Foss <robert.foss@linaro.org>

  reply	other threads:[~2021-08-06  8:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-05  7:30 Xin Ji
2021-08-05 19:05 ` Robert Foss
2021-08-06  8:58   ` Xin Ji [this message]
     [not found] ` <YQw9AKozQCPzk1wh@ravnborg.org>
2021-08-06  9:00   ` Xin Ji

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=20210806085829.GA2189624@anxtwsw-Precision-3640-Tower \
    --to=xji@analogixsemi.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=anarsoul@gmail.com \
    --cc=bliang@analogixsemi.com \
    --cc=boris.brezillon@collabora.com \
    --cc=dan.carpenter@oracle.com \
    --cc=daniel@ffwll.ch \
    --cc=devel@driverdev.osuosl.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=drinkcat@google.com \
    --cc=duwe@lst.de \
    --cc=hsinyi@chromium.org \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=narmstrong@baylibre.com \
    --cc=qwen@analogixsemi.com \
    --cc=robert.foss@linaro.org \
    --cc=sam@ravnborg.org \
    --subject='Re: [PATCH v1 1/1] drm/bridge: anx7625: Tune K value for IVO panel' \
    /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

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).