On Mon, May 26, 2014 at 5:04 PM, Rob Clark robdclark@gmail.com wrote:
hmm, ok, I had thought this case, thread B would get -EDEADLK because lock was held, and not his acquire ctx. If that is not the case, then I would propose this:
All places doing things the old way, must grab mode_config.mutex first currently. And we use mode_config.mutex to protect mode_config.acquire_ctx. So all the lower spots grabbing individual crtc mutexes can safely use mode_config.acquire_ctx.
Then the only headache is propagating -EDEADLK up the call stack. If we are lucky, the all already propagate -EINTR, etc.
The output poll work most definitely doesn't propagate -EINTR. Like I've said, this will be painful. And imo doing this also makes the kms locking into quite a mess overall. -Daniel