[Intel-gfx] [PATCH 3/3] drm/i915: close rps work vs. rps disable races

Daniel Vetter daniel at ffwll.ch
Sun Sep 4 21:57:31 CEST 2011


On Sun, Sep 04, 2011 at 07:50:08PM +0000, Ben Widawsky wrote:
> So I would rework some of your comments a bit, and I also think it's
> about time we create a central place to cancel workqueue items. Mostly
> because I think this patch is subject to a deadlock with struct_mutex
> (you're holding it when you call gen6_disable_rps(), but you're doing
> cancel_work_sync on a workqueue which attempts to acquire struct_mutex.

Oh dang, you're correct. This will deadlock. And the PMIMR is really just
cosmetic. So putting the cancel_work_sync into intel_modeset_cleanup
sounds like the right approach. And hey, I've already put other work
cancelling stuff there in my last fury at fixing module unload, so it
can't be that bad ;-)

I'll try to write a better patch tomorrow.
-Daniel
-- 
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48



More information about the Intel-gfx mailing list