Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8D2ACC433EF for ; Mon, 24 Jan 2022 04:21:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 69E1A10E125; Mon, 24 Jan 2022 04:21:31 +0000 (UTC) Received: from sonic302-1.consmr.mail.bf2.yahoo.com (sonic302-1.consmr.mail.bf2.yahoo.com [74.6.135.40]) by gabe.freedesktop.org (Postfix) with ESMTPS id AFE6410E125 for ; Mon, 24 Jan 2022 04:21:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1642998088; bh=2h9o6xuXk6ls5OrPeMzHsPEvGrUS6c9kMMhclma3j+w=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject:Reply-To; b=ldJb8ty4PcndgrrAx5ZuBM/7Pzu66Ymw4UYP8Pss1wLwk4CXx2lP/Od3OUjEdPQauPDHw4RQvzEFemFgH5MczjpCNoDrmHkFwQES9vmZjPoilE1+hNO4XmM6MYofMv+oHFdXQtu4INetK6N5cJ3M98BkH0QPP6E2w2YRBipN7yHSIqLe5fBGiPNXW/JyOPB7/tZdsDB9xrPct347C2r5I8DTfbo3A0OXoxKnv0uyXh+yt4oXDqF+A3j39dBr941+e1irYVMqkxt+xcT/U/xbjvozf55W2k9RlIWp9rfca6Al6jgav8hOqrC2476P6YlejeYmwJnRaHHCxvLLAtm22Q== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1642998088; bh=Pigjp8VLPkkLGvJiTQCYNCvObXaDRAziaonfI0pU5+M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QB4zdPVcygjQcl7QRLLAeezYxHg6n2jvjHXBPOU0ksKf.ASRgHPVOnm 1peJUFUDrpgKBNR8xWSq9S8xjS13B.dFVA7NzrYmDueM5RIRXvPwFDK5QtUZ31Xa1wq82dZLdcn3 UIBUNyL.MVuC41DZ.jmfTyPhqjx5hZxARSQnDVJxKvFGa3Rif0YN6scvrCCHXK8tGqtWpq8ltg4u NOQrRE1DrKGhg_jRwle4LJocnl7zOarkmcuDL9aXCrchr.GuwvE75Z1_1hAKg6j5g8HExcWgEAMk T482I0izyq7P4fsfHXwGMm5Qk7.18XEcnsJl5KGMxswIe7TfgqnurzmY4CnqKi5UGspDm7XHweAM wKzNITbe990H38GnjaUmXAKQavu7Mu2yJyOUoM5qVY.DcLSZkPNW0k88rO81itcaAmIauB5s9cOj EDYuxDSx_YchHU6N_MV7zQhou41shrOv6VUUSLuHXPD7CCUWG.zoTUSRdfqGRMF1WveFt2mgr6mq 6g74UXFryBo8B2wjC20OxKuglNHA- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.bf2.yahoo.com with HTTP; Mon, 24 Jan 2022 04:21:28 +0000 Date: Mon, 24 Jan 2022 04:21:24 +0000 (UTC) From: Charles Stevens To: Adam Ford , Laurent Pinchart Message-ID: <792976696.783204.1642998084136@mail.yahoo.com> In-Reply-To: References: Subject: Re: Renesas rcar-du and DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_783203_211381917.1642998084133" X-Mailer: WebService/1.1.19615 YMailNorrin X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "kieran.bingham+renesas@ideasonboard.com" , dri-devel Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" ------=_Part_783203_211381917.1642998084133 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sunday, January 23, 2022, 09:10:53 AM CST, Laurent Pinchart wrote: =20 > Hello,>=C2=A0> Thanks for CC me Adam.>=C2=A0> On Fri, Jan 21, 2022 at 1= 1:24:09AM -0600, Adam Ford wrote:> > On Wed, Dec 29, 2021 at 10:19 PM Charl= es Stevens wrote:> > >> > > Hi All,> > >> > > I am working on a platform ba= sed on the Renesas RZ/G2 SoC family.> > > This chip uses the rcar-du driver= for the display. I would like to> > > submit a patch to address the fact t= hat the driver does not> > > check/honor the flag DRM_BUS_FLAG_PIXDATA_DRIV= E_POSEDGE. My issue is> > > that I would like to make as small a change to = the driver as> > > possible, but the panel bus_flags don't seem to even mak= e it to the> > > crtc driver. The crtc driver seems to use adjusted_mode to= set the> > > HSYNC and VSYNC polarity and as I said ignores the pixel cloc= k> > > polarity leaving it at the default of driving on the falling edge.> = > > In my investigations so far I have not figured out how to chase the> > = > pointers from the CRTC to the bridge to the panel in order to be> > > abl= e to look at bus_flags. My current approach also modifies the> > > encoder = initialization to cache the needed panel and then find the> > > attached en= coder during CRTC initialization to find the bus flags.> > > This seems lik= e a lot of work and not something that would be> > > accepted as a patch. T= he OMAP DSS seems to have problems accessing> > this flag as well. The TI d= river goes so far as to document the> > current approach as a HACK and sugg= est a fairly large change to the> > driver to address the problem. Am I mis= sing something? Is there an> > easy way to get from a drm_crtc to a drm_pan= el that is in the same> > pipeline?>=C2=A0> This is actually something I've= experimented with before. I wrote> patches, but never got a chance to post= them. I've pushed them to> git://linuxtv.org/pinchartl/media.git drm/du/sy= ncpol if you want to have> a look.>=C2=A0OK. I've looked over this patch an= d agree that it should work for my use case=C2=A0too. Thank you. > However, there's one issue with this approach: it's not correct :-) The> = CRTC shouldn't be configured based on the polarity of signals at the end> o= f the pipeline, it needs to be configured based on the polarities> expected= by the next bridge in the chain. That may depend on the next> bridge, whic= h may depend on the next bridge, and so on. The information> should thus be= propagated from the panel towards the CRTC, one bridge at> a time, the sam= e way that we propagate formats with the bridge> .atomic_get_input_bus_fmts= () and .atomic_get_output_bus_fmts()> operations. There's thus quite a bit = of work required to handle all this.>=C2=A0Thank you for the description he= re. I can agree that this aproach seems a lotbetter way. Propogating the fl= ags though the bridges and not requiring drmobjects to know about other obj= ects not directly connected makes a lot of sense. So that leaves me with the question, what can I do to help move this along.= I=C2=A0would like to see ESCR_DCLKOINV get written in the rcar-du driver i= n mainline=C2=A0Linux sometime in the near future :)=C2=A0 > > > Any pointers would be greatly appreciated!> >> > +=C2=A0 Laurent, Kie= ran> >> > Charles,> >> > I added Laurent and Kieran because they appear as = the maintainers for> the rcar-du driver.>=C2=A0>=C2=A0> --> Regards,>=C2=A0= > Laurent Pinchart Regards,=C2=A0 =C2=A0 -charles =20 ------=_Part_783203_211381917.1642998084133 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Sunday, January 23,= 2022, 09:10:53 AM CST, Laurent Pinchart <laurent.pinchart@ideasonboard.= com> wrote:

