From: icenowy-h8G6r0blFSE@public.gmane.org
To: Maxime Ripard
<maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Cc: Mike Turquette
<mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
Daniel Vetter
<daniel.vetter-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
David Airlie <airlied-cv59FeDIM0c@public.gmane.org>,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
linux-kernel-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2 14/20] drm/sun4i: tcon: multiply the vtotal when not in interlace
Date: Fri, 05 May 2017 16:16:29 +0800 [thread overview]
Message-ID: <3683ca88e5dd7ab9f26f1c12beb15cb8@aosc.io> (raw)
In-Reply-To: <59bdbadc4d3adc6d75c2cef38df0af332bd313db.1493812478.git-series.maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
在 2017-05-03 19:59,Maxime Ripard 写道:
> It appears that the total vertical resolution needs to be doubled when
> we're not in interlaced. Make sure that is the case.
>
> Signed-off-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> ---
> drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c
> b/drivers/gpu/drm/sun4i/sun4i_tcon.c
> index 0f91ec8a4b26..efa079c1a3f5 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
> @@ -272,9 +272,9 @@ void sun4i_tcon1_mode_set(struct sun4i_tcon *tcon,
> /* Set vertical display timings */
> bp = mode->crtc_vtotal - mode->crtc_vsync_start;
> DRM_DEBUG_DRIVER("Setting vertical total %d, backporch %d\n",
> - mode->vtotal, bp);
> + mode->crtc_vtotal, bp);
> regmap_write(tcon->regs, SUN4I_TCON1_BASIC4_REG,
> - SUN4I_TCON1_BASIC4_V_TOTAL(mode->vtotal) |
> + SUN4I_TCON1_BASIC4_V_TOTAL(mode->crtc_vtotal * 2) |
For TVE the value should directly be mode->vtotal, but not
mode->crtc_vtotal * 2.
vtotal is 625 when PAL. crtc_vtotal is thus 312, but if we restore the
vtotal value by doubling crtv_vtotal, we got 624, which will lead to
instability of the image displayed. (the image will loop to go higher
and then go lower, because wrong vtotal value)
Tested on patched H3 TV encoder.
I used a logic slightly changed from your v1 code:
```
val = mode->vtotal;
if (!(mode->flags & DRM_MODE_FLAG_INTERLACE))
val = val * 2;
regmap_write(tcon->regs, SUN4I_TCON1_BASIC4_REG,
SUN4I_TCON1_BASIC4_V_TOTAL(val) |
SUN4I_TCON1_BASIC4_V_BACKPORCH(bp));
```
> SUN4I_TCON1_BASIC4_V_BACKPORCH(bp));
>
> /* Set Hsync and Vsync length */
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-05-05 8:16 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-03 11:59 [PATCH v2 0/20] drm: sun4i: Add support for the HDMI controller Maxime Ripard
2017-05-03 11:59 ` [PATCH v2 1/20] clk: divider: Make divider_round_rate take the parent clock Maxime Ripard
[not found] ` <9c2f3ed66ae32e55721bfced41dfd70e49cb746c.1493812478.git-series.maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-05-03 12:53 ` Chen-Yu Tsai
[not found] ` <cover.d697f34bb7b0605c5e76cbc4167a64453e5e0984.1493812478.git-series.maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-05-03 11:59 ` [PATCH v2 2/20] clk: sunxi-ng: Pass the parent and a pointer to the clocks round rate Maxime Ripard
2017-05-04 3:19 ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 3/20] clk: sunxi-ng: div: Switch to divider_round_rate Maxime Ripard
2017-05-04 3:20 ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 4/20] clk: sunxi-ng: mux: Don't just rely on the parent for CLK_SET_RATE_PARENT Maxime Ripard
[not found] ` <27fcae13e64ef86d32001478f1923e9a02deb7b8.1493812478.git-series.maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-05-04 3:23 ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 5/20] clk: sunxi-ng: mux: split out the pre-divider computation code Maxime Ripard
[not found] ` <fcda95612e72a1a5bb6010993181e638a41511e9.1493812478.git-series.maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-05-04 3:25 ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 6/20] clk: sunxi-ng: mux: Change pre-divider application function prototype Maxime Ripard
2017-05-04 3:27 ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 7/20] clk: sunxi-ng: mux: Re-adjust parent rate Maxime Ripard
[not found] ` <0d8fc6d976c64be906fa86ead20aa10bb490386b.1493812478.git-series.maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-05-04 3:28 ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 8/20] clk: sunxi-ng: sun5i: Export video PLLs Maxime Ripard
[not found] ` <1fc17b7a14830306a83747b5086c0fd5d6dff290.1493812478.git-series.maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-05-04 3:28 ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 9/20] drm/sun4i: tcon: Add channel debug Maxime Ripard
2017-05-03 11:59 ` [PATCH v2 10/20] drm/sun4i: tcon: Move the muxing out of the mode set function Maxime Ripard
[not found] ` <ea29ffd2bc3c76203168d0fd1e969b045424b24c.1493812478.git-series.maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-05-04 3:54 ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 11/20] drm/sun4i: tcon: Switch mux on only for composite Maxime Ripard
[not found] ` <9f97dbff6f99c108b5f4b7f144d02dde8c253ab6.1493812478.git-series.maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-05-04 3:57 ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 12/20] drm/sun4i: tcon: Fix tcon channel 1 backporch calculation Maxime Ripard
2017-05-03 11:59 ` [PATCH v2 13/20] drm/sun4i: tcon: Change vertical total size computation inconsistency Maxime Ripard
2017-05-04 3:58 ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 14/20] drm/sun4i: tcon: multiply the vtotal when not in interlace Maxime Ripard
[not found] ` <59bdbadc4d3adc6d75c2cef38df0af332bd313db.1493812478.git-series.maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-05-04 4:07 ` Chen-Yu Tsai
2017-05-05 8:16 ` icenowy-h8G6r0blFSE [this message]
2017-05-03 11:59 ` [PATCH v2 15/20] drm/sun4i: Ignore the generic connectors for components Maxime Ripard
[not found] ` <88de0f79b508e51b5fbf38fac058921a3c748807.1493812478.git-series.maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-05-04 4:11 ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 16/20] dt-bindings: display: sun4i: Add HDMI display bindings Maxime Ripard
[not found] ` <0941a11259b2dba88d235c6ad713e3451d385028.1493812478.git-series.maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-05-08 16:20 ` Rob Herring
2017-05-03 11:59 ` [PATCH v2 17/20] dt-bindings: display: sun4i: Add allwinner,tcon-channel property Maxime Ripard
[not found] ` <2f00be9d75b68090ffed30654be65132a156a317.1493812478.git-series.maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-05-08 16:24 ` Rob Herring
2017-05-03 11:59 ` [PATCH v2 18/20] drm/sun4i: Add HDMI support Maxime Ripard
[not found] ` <c8db196b5084b317c3a43a0caea1363951e6e5bf.1493812478.git-series.maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-05-04 7:55 ` Chen-Yu Tsai
[not found] ` <CAGb2v67k1if5UwPsfJRgpHDR2=U3xF2BCZDeYThs=CoWAH+aKw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-12 6:50 ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 19/20] ARM: sun5i: a10s: Add the HDMI controller node Maxime Ripard
[not found] ` <1e3ddf81459adbab455b2211fe6b78bd6cf1bbec.1493812478.git-series.maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-05-04 8:04 ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 20/20] ARM: sun5i: a10s-olinuxino: Enable HDMI Maxime Ripard
[not found] ` <c7ac6faa0568e6418291255af537c4b070bdea63.1493812478.git-series.maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-05-04 8:05 ` Chen-Yu Tsai
2017-05-10 19:23 ` [linux-sunxi] " Maxime Ripard
[not found] ` <20170510192358.taufs5tsyifueued-YififvaboMKzQB+pC5nmwQ@public.gmane.org>
2017-05-11 6:25 ` icenowy-h8G6r0blFSE
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=3683ca88e5dd7ab9f26f1c12beb15cb8@aosc.io \
--to=icenowy-h8g6r0blfse@public.gmane.org \
--cc=airlied-cv59FeDIM0c@public.gmane.org \
--cc=daniel.vetter-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
--cc=mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=wens-jdAy2FN1RRM@public.gmane.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).