From mboxrd@z Thu Jan 1 00:00:00 1970 From: eric@anholt.net (Eric Anholt) Date: Thu, 11 Jan 2018 12:21:15 -0800 Subject: [PATCH 2/4 v6] drm/bridge: Provide a way to embed timing info in bridges In-Reply-To: <20180110144421.GW13066@phenom.ffwll.local> References: <20180110141226.27826-1-linus.walleij@linaro.org> <20180110141226.27826-2-linus.walleij@linaro.org> <20180110144421.GW13066@phenom.ffwll.local> Message-ID: <87d12guoxw.fsf@anholt.net> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Daniel Vetter writes: > On Wed, Jan 10, 2018 at 03:12:24PM +0100, Linus Walleij wrote: >> After some discussion and failed patch sets trying to convey >> the right timing information between the display engine and >> a bridge using the connector, I try instead to use an optional >> timing information container in the bridge itself, so that >> display engines can retrieve it from any bridge and use it to >> determine how to drive outputs. >> >> Signed-off-by: Linus Walleij >> --- >> ChangeLog v5->v6: >> - Sort forward struct declarations alphabetically >> - Switch to using DRM_BUS_FLAG_PIXDATA_[POS|NEG]EDGE to indicate >> positive or negatice clock samling edge >> ChangeLog ->v5: >> - New patch >> --- >> include/drm/drm_bridge.h | 21 +++++++++++++++++++++ >> 1 file changed, 21 insertions(+) >> >> diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h >> index 682d01ba920c..28c9ac6d9036 100644 >> --- a/include/drm/drm_bridge.h >> +++ b/include/drm/drm_bridge.h >> @@ -29,6 +29,7 @@ >> #include >> >> struct drm_bridge; >> +struct drm_bridge_timings; >> struct drm_panel; >> >> /** >> @@ -222,6 +223,23 @@ struct drm_bridge_funcs { >> void (*enable)(struct drm_bridge *bridge); >> }; >> >> +/** >> + * struct drm_bridge_timings - timing information for the bridge >> + * @sampling_edge: whether the bridge samples the digital input signal from the >> + * display engine on the positive or negative edge of the clock, this should >> + * reuse the DRM_BUS_FLAG_PIXDATA_[POS|NEG]EDGE bitwise flags from the DRM >> + * connector (bit 2 and 3 valid) >> + * @setup_time_ps: the time in picoseconds the input data lines must be stable >> + * before the clock edge >> + * @hold_time_ps: the time in picoseconds taken for the bridge to sample the >> + * input signal after the clock edge >> + */ > > Just a style nit: for longer kerneldoc comments for struct members the > in-line style, split up for each member, is imo better. > -Daniel The new style also discourages the comments getting out of sync with the code. I'd be happy to r-b with them moved. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: [PATCH 2/4 v6] drm/bridge: Provide a way to embed timing info in bridges Date: Thu, 11 Jan 2018 12:21:15 -0800 Message-ID: <87d12guoxw.fsf@anholt.net> References: <20180110141226.27826-1-linus.walleij@linaro.org> <20180110141226.27826-2-linus.walleij@linaro.org> <20180110144421.GW13066@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0664387429==" Return-path: Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id 3981F6E47C for ; Thu, 11 Jan 2018 20:21:18 +0000 (UTC) In-Reply-To: <20180110144421.GW13066@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Daniel Vetter , Linus Walleij Cc: linux-arm-kernel@lists.infradead.org, Laurent Pinchart , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0664387429== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Daniel Vetter writes: > On Wed, Jan 10, 2018 at 03:12:24PM +0100, Linus Walleij wrote: >> After some discussion and failed patch sets trying to convey >> the right timing information between the display engine and >> a bridge using the connector, I try instead to use an optional >> timing information container in the bridge itself, so that >> display engines can retrieve it from any bridge and use it to >> determine how to drive outputs. >>=20 >> Signed-off-by: Linus Walleij >> --- >> ChangeLog v5->v6: >> - Sort forward struct declarations alphabetically >> - Switch to using DRM_BUS_FLAG_PIXDATA_[POS|NEG]EDGE to indicate >> positive or negatice clock samling edge >> ChangeLog ->v5: >> - New patch >> --- >> include/drm/drm_bridge.h | 21 +++++++++++++++++++++ >> 1 file changed, 21 insertions(+) >>=20 >> diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h >> index 682d01ba920c..28c9ac6d9036 100644 >> --- a/include/drm/drm_bridge.h >> +++ b/include/drm/drm_bridge.h >> @@ -29,6 +29,7 @@ >> #include >>=20=20 >> struct drm_bridge; >> +struct drm_bridge_timings; >> struct drm_panel; >>=20=20 >> /** >> @@ -222,6 +223,23 @@ struct drm_bridge_funcs { >> void (*enable)(struct drm_bridge *bridge); >> }; >>=20=20 >> +/** >> + * struct drm_bridge_timings - timing information for the bridge >> + * @sampling_edge: whether the bridge samples the digital input signal = from the >> + * display engine on the positive or negative edge of the clock, this s= hould >> + * reuse the DRM_BUS_FLAG_PIXDATA_[POS|NEG]EDGE bitwise flags from the = DRM >> + * connector (bit 2 and 3 valid) >> + * @setup_time_ps: the time in picoseconds the input data lines must be= stable >> + * before the clock edge >> + * @hold_time_ps: the time in picoseconds taken for the bridge to sampl= e the >> + * input signal after the clock edge >> + */ > > Just a style nit: for longer kerneldoc comments for struct members the > in-line style, split up for each member, is imo better. > -Daniel The new style also discourages the comments getting out of sync with the code. I'd be happy to r-b with them moved. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlpXxzsACgkQtdYpNtH8 nuhuGg/+MNuiVIG18sdo7FRF0dVBZ50sGFD+KyBLOj2jEjEAQQJyuzTCiqjuefOR hCIaZT09FfVfBH84qn7hAvHfHz8LpPU5tMqatX01DnbKWrDx+Li7GJS4DsF7D2+0 SQnMff1SRhI0A0UK3Cqyd9DavQC88QZu0c3KaNxbOXeOjZ1qxLSFv+buzDEQqH7H UtuIq6slYdUYloJhTzGG39rUcaV/0d0X0LngGgF9i3fFD9ZX7kaQpZ+lt48auZpX tjfAuQW+L6GJ74t69nCG9Z6/h97MDcr5QZANZmBrARzcKZwar054Qrt2UBWGDq9j cuJRyD1XB9s3a8bUcLFT/F8ejBHoAzGRhFXk/P2EyK9WCJA0PY/rA3GQN5a9la1Q expkRRqIMZpGWp7L8FPI178yB8QplK2vAt8kH0RCT1f8IuH5QeU7s4JIrcWBs4pa hakYWz6lG4FWXkHQlSZGTrhdraD51ysE80RpMndvcCcv8bk92ItYrFWntlXBM2p1 xot9M00mN+qe6GmGBZCQTgMg+Fv6sMdSbIDWgQZ7xyYRouM7Hf0MA8t8pl/EXJui VlcHvN0YX0j1nwbdW4/pGAkYZakmRUq9QR4tIe/IGmkAoghJpNQ1U2leRHTBJxn2 4b5QVymL3uHx0MTNgfldvUGBrOYKuGZzr0RVqPXeJLwFYM4mpEk= =tQ8F -----END PGP SIGNATURE----- --=-=-=-- --===============0664387429== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0664387429==--