]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
commit91eefc05f0ac71902906b2058360e61bd25137fe
tree33fdaad18a9ffc544e68466ab5e64949b6d1a962
parente73ab00e9a0f1731f34d0620a9c55f5c30c4ad4e
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