]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Fix getconnector connection_mutex locking
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 5 Jun 2014 09:12:03 +0000 (11:12 +0200)
committerDave Airlie <airlied@redhat.com>
Thu, 5 Jun 2014 21:08:17 +0000 (07:08 +1000)
commita7709f26ea00ddfe2d2cf5b5a06aabc354d74df2
tree72970588b2e6ebbb98aecc61c02208b5a3e9ebf8
parent36911e896c515a4cdbdf0698a2ec4dd08329b880
drm: Fix getconnector connection_mutex locking

I've fumbled my own idea and enthusiastically wrapped all the
getconnector code with the connection_mutex. But we only need it to
chase the connector->encoder link. Even there it's not really needed
since races with userspace won't matter, but better paranoid and
consistent about this stuff.

If we grap it everywhere connector probe callbacks can't grab it
themselves, which means they'll deadlock. i915 does that for the load
detect pipe. Furthermore i915 needs to do a ww dance since we also
need to grab the mutex of the load detect crtc.

This is a regression from

commit 1a3c3970134ccf90cc7c2d18795f0c17f25fe7d3
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Thu May 29 23:54:47 2014 +0200

    drm: Split connection_mutex out of mode_config.mutex (v3)

Cc: Rob Clark <robdclark@gmail.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_crtc.c