From: Daniel Vetter Subject: Re: [PATCH v2] radeon: Use mdelay() instead of msleep() when we can't sleep in atom_op_delay(). Date: Wed, 4 Jan 2012 14:42:12 +0100 Message-ID: <20120104134212.GF8004@phenom.ffwll.local> References: <1325613840-31736-1-git-send-email-michel@daenzer.net> <1325673220-30281-1-git-send-email-michel@daenzer.net> <20120104105413.GB8004@phenom.ffwll.local> <1325676564.1807.495.camel@thor.local> <20120104114448.GC8004@phenom.ffwll.local> <20120104120936.10a6ac40@pyramind.ukuu.org.uk> <20120104124905.GD8004@phenom.ffwll.local> <20120104132828.04eb0da1@pyramind.ukuu.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by gabe.freedesktop.org (Postfix) with ESMTP id E13319E73F for ; Wed, 4 Jan 2012 05:40:13 -0800 (PST) Received: by wibhq15 with SMTP id hq15so11914255wib.36 for ; Wed, 04 Jan 2012 05:40:13 -0800 (PST) Content-Disposition: inline In-Reply-To: <20120104132828.04eb0da1@pyramind.ukuu.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Alan Cox Cc: Michel =?iso-8859-1?Q?D=E4nzer?= , Drago , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Wed, Jan 04, 2012 at 01:28:28PM +0000, Alan Cox wrote: > > unnusual contexts). I'm not sure whether your proposed instrumentation is > > really worth it though - in i915-land we don't bother with this. But maybe > > In i915 land it's specific code paths so effectively it is marked up. We > don't do it for every random delay in all the connectors and other bits. > The bits of code believing they are safe use sleeping locks and we'll get > spewage if that breaks. Ditto at this point I hope gma500 although I > would not be surpised to find ones I still need to fix from being mdelay. The atomic context check is in the _wait_for macro in intel_drv.h which is used all over the place. Like in the wait_for_vblank function. So I don't think you can use i915.ko as a shiny beacon of how to do it ;-) > > with the firmware provided and randomly b0rked atombios tables it might > > make sense to add the WARN_ON_ONCE you've proposed in the other mail > > I think we need it because it can be added by firmware, it could be > silently done and the atombios paths cover so many different things > beyond modesetting using that exact same function we need the mark up. > > If some vendor puts a 100ms delay in a connector related hotplug check we > are going to have a horrible time debugging 'bugzilla #zillion, 'poor > performance in OpenGL game with Radeon foozillion' Well, hotplug is alreay a giant pain because of the single lock to rule them all design of the current kms code: Long delays already stall everything else (well, cursor updates and pageflips) and we have tons of bugreports that complain about it. In a sense your example undermines my point that we have lower hanger fruit to fix all over the place already ... But as I've said I like the WARN_ON you want to add, but otoh hand think it shouldn't be used to stall the small&hackish fix of adding the relevant in_atomic checks. -Daniel -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48