Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1648001

Re: [linux-sunxi] Re: [RFC PATCH 07/11] drm: sun4i: add support for the TV encoder in H3 SoC

From Maxime Ripard <maxime.ripard@free-electrons.com>
Newsgroups linux.kernel
Subject Re: [linux-sunxi] Re: [RFC PATCH 07/11] drm: sun4i: add support for the TV encoder in H3 SoC
Date 2017-05-23 15:00 +0200
Message-ID <tKhzP-3jV-5@gated-at.bofh.it> (permalink)
References <tIaj7-5vV-9@gated-at.bofh.it> <tIUP0-5Wm-5@gated-at.bofh.it> <tJ1x7-2sf-1@gated-at.bofh.it> <tJZMB-gQ-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Mon, May 22, 2017 at 07:55:56PM +0200, Jernej Škrabec wrote:
> Hi,
> 
> Dne sobota, 20. maj 2017 ob 03:37:53 CEST je Chen-Yu Tsai napisal(a):
> > On Sat, May 20, 2017 at 2:23 AM, Jernej Škrabec <jernej.skrabec@siol.net> 
> wrote:
> > > Hi,
> > > 
> > > Dne petek, 19. maj 2017 ob 20:08:18 CEST je Icenowy Zheng napisal(a):
> > >> 于 2017年5月20日 GMT+08:00 上午2:03:30, Maxime Ripard <maxime.ripard@free-
> > > 
> > > electrons.com> 写到:
> > >> >On Thu, May 18, 2017 at 12:43:50AM +0800, Icenowy Zheng wrote:
> > >> >> Allwinner H3 features a TV encoder similar to the one in earlier
> > >> >
> > >> >SoCs,
> > >> >
> > >> >> but with some different points about clocks:
> > >> >> - It has a mod clock and a bus clock.
> > >> >> - The mod clock must be at a fixed rate to generate signal.
> > >> >
> > >> >Why?
> > >> 
> > >> It's experiment result by Jernej.
> > >> 
> > >> The clock rates in BSP kernel is also specially designed
> > >> (PLL_DE at 432MHz) in order to be able to feed the TVE.
> > > 
> > > My experiments and search through BSP code showed that TVE seems to have
> > > additional fixed predivider 8. So if you want to generate 27 MHz clock,
> > > unit has to be feed with 216 MHz.
> > > 
> > > TVE has only one PLL source PLL_DE. And since 216 MHz is a bit low for
> > > DE2,
> > > BSP defaults to 432 MHz for PLL_DE and use divider 2 to generate 216 MHz.
> > > This clock is then divided by 8 internaly to get final 27 MHz.
> > > 
> > > Please note that I don't have any hard evidence to support that, only
> > > experimental data. However, only that explanation make sense to me.
> > > 
> > > BTW, BSP H3/H5 TV driver supports only PAL and NTSC which both use 27 MHz
> > > base clock. Further experiments are needed to check if there is any
> > > possibility to have other resolutions by manipulating clocks and give
> > > other proper settings. I plan to do that, but not in very near future.
> > 
> > You only have composite video output, and those are the only 2 standard
> > resolutions that make any sense.
> 
> Right, other resolutions are for VGA.
> 
> Anyway, I did some more digging in A10 and R40 datasheets. I think that H3 TVE 
> unit is something in between. R40 TVE has a setting to select "up sample".

That might be just another translation of oversampling :)

I didn't know it could be applied to composite signals though, but I
guess this is just another analog signal after all.

> Possible settings are 27 MHz, 54 MHz, 108 MHz and 216 MHz. BSP driver on R40 
> has this setting enabled only for PAL and NTSC and it is always 216 MHz. I 
> think that H3 may have this hardwired to 216 MHz and this would be the reason 
> why 216 MHz is needed.
> 
> Has anyone else any better explanation?

That's already a pretty good one.

