From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH v2 4/4] drm/dp: Allow registering AUX channels as I2C busses Date: Fri, 20 Dec 2013 10:13:20 +0100 Message-ID: <20131220091319.GB27787@ulmo.nvidia.com> References: <1387297207-7643-1-git-send-email-treding@nvidia.com> <1387297207-7643-5-git-send-email-treding@nvidia.com> <87fvpr1jye.fsf@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1915711084==" Return-path: Received: from mail-bk0-f48.google.com (mail-bk0-f48.google.com [209.85.214.48]) by gabe.freedesktop.org (Postfix) with ESMTP id 48E81F9CD1 for ; Fri, 20 Dec 2013 01:14:54 -0800 (PST) Received: by mail-bk0-f48.google.com with SMTP id r7so1061760bkg.7 for ; Fri, 20 Dec 2013 01:14:51 -0800 (PST) In-Reply-To: <87fvpr1jye.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 --===============1915711084== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pvezYHf7grwyp3Bc" Content-Disposition: inline --pvezYHf7grwyp3Bc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 17, 2013 at 07:11:21PM +0200, Jani Nikula wrote: > On Tue, 17 Dec 2013, Thierry Reding wrote: [...] > > + case DP_AUX_NATIVE_REPLY_DEFER: > > + /* > > + * We could check for I2C bitrate capabilities and if > > + * available adjust this interval. We could also be > > + * more careful with DP-to-legacy adapters where a > > + * long legacy cable may forc very low I2C bit rates. > ^^^^ force Fixed. > > + * For now just defer for long enough to hopefully be > > + * safe for all use-cases. > > + */ > > + usleep_range(500, 600); >=20 > I've banged my head against the wall a bit with this (the original i915 > comment similar to the above was mine) and I'd be hesitant to switch to > this as-is in i915. >=20 > First, I'd like to retain the DRM_DEBUG_KMS messages all around, as > otherwise issues here will be hard to debug. It's a pain to have to ask > to patch the kernel just get the debug info. At least we've had a fair > share of DP aux issues in our driver. Okay, I'll add those back in. I'll assume the same goes for DRM_ERROR messages. > Second, I fear one size does not fit all wrt the delays. What would you > say about making all the DP_AUX_NATIVE_REPLY_DEFER and > DP_AUX_I2C_REPLY_DEFER checks do callbacks if defined, and fallback to > the default delays otherwise? I think there'll be some more churn in the > error handling, particularly for the more exotic sinks, and IMO having > them per driver would make development and bug fixing faster. I'm not > saying you need to do this now, it can be a follow-up; just asking what > you'd think of it. Sure, we should be able to easily do that. One possible alternative to this would be to handle in in the drivers by handling DEFER explicitly and then returning -EBUSY. -EBUSY will cause native AUX transactions to be retried and I just noticed that radeon does the same for I2C-over-AUX transactions, so I'll add that special case there as well. The benefit of doing that would be that the helper stays relatively simple. On the downside it may not be as explicit as a driver-specific callback. Thanks, Thierry --pvezYHf7grwyp3Bc Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJStAovAAoJEN0jrNd/PrOhYt8QAKaVmxAhsDAxcXntPwm3Q+rK lS6A4plXCuvJh/5DmuraerFjFZwiEgi3mXyHNZWF3BEdoRPvPnFxufBEOjYYdJ7E P46N16vpXAHr+mCOcITcc8lEEt/VbNDsobgcxaMWdRpOTaZsROa+GnyoP5mldbIF GrAI8rZp7wO7exieZRUKz6w/rGcQr+K4N30UhcLpdwrJl33e28WJOlH65PtJ4pkc 63ov4VeS9Zj90v3skqSItM5fxrTAf3CHEIOlJPyGg4RhDOAUtKlKTJyd/Xi1Jdds ZXIHFVFjWTgQXw3fuMbIxX9oS/5avzVn2gzus5YuK1bEEUG2pfigTkdNagQOZn/n XNK/rQY5WS4hewBrWvoT1NtLvAXsfXIS8YcyBdujMYmYU1/XG8EBVzUO7KsJpdzo p0wjn9Wtd0ZX+FJzIsqC/L9SHanmU/iiyTLnOrFpleWD3ignxn6vHPPfX85hx2LZ IXRRv3nBBldrrN9dHh/7t3AzUJeubVNXnoRZZNyb3NU5S22CF6LUhhOvVBMch6uf I6RkB99fV/x88BratCV9HWj5pMeqWUYo1m1C9DLjDagbGfwPhFe/8i9/KkoZR+Mm gIRyUfuAfyCN+NrLlUGuKX6PGyFxpLDSamnH0wXE6Jg2eDNPcLdQUA8N4ThEJkca lR9LYqyvsHvgPbakKxeK =NEkI -----END PGP SIGNATURE----- --pvezYHf7grwyp3Bc-- --===============1915711084== 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 --===============1915711084==--