From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH v2 1/4] drm/dp: Add AUX channel infrastructure Date: Fri, 20 Dec 2013 10:03:51 +0100 Message-ID: <20131220090350.GA27787@ulmo.nvidia.com> References: <1387297207-7643-1-git-send-email-treding@nvidia.com> <1387297207-7643-2-git-send-email-treding@nvidia.com> <87ioun1l75.fsf@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0407915387==" Return-path: Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com [209.85.214.53]) by gabe.freedesktop.org (Postfix) with ESMTP id E633BF9DAC for ; Fri, 20 Dec 2013 01:05:28 -0800 (PST) Received: by mail-bk0-f53.google.com with SMTP id na10so1079754bkb.40 for ; Fri, 20 Dec 2013 01:05:22 -0800 (PST) In-Reply-To: <87ioun1l75.fsf@intel.com> 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: Jani Nikula Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0407915387== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 17, 2013 at 06:44:30PM +0200, Jani Nikula wrote: > On Tue, 17 Dec 2013, Thierry Reding wrote: [...] > > +/** > > + * drm_dp_dpcd_write() - write a series of bytes to the DPCD > > + * @aux: DisplayPort AUX channel > > + * @offset: address of the (first) register to write > > + * @buffer: buffer containing the values to write > > + * @size: number of bytes in @buffer > > + * > > + * Returns the number of bytes transferred on success, or a negative e= rror > > + * code on failure. > > + */ > > +ssize_t drm_dp_dpcd_write(struct drm_dp_aux *aux, unsigned int offset, > > + void *buffer, size_t size) [...] > > + switch (msg.reply & DP_AUX_NATIVE_REPLY_MASK) { > > + case DP_AUX_NATIVE_REPLY_ACK: > > + return 0; >=20 > "Returns the number of bytes transferred on success, or a negative error > code on failure." Compare drm_dp_dpcd_read. Good catch! > You could add an internal helper to do both read and write, it's mostly > the same code. Yes, I've factored out drm_dp_dpcd_access() which takes an additional request parameter. That's the only difference between both functions. Thanks, Thierry --UugvWAfsgieZRqgk Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJStAf2AAoJEN0jrNd/PrOhenEP/3b9C593pRIe56UZDLhmwozt sp/adERFdOmaMg9+zrQQ02IFkR9zf6N2rGWEXozTprhMI3SK5rDJRJ6ZQJVLW3RF xas/L/YgUVZMUAOippPVll4jqK4kXxNAZ8fCxPx8vTJRkNjq+37IRA4nL5Gq1ysL TRuu9UMe+kom5wdYE/mDWuSFX7uguDavqIWi8FhHPdreMwAlrSFTKMUrmR39JiUS 01BFgJrZaNfveU3cS28NhjTFtT8qCviZkAVwSjh/USX95hzAbqRZ1GjsYd6swX1W mud67+egKW1k0ponDgo95TNywU/3XZm/b8nG8/pfsoJ2+3Ff0nTQOkFvBn7C/Tb7 0KzvLaPugecbyLsRpoTHSs/aozSzAuk3ZaMChm+kItczk+3FUHLoivQfDton25yA UunjBsUYKgNvUhoA/XmP5h8OeeRiRWIUlH4nmc6IK6wZS0IDHplyhYH/vCNc6L5B KkplagBK6GOMJdg7fezPUEC/cDJzAXC0pGYzx0pXbBCjEFy1D3CdnYZR76RvilvF pjxbwhgXgqbwVIsGqyJasp60FLyWEYAgz2cGx1rTlEPLLSjtz+0s0YTm/gXliX7S FHlpkW8IdeYEcFQ807i+LU9rJJTB7/mrf4wn0Nih3XmLGp5sTYVoLaONcjjXRHoa 0dbnnTXxIEw0wKGPtqUv =JeI5 -----END PGP SIGNATURE----- --UugvWAfsgieZRqgk-- --===============0407915387== 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 --===============0407915387==--