Either way, wether this is upsampling, oversampling or just a
pre-divider, this can and should be dealt with in the mode_set
callback, and not in the probe.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH 00/11] Support for H3 Composite Output support Icenowy Zheng <icenowy@aosc.io> - 2017-05-17 18:50 +0200
  [RFC PATCH 11/11] [DO NOT MERGE] ARM: sun8i: h3: enable TV output on Orange Pi PC Icenowy Zheng <icenowy@aosc.io> - 2017-05-17 18:50 +0200
  [RFC PATCH 01/11] dt-bindings: update the binding for Allwinner H3 TVE support Icenowy Zheng <icenowy@aosc.io> - 2017-05-17 18:50 +0200
    Re: [RFC PATCH 01/11] dt-bindings: update the binding for Allwinner H3 TVE support Icenowy Zheng <icenowy@aosc.io> - 2017-05-19 20:10 +0200
      Re: [linux-sunxi] Re: [RFC PATCH 01/11] dt-bindings: update the  binding for Allwinner H3 TVE support Chen-Yu Tsai <wens@csie.org> - 2017-05-20 04:10 +0200
    Re: [RFC PATCH 01/11] dt-bindings: update the binding for Allwinner  H3 TVE support Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-05-19 20:10 +0200
  [RFC PATCH 03/11] drm: sun4i: ignore swapped mixer<->tcon connection for DE2 Icenowy Zheng <icenowy@aosc.io> - 2017-05-17 18:50 +0200
    Re: [RFC PATCH 03/11] drm: sun4i: ignore swapped mixer<->tcon connection for DE2 Icenowy Zheng <icenowy@aosc.io> - 2017-05-19 20:10 +0200
      Re: [RFC PATCH 03/11] drm: sun4i: ignore swapped mixer<->tcon  connection for DE2 Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-05-24 10:20 +0200
    Re: [RFC PATCH 03/11] drm: sun4i: ignore swapped mixer<->tcon  connection for DE2 Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-05-19 20:10 +0200
  [RFC PATCH 05/11] drm: sun4i: add compatible for H3 display engine Icenowy Zheng <icenowy@aosc.io> - 2017-05-17 18:50 +0200
  [RFC PATCH 02/11] drm: sun4i: add support for H3 mixers Icenowy Zheng <icenowy@aosc.io> - 2017-05-17 18:50 +0200
    Re: [linux-sunxi] Re: [RFC PATCH 02/11] drm: sun4i: add support for H3 mixers Icenowy Zheng <icenowy@aosc.io> - 2017-05-19 20:00 +0200
      Re: [linux-sunxi] Re: [RFC PATCH 02/11] drm: sun4i: add support for H3 mixers Jernej Škrabec <jernej.skrabec@siol.net> - 2017-05-19 20:20 +0200
    Re: [RFC PATCH 02/11] drm: sun4i: add support for H3 mixers Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-05-19 20:00 +0200
  [RFC PATCH 04/11] drm: sun4i: add support for H3's TCON0/1 Icenowy Zheng <icenowy@aosc.io> - 2017-05-17 19:00 +0200
  [RFC PATCH 09/11] clk: sunxi-ng: export CLK_PLL_DE for H3 Icenowy Zheng <icenowy@aosc.io> - 2017-05-17 19:10 +0200
  [RFC PATCH 10/11] ARM: sun8i: h3: add display engine pipeline for TVE Icenowy Zheng <icenowy@aosc.io> - 2017-05-17 19:10 +0200
    Re: [linux-sunxi] [RFC PATCH 10/11] ARM: sun8i: h3: add display engine pipeline for TVE Jernej Škrabec <jernej.skrabec@siol.net> - 2017-05-17 22:30 +0200
    Re: [RFC PATCH 10/11] ARM: sun8i: h3: add display engine pipeline  for TVE Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-05-19 20:10 +0200
      Re: [linux-sunxi] Re: [RFC PATCH 10/11] ARM: sun8i: h3: add display engine pipeline for TVE Icenowy Zheng <icenowy@aosc.io> - 2017-05-19 20:30 +0200
        Re: [linux-sunxi] Re: [RFC PATCH 10/11] ARM: sun8i: h3: add display  engine pipeline for TVE Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-05-24 10:30 +0200
    Re: [linux-sunxi] [RFC PATCH 10/11] ARM: sun8i: h3: add display  engine pipeline for TVE Chen-Yu Tsai <wens@csie.org> - 2017-05-24 07:30 +0200
      Re: [linux-sunxi] [RFC PATCH 10/11] ARM: sun8i: h3: add display engine pipeline for TVE Icenowy Zheng <icenowy@aosc.io> - 2017-05-24 07:30 +0200
        Re: [linux-sunxi] [RFC PATCH 10/11] ARM: sun8i: h3: add display engine pipeline for TVE Icenowy Zheng <icenowy@aosc.io> - 2017-05-24 07:40 +0200
        Re: [linux-sunxi] [RFC PATCH 10/11] ARM: sun8i: h3: add display  engine pipeline for TVE Chen-Yu Tsai <wens@csie.org> - 2017-05-24 07:40 +0200
  [RFC PATCH 06/11] drm: sun4i: add color space correction support for DE2 mixer Icenowy Zheng <icenowy@aosc.io> - 2017-05-17 19:10 +0200
    Re: [linux-sunxi] [RFC PATCH 06/11] drm: sun4i: add color space correction support for DE2 mixer Jernej Škrabec <jernej.skrabec@siol.net> - 2017-05-17 22:30 +0200
  [RFC PATCH 07/11] drm: sun4i: add support for the TV encoder in H3 SoC Icenowy Zheng <icenowy@aosc.io> - 2017-05-17 19:10 +0200
    Re: [RFC PATCH 07/11] drm: sun4i: add support for the TV encoder in  H3 SoC Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-05-19 20:10 +0200
      Re: [RFC PATCH 07/11] drm: sun4i: add support for the TV encoder in H3 SoC Icenowy Zheng <icenowy@aosc.io> - 2017-05-19 20:10 +0200
        Re: [linux-sunxi] Re: [RFC PATCH 07/11] drm: sun4i: add support for the TV encoder in H3 SoC Jernej Škrabec <jernej.skrabec@siol.net> - 2017-05-19 20:30 +0200
          Re: [linux-sunxi] Re: [RFC PATCH 07/11] drm: sun4i: add support for  the TV encoder in H3 SoC Chen-Yu Tsai <wens@csie.org> - 2017-05-20 03:40 +0200
            Re: [linux-sunxi] Re: [RFC PATCH 07/11] drm: sun4i: add support for the TV encoder in H3 SoC Jernej Škrabec <jernej.skrabec@siol.net> - 2017-05-22 20:00 +0200
              Re: [linux-sunxi] Re: [RFC PATCH 07/11] drm: sun4i: add support for the TV encoder in H3 SoC Icenowy Zheng <icenowy@aosc.io> - 2017-05-23 15:00 +0200
              Re: [linux-sunxi] Re: [RFC PATCH 07/11] drm: sun4i: add support for  the TV encoder in H3 SoC Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-05-23 15:00 +0200
                Re: [linux-sunxi] Re: [RFC PATCH 07/11] drm: sun4i: add support for  the TV encoder in H3 SoC icenowy@aosc.io - 2017-05-23 15:10 +0200
                Re: [linux-sunxi] Re: [RFC PATCH 07/11] drm: sun4i: add support for  the TV encoder in H3 SoC Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-05-24 09:40 +0200
                Re: [linux-sunxi] Re: [RFC PATCH 07/11] drm: sun4i: add support for the TV encoder in H3 SoC Icenowy Zheng <icenowy@aosc.io> - 2017-05-24 10:30 +0200
                Re: [linux-sunxi] Re: [RFC PATCH 07/11] drm: sun4i: add support for the TV encoder in H3 SoC Jernej Škrabec <jernej.skrabec@siol.net> - 2017-05-24 17:30 +0200
  [RFC PATCH 08/11] clk: sunxi-ng: allow CLK_DE to set CLK_PLL_DE for H3 Icenowy Zheng <icenowy@aosc.io> - 2017-05-17 19:10 +0200

csiph-web