From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH v3 1/7] drm: Add DSI bus infrastructure Date: Mon, 18 Nov 2013 12:22:09 +0100 Message-ID: <20131118112208.GC8646@ulmo.nvidia.com> References: <1384171235-2498-1-git-send-email-treding@nvidia.com> <1384171235-2498-2-git-send-email-treding@nvidia.com> <528237BE.8020501@samsung.com> <20131113213856.GA10856@mithrandir> <5284DB1D.10704@samsung.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1283505883==" Return-path: Received: from mail-bk0-f43.google.com (mail-bk0-f43.google.com [209.85.214.43]) by gabe.freedesktop.org (Postfix) with ESMTP id CBA6BFAB2C for ; Mon, 18 Nov 2013 03:22:33 -0800 (PST) Received: by mail-bk0-f43.google.com with SMTP id mz12so337609bkb.2 for ; Mon, 18 Nov 2013 03:22:32 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: Bert Kenward Cc: Andrzej Hajda , "dri-devel@lists.freedesktop.org" List-Id: dri-devel@lists.freedesktop.org --===============1283505883== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ABTtc+pdwF7KHXCz" Content-Disposition: inline --ABTtc+pdwF7KHXCz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 14, 2013 at 03:04:19PM +0000, Bert Kenward wrote: > On 11/14/2013 14:16, Andrzej Hajda wrote: > > On 11/13/2013 10:38 PM, Thierry Reding wrote: > > > Furthermore I think if we kept the transfer function proposed > > > in my patch should make it easier to address Bert's comments from your > > > posting. > > I am not sure which part of Barts comment you are addressing. > > Anyway I also prefer passing struct and returning ssize_t. > > I am not sure about splitting type and channel but this seems to be a > > minor detail. >=20 > Most of the comments I made about Andrzej's patch from last month > apply here, and would result in extensions to struct dsi_msg. Some > means of choosing whether the transfer should be in HS or LP mode is > necessary. For video mode panels some means of specifying a period > (VFP, VBP, etc) for sending the transfer is needed. Perhaps struct > dsi_msg should include: >=20 > #define DSI_WINDOW_VFP (1 << 0) > #define DSI_WINDOW_ACT (1 << 1) > #define DSI_WINDOW_VBP (1 << 2) > #define DSI_WINDOW_VSY (1 << 3) >=20 > /** > * struct dsi_msg - DSI command message > * @channel: virtual channel to send the message to > * @type: data ID of the message > * @lp_mode: send in LP mode if non-zero Perhaps a flags field would be more flexible here. I can easily imagine other I can imagine that other flags may be needed eventually. > * @window: video period when transfer is allowed - bitmask of DSI_WINDOW= _* I'm not sure if this is the right interface. What will happen for instance if the hardware doesn't support any of the bits in that mask? Perhaps a slightly better approach might be to expose the capabilities of the DSI host, so that the DSI core knows up front which windows can be used. > * @tx_len: length of transmission buffer > * @tx: transmission buffer > * @rx_len: length of reception buffer > * @rx: reception buffer > */ > struct dsi_msg { > u8 channel; > u8 type; > u8 lp_mode; > u8 window; >=20 > size_t tx_len; > void *tx; >=20 > size_t rx_len; > void *rx; > }; >=20 > The ability to specify synchronisation with a tearing effect control > signal for a command mode panel is obviously important. It's somewhat > analogous to the "window" option for video mode. >=20 > They're little used, but a mechanism for sending triggers should be > included. They're probably sufficiently different that it should be a > different op. I agree. While I currently have no use-case where this is required, I think having a struct dsi_msg makes it easier to extend the featureset on an as-needed basis. Thierry --ABTtc+pdwF7KHXCz Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJSifhgAAoJEN0jrNd/PrOhO6gQAIJoxMihQfoPczvSlOs2pUPE gaBpbReE8L44g/m5pq1G9RjHh2resI2wv/a+Ymy5+ypgZ0dJjkBtDmycDdcavdDM BxDfD6eO2xmXhHcav3x3ixF9DClxKimi6xWrmDi9fidraE65LGnZbDNIzsXEz6FY 2ozMQKcWLxaki0bDMrljyUa+flcPanfnDtycokJZTmS13feF3laFhr9oTKspQu4f sZoIsv7W07+/5MP0k0Eq6ZZK6KcAqg3MyQSg5u3zoFgHFvKH5Relxkpi4ahgpxkV em6oKiFc1wP4glY8ZI6GfEtYowF9xoSunVsX2qIDg/8QsNIT+bmpDgDNlZ0dBwlR AaMGJONutb2vF4hlM/+Fbjn3VfoEYtvPNafsJh6n3psWxokJDNMA/jiwBCendxMW RV4Q3ymoC6j87gZ7jfk7NWfZaXF+8qu+WNz2rvoxCjpxAspF8yLN2wBOjz4Ajl1T Ac7evX2zKagut4jrInvn857zL3MAWO39VBT7F6QNQadlDriEMDJ/2l2GGd1fNHba y1B9jWMLifi/b/U+kEVnKQjKjMdbkEm+6PVIA5yj3PwFKKZrgl60IidpQFVxe9ON ov4kY+eOtSMlVZZI4Zi6vqDrjBZry0pqQxZweLLddE9rC9L/RJGa1G7QsTAxJcYV YM4F3OeT4rS2p6x/3P8f =yUXR -----END PGP SIGNATURE----- --ABTtc+pdwF7KHXCz-- --===============1283505883== 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 --===============1283505883==--