From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [RFC/PATCH 2/2] drm: Use new DRM_BUS_FLAG_PIXDATA_(DRIVE|SAMPLE)_(POS|NEG)EDGE flags Date: Mon, 24 Sep 2018 13:48:28 +0200 Message-ID: <20180924114828.GU21032@ulmo> References: <20180922121504.31220-1-laurent.pinchart+renesas@ideasonboard.com> <20180922121504.31220-3-laurent.pinchart+renesas@ideasonboard.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1826259431==" Return-path: Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id DB9286E2AA for ; Mon, 24 Sep 2018 11:48:31 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id z14-v6so1849493wrs.10 for ; Mon, 24 Sep 2018 04:48:31 -0700 (PDT) In-Reply-To: <20180922121504.31220-3-laurent.pinchart+renesas@ideasonboard.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Laurent Pinchart Cc: Maxime Ripard , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1826259431== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="L2YZAWjVjAQ1Un1Q" Content-Disposition: inline --L2YZAWjVjAQ1Un1Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 22, 2018 at 03:15:04PM +0300, Laurent Pinchart wrote: > The DRM_BUS_FLAG_PIXDATA_(POS|NEG)EDGE flags are deprecated in favour of > the new DRM_BUS_FLAG_PIXDATA_(DRIVE|SAMPLE)_(POS|NEG)EDGE flags. Replace > them through the code. >=20 > Signed-off-by: Laurent Pinchart > --- > drivers/gpu/drm/bridge/dumb-vga-dac.c | 6 +++--- > drivers/gpu/drm/drm_modes.c | 8 ++++---- > drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 2 +- > drivers/gpu/drm/imx/ipuv3-crtc.c | 2 +- > drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 6 +++--- > drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c | 2 +- > .../drm/omapdrm/displays/panel-lgphilips-lb035q02.c | 2 +- > .../gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c | 2 +- > .../drm/omapdrm/displays/panel-sharp-ls037v7dw01.c | 2 +- > .../gpu/drm/omapdrm/displays/panel-sony-acx565akm.c | 2 +- > .../gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c | 2 +- > .../gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c | 2 +- > drivers/gpu/drm/omapdrm/dss/dsi.c | 2 +- > drivers/gpu/drm/omapdrm/dss/sdi.c | 2 +- > drivers/gpu/drm/omapdrm/omap_encoder.c | 4 ++-- > drivers/gpu/drm/panel/panel-arm-versatile.c | 4 ++-- > drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 4 ++-- > drivers/gpu/drm/panel/panel-seiko-43wvf1g.c | 2 +- > drivers/gpu/drm/panel/panel-simple.c | 20 ++++++++++----= ------ > drivers/gpu/drm/pl111/pl111_display.c | 2 +- > drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 ++-- > drivers/gpu/drm/tve200/tve200_display.c | 3 ++- > include/drm/drm_bridge.h | 8 ++++---- > 23 files changed, 47 insertions(+), 46 deletions(-) >=20 > diff --git a/drivers/gpu/drm/bridge/dumb-vga-dac.c b/drivers/gpu/drm/brid= ge/dumb-vga-dac.c > index 9b706789a341..7dc14c22f7db 100644 > --- a/drivers/gpu/drm/bridge/dumb-vga-dac.c > +++ b/drivers/gpu/drm/bridge/dumb-vga-dac.c > @@ -234,7 +234,7 @@ static int dumb_vga_remove(struct platform_device *pd= ev) > */ > static const struct drm_bridge_timings default_dac_timings =3D { > /* Timing specifications, datasheet page 7 */ > - .sampling_edge =3D DRM_BUS_FLAG_PIXDATA_POSEDGE, > + .sampling_edge =3D DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE, > .setup_time_ps =3D 500, > .hold_time_ps =3D 1500, > }; > @@ -245,7 +245,7 @@ static const struct drm_bridge_timings default_dac_ti= mings =3D { > */ > static const struct drm_bridge_timings ti_ths8134_dac_timings =3D { > /* From timing diagram, datasheet page 9 */ > - .sampling_edge =3D DRM_BUS_FLAG_PIXDATA_POSEDGE, > + .sampling_edge =3D DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE, > /* From datasheet, page 12 */ > .setup_time_ps =3D 3000, > /* I guess this means latched input */ > @@ -258,7 +258,7 @@ static const struct drm_bridge_timings ti_ths8134_dac= _timings =3D { > */ > static const struct drm_bridge_timings ti_ths8135_dac_timings =3D { > /* From timing diagram, datasheet page 14 */ > - .sampling_edge =3D DRM_BUS_FLAG_PIXDATA_POSEDGE, > + .sampling_edge =3D DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE, > /* From datasheet, page 16 */ > .setup_time_ps =3D 2000, > .hold_time_ps =3D 500, Now I'm confused. Aren't you effectively iverting the sampling edges here? That and the fact that everywhere else we only use the driver variants makes me think that we should just define which way these are supposed to be used and just have a single set of definitions. Also, I think there's no need for these to be always "physically" correct. This is up to interpretation by the driver, so if a bridge driver wants to use them as meaning "sampled edge", that's fine. If display controllers use them to mean "driven edge", that's equally fine. As long as we don't communicate the flags between drivers there should be no reason for them to be confusing. Just make sure that the comments in the interfaces clarify from which point of view these flags are to be interpreted and we should be fine. Thierry --L2YZAWjVjAQ1Un1Q Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAluozwwACgkQ3SOs138+ s6HNZRAAmUdtLEr0iwkEQgwoNY2ywmEC7RiIRY+EsOkAl7Mysxhqrcnz4uNNFxps rjGCx+ZoweZyVYXW1JNadY+s0uuWeyWWUGsMvvOJGfhD9eFvYVnMjsMd3j/huuzj jnghVMicQ8Asp48Wc/htQjEXXPA8xn8lR+4uBvpqbVH3erEsOh+HKmlu/8EsK5z3 jiW+znERtiQv66lIaAm4cMHObJSQnbYKgN+oXNBVkN5HwygX8Z6ltAD9YOqwzE2y 57aZjG8aPpr85CpVowEo+GbCYSPp5qngs0Hsrnog9TJfgVQrz1s9zas7HUyCSEkE vPk0O1U+EouiqhAUDLsBWj4SduSpQZ7CObZneIAYzXBILsD9rGpo6zFZ/U+TFJ+h hKRUDRm87+v1iLHvoWJAHfp+nOhqzhgoRBc7XeJlxWuw0FS+7xBEcatMawfr8K2S q06NQ+we7ZrRSt3sg6+SCo9p8vFBvQ57An6pfceVxPwdQeqBM/dJCVwFfpUZ9mpA anXvHveYLZOvXEsVuFk/d/trIsBEiEMreLAwdlPJvrFw2Nq0PTqnMUnK5WSy9LEA Fez469ojOoehblHHn5wW7GKj2CGbtN8oBRlPigoE8F9EGwRslIh4bcBBMJeSH3Nb oOHoH9m9q9+UQQsT81Y2L+1OW5XHE02pvJ5MNtRGn6YWZ2bfpiI= =gn/+ -----END PGP SIGNATURE----- --L2YZAWjVjAQ1Un1Q-- --===============1826259431== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1826259431==--