From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jernej Skrabec Subject: Re: [PATCH v7 0/8] drm: sun8i: Add DE2 HDMI video support Date: Wed, 30 Nov 2016 10:04:58 -0800 (PST) Message-ID: <04ccf471-2ae5-4c75-bfd3-88ce49942200@googlegroups.com> References: <2256264.6LWGGhFAiO@avalon> <239b60f3-3ea7-4aa7-8e8d-353e1a1d4ee5@googlegroups.com> <3152670.pRMCOA29o4@avalon> Reply-To: jernej.skrabec-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_13989_24844867.1480529098317" Return-path: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org In-Reply-To: <3152670.pRMCOA29o4@avalon> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: linux-sunxi Cc: jernej.skrabec-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, moinejf-GANU6spQydw@public.gmane.org, airlied-cv59FeDIM0c@public.gmane.org, robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org, kieran.bingham-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org, laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org List-Id: devicetree@vger.kernel.org ------=_Part_13989_24844867.1480529098317 Content-Type: multipart/alternative; boundary="----=_Part_13990_1971241755.1480529098318" ------=_Part_13990_1971241755.1480529098318 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Laurent, Dne sreda, 30. november 2016 09.08.22 UTC+1 je oseba Laurent Pinchart=20 napisala: > > Hi Jernej,=20 > > On Tuesday 29 Nov 2016 15:24:25 Jernej Skrabec wrote:=20 > > Dne torek, 29. november 2016 23.56.31 UTC+1 je oseba Laurent Pinchart= =20 > > napisala:=20 > > > On Tuesday 29 Nov 2016 14:47:20 Jernej Skrabec wrote:=20 > > >> Dne torek, 29. november 2016 22.37.03 UTC+1 je oseba Maxime Ripard= =20 > > > napisala:=20 > > >>> On Tue, Nov 29, 2016 at 11:18:35AM +0100, Jean-Francois Moine wrote= :=20 > > >>>> This patchset series adds HDMI video support to the Allwinner=20 > > >>>> sun8i SoCs which include the display engine 2 (DE2).=20 > > >>>> The driver contains the code for the A83T and H3 SoCs, and=20 > > >>>> some H3 boards, but it could be used/extended for other SoCs=20 > > >>>> (A64, H2, H5) and boards (Banana PIs, Orange PIs).=20 > > >>>=20 > > >>> Honestly, I'm getting a bit worried by the fact that you ignore=20 > > >>> reviews.=20 > > >>>=20 > > >>> On the important reviews that you got that are to be seen as major= =20 > > >>> issues that block the inclusion, we have:=20 > > >>> - The fact that the HDMI driver is actually just a designware IP,= =20 > > >>> and while you should use the driver that already exists, you=20 > just=20 > > >>> duplicated all that code.=20 > > >>=20 > > >> That might be hard thing to do. A83T fits perfectly, but H3 and newe= r=20 > > >> SoCs do not. They are using completely different HDMI phy. Decouplin= g=20 > > >> controller and phy code means rewritting a good portion of the code,= =20 > > >> unless some tricks are applied, like calling phy function pointers,= =20 > if=20 > > >> they are defined.=20 > > >=20 > > > Same HDMI TX but different HDMI TX PHY ? Kieran is working on=20 > decoupling=20 > > > the PHY configuration code for a Renesas SoC, that might be of=20 > interest to=20 > > > you.=20 > >=20 > > Exactly. I'm developing only U-Boot driver, but Jean-Francois will=20 > probably=20 > > have more interest in this.=20 > > We'll post patches as soon as they're ready.=20 > Great. Is datasheet public? I'm curious if HDMI PHY is by any chance=20 similar. =20 > > By the way, do you know if the H3 and newer SoCs use a different PHY from= =20 > Synopsys, or a custom PHY developed by Allwinner ?=20 > > Unfortunatelly, noone managed to identify PHY and Alliwinner never released= =20 a bit of information about HDMI. Does config2_id code 0xFE (PHY type) tell yo= u anything? =20 > > >> Register addresses also differ, but that can be easily solved by=20 > using=20 > > >> undocumented magic value to restore them.=20 > > >=20 > > > I love that :-)=20 > >=20 > > Is it allowed to use magic number which was found in binary blob? I'm= =20 > new in=20 > > all this.=20 > > I don't really see a problem with that, we have many drivers in the kerne= l=20 > that have been developed through reverse-engineering. You should not=20 > include=20 > large pieces of code that have been obtained through decompilation of a= =20 > proprietary binary blob as those could be protected by copyright, but=20 > writing=20 > to undocumented registers based on information found through usage of a= =20 > binary=20 > driver isn't a problem. (Please remember that I'm not a lawyer though)=20 > > > >>> - The fact that you ignored Rob (v6) and I (v5) comment on using= =20 > OF=20 > > >>> graph to model the connection between the display engine and th= e=20 > > >>> TCON. Something that Laurent also pointed out in this version.= =20 > > >>> =20 > > >>> - The fact that you ignored that you needed an HDMI connector nod= e=20 > > >>> as a child of the HDMI controller. This has been reported by Ro= b=20 > > >>> (v6) and yet again in this version by Laurent.=20 > > >>> =20 > > >>> - And finally the fact that we can't have several display engine= =20 > in=20 > > >>> parallel, if needs be. This has happened in the past already on= =20 > > >>> Allwinner SoCs, so it's definitely something we should consider= =20 > in=20 > > >>> the DT bindings, since we can't break them.=20 > > >>>=20 > > >>> Until those are fixed, I cannot see how this driver can be merged,= =20 > > >>> unfortunately.=20 > Best regards, Jernej =C5=A0krabec --=20 You received this message because you are subscribed to the Google Groups "= linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout. ------=_Part_13990_1971241755.1480529098318 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Laurent,