> Hell= o,
> 
> Thanks for CC me Adam.
>= ; 
> On Fri, Jan 21, 2022 at 11:24:09AM -0600, Adam Ford = wrote:
> > On Wed, Dec 29, 2021 at 10:19 PM Charles Stevens= wrote:
> > >
> > > Hi All,
> > >
> > > I am working on a platform based o= n the Renesas RZ/G2 SoC family.
> > > This chip uses the= rcar-du driver for the display. I would like to
> > > s= ubmit a patch to address the fact that the driver does not
> &= gt; > check/honor the flag DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE. My issue = is
> > > that I would like to make as small a change to = the driver as
> > > possible, but the panel bus_flags do= n't seem to even make it to the
> > > crtc driver. The c= rtc driver seems to use adjusted_mode to set the
> > > H= SYNC and VSYNC polarity and as I said ignores the pixel clock
>= ; > > polarity leaving it at the default of driving on the falling ed= ge.
> > > In my investigations so far I have not figured= out how to chase the
> > > pointers from the CRTC to th= e bridge to the panel in order to be
> > > able to look = at bus_flags. My current approach also modifies the
> > >= ; encoder initialization to cache the needed panel and then find the
<= div>> > > attached encoder during CRTC initialization to find the = bus flags.
> > > This seems like a lot of work and not s= omething that would be
> > > accepted as a patch. The OM= AP DSS seems to have problems accessing
> > this flag as we= ll. The TI driver goes so far as to document the
> > curren= t approach as a HACK and suggest a fairly large change to the
>= ; > driver to address the problem. Am I missing something? Is there an
> > easy way to get from a drm_crtc to a drm_panel that is i= n the same
> > pipeline?
> 
>= ; This is actually something I've experimented with before. I wrote
> patches, but never got a chance to post them. I've pushed them to
> git://linuxtv.org/pinchartl/media.git drm/du/syncpol if you w= ant to have
> a look.
> 
OK. I've = looked over this patch and agree that it should work for my use case <= /div>
too. Thank you.

> However, there's on= e issue with this approach: it's not correct :-) The
> CRTC sh= ouldn't be configured based on the polarity of signals at the end
> of the pipeline, it needs to be configured based on the polarities
> expected by the next bridge in the chain. That may depend on t= he next
> bridge, which may depend on the next bridge, and so = on. The information
> should thus be propagated from the panel= towards the CRTC, one bridge at
> a time, the same way that w= e propagate formats with the bridge
> .atomic_get_input_bus_fm= ts() and .atomic_get_output_bus_fmts()
> operations. There's t= hus quite a bit of work required to handle all this.
> 
Thank you for the description here. I can agree that this aproach = seems a lot
better way. Propogating the flags though the bridges = and not requiring drm
objects to know about other objects not dir= ectly connected makes a lot of sense.

So that leav= es me with the question, what can I do to help move this along. I 
would like to see ESCR_DCLKOINV get written in the rcar-du driver in= mainline 
Linux sometime in the near future :) 
<= div>
> > > Any pointers would be greatly appreciated= !
> >
> > +  Laurent, Kieran
> >
> > Charles,
> >
> = > I added Laurent and Kieran because they appear as the maintainers for<= /div>
> the rcar-du driver.
> 
> = ;
> --
> Regards,
> 
= > Laurent Pinchart

Regards,
    -charles
------=_Part_783203_211381917.1642998084133--