]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Tighten locking in drm_mode_getconnector
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 13 Dec 2016 23:08:10 +0000 (00:08 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 18 Dec 2016 13:36:43 +0000 (14:36 +0100)
commitf075c227f4b70826bd31d77fa4bbe1f658760b7e
tree33fdaad18a9ffc544e68466ab5e64949b6d1a962
parent9db84fdf39cb4f5ebcc28257120e76ccb7dea060
drm: Tighten locking in drm_mode_getconnector

- Modeset state needs mode_config->connection mutex, that covers
  figuring out the encoder, and reading properties (since in the
  atomic case those need to look at connector->state).

- Don't hold any locks for stuff that's invariant (i.e. possible
  connectors).

- Same for connector lookup and unref, those don't need any locks.

- And finally the probe stuff is only protected by mode_config->mutex.

While at it updated the kerneldoc for these fields in drm_connector
and add docs explaining what's protected by which locks.

Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161213230814.19598-10-daniel.vetter@ffwll.ch
drivers/gpu/drm/drm_connector.c
include/drm/drm_connector.h