On Don, 2012-01-05 at 09:57 +0000, Dave Airlie wrote: > From: Dave Airlie <airlied@xxxxxxxxxx> > > So we have a few places where the drm drivers would like to sleep to > be nice to the system, mainly in the modesetting paths, but we also > have two cases were atomic modesetting must take place, panic writing > and kernel debugger. So provide a central inline to determine if a > sleep or delay should be used and use this in the intel and radeon drivers. > > Based on patch from Michel Dänzer <michel.daenzer@xxxxxxx> > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43941 > > Signed-off-by: Dave Airlie <airlied@xxxxxxxxxx> > --- > drivers/gpu/drm/i915/intel_drv.h | 4 ++-- > drivers/gpu/drm/radeon/atom.c | 2 ++ > include/drm/drmP.h | 8 ++++++++ > 3 files changed, 12 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h > index a1b4343..cf2326b 100644 > --- a/drivers/gpu/drm/i915/intel_drv.h > +++ b/drivers/gpu/drm/i915/intel_drv.h [...] > @@ -48,7 +48,7 @@ > #define wait_for_atomic(COND, MS) _wait_for(COND, MS, 0) > > #define MSLEEP(x) do { \ > - if (in_dbg_master()) \ > + if (!drm_can_sleeep()) \ > mdelay(x); \ So for MSLEEP it's not enough if it can sleep, it has to be able to 'sleeep'? ;) Looks like this macro is unused. Looks good to me otherwise, thanks. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Debian, X and DRI developer _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel