From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH v2 01/15] drm/dsi: Make mipi_dsi_dcs_{read, write}() symmetrical Date: Tue, 14 Oct 2014 13:13:38 +0200 Message-ID: <20141014111337.GA4807@ulmo> References: <1413195395-3355-1-git-send-email-thierry.reding@gmail.com> <543CD820.8080606@samsung.com> <20141014094400.GD18993@ulmo> <543CFD17.10806@samsung.com> <20141014105730.GH18993@ulmo> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0136728278==" Return-path: Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by gabe.freedesktop.org (Postfix) with ESMTP id 373AB6E0E0 for ; Tue, 14 Oct 2014 04:13:41 -0700 (PDT) Received: by mail-wg0-f45.google.com with SMTP id m15so10802020wgh.16 for ; Tue, 14 Oct 2014 04:13:40 -0700 (PDT) In-Reply-To: <20141014105730.GH18993@ulmo> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Andrzej Hajda Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0136728278== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DocE+STaALJfprDB" Content-Disposition: inline --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 14, 2014 at 12:57:31PM +0200, Thierry Reding wrote: > On Tue, Oct 14, 2014 at 12:38:15PM +0200, Andrzej Hajda wrote: [...] > > It has nothing to do with helpers symmetry, this is serious API change. >=20 > No, it's not. It replaces an existing API, mipi_dsi_dcs_write() with a > different one, mipi_dsi_dcs_write_buffer() and converts the one call > site where the function is used. >=20 > Then it introduces a new function that behaves the same but uses a > different signature that takes the DCS command byte as an explicit > parameter instead of embedding the DCS command byte into the "payload" > buffer. >=20 > I don't understand why you think we're changing anything fundamental > here. I think I understand now why you think this is a problem. It seems like the Exynos driver was implemented in a way that it injects the length of the payload manually, whereas mipi_dsi_dcs_write() is written in a way to insert the length into the payload already. Letting host implementations take care of this is just going to lead to duplicating the same code everywhere. I think we should let the DSI core figure out what type of packet it is supposed to generate and then build the complete message using that data. That way what the DSI host gets is a raw buffer that it just needs to write into the right registers. Specifically, if we don't do this in the DSI core, then *every* DSI host driver needs to do something similar to the if (exynos_dsi_is_short_dsi_type(msg->type)) { ... } block in their implementation of the .transfer() function. And none of that is really driver specific. It's defined by the DSI specification and therefore has no place in the individual drivers. Thierry --DocE+STaALJfprDB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUPQVhAAoJEN0jrNd/PrOhOJIQALGkGHYrCjyIYVrocjFFwaww xHqg/73zQzAr3nsZ7gsTTAZ0DaBHYi1tM89XY8lc4yp2JnrP/w/WBLmNgN9G4a3A Rz6V+HwRTdmDIgE04WM8WEznJcURbL/E7zZvXjSNc+coqC75eClBoeF+QSWbRVtP sFJUd1HI2duYzsffyU1lNURbKWaUnzqiRdvpEY2b7wjapu8lpj0XGa+l2BSURl0b WpP4voQg4UM5srynHdGqgCEqz0KbC3s7eZVIl43rUKLPbNJtpnZZHeNiZGWjZIAC MWNMTt7ErKs9Q1W1rgstVsBluUmk2mSLJinOb6unRE7hnRGok/1o29Y2VAq5IcAF Y2mHXcQlndJKWB+GrFCNEBOaRNFQ/qSwBlhcLJAgoa06LFYQT39UInUnsGvQW92I ZLyyTUKQfYUboKo3Ao3p17TPIK327T8NSCHuQRM+C/CwAvX4o6BeilnxLR05tXhN TitGK+TL8SOICyohQhGc+5NSNCWgbvrzW3At0mIkqm3V3dmnCwD+ZJU066rthoZL /z6nkMpTPo2rff5tdqQY2wNP7VDUJbGAi/pwaqBQgPHigJ65xZDOsXitoRLaH0Ji CTPeAb7rS5RPHvsxIIAUUU8pxjbX+e3gFztnqAvEQTBaUMwoi6f6RqwSo8KDZ0Av F3fVbk75rsPEPRbcR8F+ =CUKx -----END PGP SIGNATURE----- --DocE+STaALJfprDB-- --===============0136728278== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0136728278==--