public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jernej Škrabec" <jernej.skrabec@siol.net>
To: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: wens@csie.org, airlied@linux.ie, robh+dt@kernel.org,
	mark.rutland@arm.com, mturquette@baylibre.com, sboyd@kernel.org,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-sunxi@googlegroups.com
Subject: Re: [PATCH 08/15] drm/sun4i: Fix polarity configuration for DW HDMI PHY
Date: Mon, 26 Feb 2018 17:19:58 +0100	[thread overview]
Message-ID: <2043407.cqGGRsJjYq@jernej-laptop> (raw)
In-Reply-To: <20180226093930.mipjyr6sr35ldkw6@flea.lan>

Hi,

Dne ponedeljek, 26. februar 2018 ob 10:39:30 CET je Maxime Ripard napisal(a):
> Hi,
> 
> On Sat, Feb 24, 2018 at 10:45:38PM +0100, Jernej Skrabec wrote:
> > Current polarity configuration code is cleary wrong since it compares
> > same flag two times. However, even if flag name is fixed, it won't work
> > well for resolutions which have one polarity positive and another
> > negative.
> > 
> > Fix that by properly set each bit according to each polarity. Since
> > those two bits are not described in any documentation, relationships
> > were obtained by experimentation.
> > 
> > Fixes: b7c7436a5ff0 ("drm/sun4i: Implement A83T HDMI driver")
> > 
> > Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> > ---
> > 
> >  drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 9 +++++----
> >  1 file changed, 5 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c
> > b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c index e5bfcdd43ec9..f48e8b70fabe
> > 100644
> > --- a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c
> > +++ b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c
> > @@ -35,10 +35,11 @@ static int sun8i_hdmi_phy_config(struct dw_hdmi *hdmi,
> > void *data,> 
> >  	struct sun8i_hdmi_phy *phy = (struct sun8i_hdmi_phy *)data;
> >  	u32 val = 0;
> > 
> > -	if ((mode->flags & DRM_MODE_FLAG_NHSYNC) &&
> > -	    (mode->flags & DRM_MODE_FLAG_NHSYNC)) {
> > -		val = 0x03;
> > -	}
> > +	if (mode->flags & DRM_MODE_FLAG_NHSYNC)
> > +		val |= 0x01;
> > +
> > +	if (mode->flags & DRM_MODE_FLAG_NVSYNC)
> > +		val |= 0x02;
> 
> Can you introduce defines for those?

Of course.

Best regards,
Jernej

  reply	other threads:[~2018-02-26 16:19 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-24 21:45 [PATCH 00/15] Implement H3/H5 HDMI driver Jernej Skrabec
     [not found] ` <20180224214545.3740-1-jernej.skrabec-gGgVlfcn5nU@public.gmane.org>
2018-02-24 21:45   ` [PATCH 01/15] clk: sunxi-ng: Add check for minimal rate to NM PLLs Jernej Skrabec
2018-02-26  9:38     ` Maxime Ripard
     [not found]       ` <20180226093800.uwbo54wrdcwmsyzh-ZC1Zs529Oq4@public.gmane.org>
2018-02-26  9:43         ` Chen-Yu Tsai
2018-02-26 10:25           ` Maxime Ripard
2018-02-26 10:28             ` Chen-Yu Tsai
2018-02-26 16:17         ` Jernej Škrabec
2018-02-24 21:45   ` [PATCH 02/15] clk: sunxi-ng: h3: h5: Add minimal rate for video PLL Jernej Skrabec
2018-02-24 21:45   ` [PATCH 03/15] clk: sunxi-ng: h3: h5: Allow some clocks to set parent rate Jernej Skrabec
2018-02-24 21:45   ` [PATCH 04/15] clk: sunxi-ng: h3: h5: export CLK_PLL_VIDEO Jernej Skrabec
2018-02-24 21:45   ` [PATCH 05/15] dt-bindings: display: sun4i-drm: Add compatibles for H3 HDMI pipeline Jernej Skrabec
2018-02-24 21:45   ` [PATCH 06/15] drm/sun4i: Add support for H3 display engine Jernej Skrabec
2018-02-24 21:45   ` [PATCH 07/15] drm/sun4i: Add support for H3 mixer 0 Jernej Skrabec
2018-02-24 21:45   ` [PATCH 08/15] drm/sun4i: Fix polarity configuration for DW HDMI PHY Jernej Skrabec
2018-02-26  9:39     ` Maxime Ripard
2018-02-26 16:19       ` Jernej Škrabec [this message]
2018-02-24 21:45   ` [PATCH 09/15] drm/sun4i: Add support for variants to " Jernej Skrabec
2018-02-24 21:45   ` [PATCH 10/15] drm/sun4i: Move and expand DW HDMI PHY register macros Jernej Skrabec
2018-02-24 21:45   ` [PATCH 11/15] drm/sun4i: Add support for H3 HDMI PHY variant Jernej Skrabec
     [not found]     ` <20180224214545.3740-12-jernej.skrabec-gGgVlfcn5nU@public.gmane.org>
2018-02-26 16:24       ` Jernej Škrabec
2018-02-24 21:45   ` [PATCH 12/15] drm/sun4i: Allow building on arm64 Jernej Skrabec
     [not found]     ` <20180224214545.3740-13-jernej.skrabec-gGgVlfcn5nU@public.gmane.org>
2018-02-27  2:18       ` kbuild test robot
2018-02-24 21:45   ` [PATCH 13/15] ARM: dts: sunxi: h3/h5: Add HDMI pipeline Jernej Skrabec
2018-02-24 21:45   ` [PATCH 14/15] ARM: dts: sun8i: h3: Enable HDMI output on H3 boards Jernej Skrabec
     [not found]     ` <20180224214545.3740-15-jernej.skrabec-gGgVlfcn5nU@public.gmane.org>
2018-02-25  8:11       ` Julian Calaby
     [not found]         ` <CAGRGNgWgkfax2TUSjK4397i678gXTTLh80r2HWwTB6u0GM0Cuw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-25  8:43           ` Icenowy Zheng
     [not found]             ` <E26547A5-F219-4310-B0E6-49AC3A700566-h8G6r0blFSE@public.gmane.org>
2018-02-25  9:06               ` Julian Calaby
     [not found]                 ` <CAGRGNgXosix84T3i4y0_ct4eiDSq9ef-dfo3soU54Or42bjxbQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-25  9:08                   ` Icenowy Zheng
2018-02-26 16:16           ` Jernej Škrabec
2018-02-26 16:21             ` Icenowy Zheng
     [not found]               ` <4AA78C45-E139-417E-BE89-FE0BFBC409B0-h8G6r0blFSE@public.gmane.org>
2018-02-26 16:27                 ` Jernej Škrabec
2018-02-27  2:29                   ` Julian Calaby
2018-02-27  7:07                     ` [linux-sunxi] " Maxime Ripard
2018-02-27 10:35                       ` Julian Calaby
2018-02-24 21:45   ` [PATCH 15/15] ARM64: dts: sun50i: h5: Enable HDMI output on H5 boards Jernej Skrabec

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=2043407.cqGGRsJjYq@jernej-laptop \
    --to=jernej.skrabec@siol.net \
    --cc=airlied@linux.ie \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --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