Re: [Intel-gfx] [PATCH] drm/i915: Hold struct_mutex during hotplug processing

2011-07-29 Thread Daniel Vetter
On Thu, Jul 28, 2011 at 03:50:00PM -0700, Keith Packard wrote: On Wed, 27 Jul 2011 09:03:31 -0700, Jesse Barnes jbar...@virtuousgeek.org wrote: On Wed, 27 Jul 2011 02:21:24 -0700 Keith Packard kei...@keithp.com wrote: So the work may get executed immediately rather than being run later

Re: [Intel-gfx] [PATCH] drm/i915: Hold struct_mutex during hotplug processing

2011-07-28 Thread Keith Packard
On Wed, 27 Jul 2011 09:03:31 -0700, Jesse Barnes jbar...@virtuousgeek.org wrote: On Wed, 27 Jul 2011 02:21:24 -0700 Keith Packard kei...@keithp.com wrote: On Tue, 26 Jul 2011 12:12:25 -0700, Jesse Barnes jbar...@virtuousgeek.org wrote: I'd like to amend my reviewed by and say the

Re: [Intel-gfx] [PATCH] drm/i915: Hold struct_mutex during hotplug processing

2011-07-27 Thread Keith Packard
On Tue, 26 Jul 2011 12:12:25 -0700, Jesse Barnes jbar...@virtuousgeek.org wrote: I'd like to amend my reviewed by and say the lock shouldn't be held around the call to the drm helper function. It queues some work that also takes the mode config lock, which will break. So you can drop it

Re: [Intel-gfx] [PATCH] drm/i915: Hold struct_mutex during hotplug processing

2011-07-26 Thread Daniel Vetter
Two things I've noticed: - Why not dev-mode_config.mutex? I was under the impression that mode_config.mutex protects most of the modesetting state and dev-struct_mutex protects things related to the gpu execution cores (i.e. all things gem), with struct_mutex nested within mode_config.mutex. It's

Re: [Intel-gfx] [PATCH] drm/i915: Hold struct_mutex during hotplug processing

2011-07-26 Thread Jesse Barnes
On Tue, 26 Jul 2011 08:23:13 -0700 Keith Packard kei...@keithp.com wrote: On Tue, 26 Jul 2011 09:24:39 +0200, Daniel Vetter dan...@ffwll.ch wrote: Two things I've noticed: - Why not dev-mode_config.mutex? You're right, of course. I noticed that just after posting that version and

Re: [Intel-gfx] [PATCH] drm/i915: Hold struct_mutex during hotplug processing

2011-07-25 Thread Jesse Barnes
On Mon, 25 Jul 2011 10:10:29 -0700 Keith Packard kei...@keithp.com wrote: Hotplug detection is a mode setting operation and must hold the struct_mutex or risk colliding with other mode setting operations. In particular, the display port hotplug function attempts to re-train the link if the

Re: [Intel-gfx] [PATCH] drm/i915: Hold struct_mutex during hotplug processing

2011-07-25 Thread Andrew Lutomirski
On Mon, Jul 25, 2011 at 1:37 PM, Jesse Barnes jbar...@virtuousgeek.org wrote: On Mon, 25 Jul 2011 10:10:29 -0700 Keith Packard kei...@keithp.com wrote: Hotplug detection is a mode setting operation and must hold the struct_mutex or risk colliding with other mode setting operations. In

Re: [Intel-gfx] [PATCH] drm/i915: Hold struct_mutex during hotplug processing

2011-07-25 Thread Keith Packard
On Mon, 25 Jul 2011 22:52:15 -0400, Andrew Lutomirski l...@mit.edu wrote: Doesn't help :( Oh, it helps, just not this issue :-) When I do 'xset dpms force off', one of two things happens. Either the display comes back all by itself or it never comes back until I power cycle it. Oh. Right.