Dne sreda, 30. november 2016 09.08.22 U= TC+1 je oseba Laurent Pinchart napisala:
Hi Jernej,

On Tuesday 29 Nov 2016 15:24:25 Jernej Skrabec wrote:
> Dne torek, 29. november 2016 23.56.31 UTC+1 je oseba Laurent Pinch= art
> napisala:
> > On Tuesday 29 Nov 2016 14:47:20 Jernej Skrabec wrote:
> >> Dne torek, 29. november 2016 22.37.03 UTC+1 je oseba Maxi= me Ripard
> > napisala:
> >>> On Tue, Nov 29, 2016 at 11:18:35AM +0100, Jean-Franco= is Moine wrote:
> >>>> This patchset series adds HDMI video support to t= he Allwinner
> >>>> sun8i SoCs which include the display engine 2 (DE= 2).
> >>>> The driver contains the code for the A83T and H3 = SoCs, and
> >>>> some H3 boards, but it could be used/extended for= other SoCs
> >>>> (A64, H2, H5) and boards (Banana PIs, Orange PIs)= .
> >>>=20
> >>> Honestly, I'm getting a bit worried by the fact t= hat you ignore
> >>> reviews.
> >>>=20
> >>> On the important reviews that you got that are to be = seen as major
> >>> issues that block the inclusion, we have:
> >>> =C2=A0 - The fact that the HDMI driver is actually ju= st a designware IP,
> >>> =C2=A0 =C2=A0 and while you should use the driver tha= t already exists, you just
> >>> =C2=A0 =C2=A0 duplicated all that code.
> >>=20
> >> That might be hard thing to do. A83T fits perfectly, but = H3 and newer
> >> SoCs do not. They are using completely different HDMI phy= . Decoupling
> >> controller and phy code means rewritting a good portion o= f the code,
> >> unless some tricks are applied, like calling phy function= pointers, if
> >> they are defined.
> >=20
> > Same HDMI TX but different HDMI TX PHY ? Kieran is working on= decoupling
> > the PHY configuration code for a Renesas SoC, that might be o= f interest to
> > you.
>=20
> Exactly. I'm developing only U-Boot driver, but Jean-Francois = will probably
> have more interest in this.

We'll post patches as soon as they're ready.

Great. Is datasheet public? I'm curious if HD= MI PHY is by any chance similar.
=C2=A0

By the way, do you know if the H3 and newer SoCs use a different PHY fr= om=20
Synopsys, or a custom PHY developed by Allwinner ?


Unfortunatelly, noone managed to identify PHY and= Alliwinner never released a
bit of information about HDMI. Does config2= _id code 0xFE (PHY type) tell you
anything?
=C2=A0
> >> Register addresses also diffe= r, but that can be easily solved by using
> >> undocumented magic value to restore them.
> >=20
> > I love that :-)
>=20
> Is it allowed to use magic number which was found in binary blob? = I'm new in
> all this.

I don't really see a problem with that, we have many drivers in the= kernel=20
that have been developed through reverse-engineering. You should not in= clude=20
large pieces of code that have been obtained through decompilation of a= =20
proprietary binary blob as those could be protected by copyright, but w= riting=20
to undocumented registers based on information found through usage of a= binary=20
driver isn't a problem. (Please remember that I'm not a lawyer = though)

> >>> =C2=A0 - The fact that you ignored Rob (v6) and I (v5= ) comment on using OF
> >>> =C2=A0 =C2=A0 graph to model the connection between t= he display engine and the
> >>> =C2=A0 =C2=A0 TCON. Something that Laurent also point= ed out in this version.
> >>> =C2=A0=20
> >>> =C2=A0 - The fact that you ignored that you needed an= HDMI connector node
> >>> =C2=A0 =C2=A0 as a child of the HDMI controller. This= has been reported by Rob
> >>> =C2=A0 =C2=A0 (v6) and yet again in this version by L= aurent.
> >>> =C2=A0=20
> >>> =C2=A0 - And finally the fact that we can't have = several display engine in
> >>> =C2=A0 =C2=A0 parallel, if needs be. This has happene= d in the past already on
> >>> =C2=A0 =C2=A0 Allwinner SoCs, so it's definitely = something we should consider in
> >>> =C2=A0 =C2=A0 the DT bindings, since we can't bre= ak them.
> >>>=20
> >>> Until those are fixed, I cannot see how this driver c= an be merged,
> >>> unfortunately.

Best regards,
Jernej =C5=A0krabec

--
You received this message because you are subscribed to the Google Groups &= quot;linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to linux-s= unxi+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_13990_1971241755.1480529098318-- ------=_Part_13989_24844867.1480529098317--