]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
drm: Implement drm_modeset_lock_all_ctx()
authorThierry Reding <treding@nvidia.com>
Wed, 2 Dec 2015 16:50:03 +0000 (17:50 +0100)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 6 Apr 2016 09:21:10 +0000 (10:21 +0100)
commit3a8d3abcb0c3975ea6a873cf8ee5d39c7e89c5d8
treee3fbc647ba6532ccff82cbdfe2b5dc1aae716983
parent1667e3cac9ecb4635caf2c985631beab85ee4ddb
drm: Implement drm_modeset_lock_all_ctx()

BugLink: http://bugs.launchpad.net/bugs/1540390
This function is like drm_modeset_lock_all(), but it takes the lock
acquisition context as a parameter rather than storing it in the DRM
device's mode_config structure.

Implement drm_modeset_{,un}lock_all() in terms of the new function for
better code reuse, and add a note to the kerneldoc that new code should
use the new functions.

v2: improve kerneldoc
v4: rename drm_modeset_lock_all_crtcs() to drm_modeset_lock_all_ctx()
    and take mode_config's .connection_mutex instead of .mutex lock to
    avoid lock inversion (Daniel Vetter), use drm_modeset_drop_locks()
    which is now the equivalent of drm_modeset_unlock_all_ctx()
v5: do not take the dev->mode_config.connection_mutex in
    drm_atomic_legacy_backoff() since drm_modeset_lock_all_ctx()
    already keeps it, enhance kerneldoc for drm_modeset_lock_all_ctx()
    (Daniel Vetter)

Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1449075005-13937-1-git-send-email-thierry.reding@gmail.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 06eaae46381737a6236ad6fe81e5358fad3bbbe5)
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
drivers/gpu/drm/drm_atomic.c
drivers/gpu/drm/drm_modeset_lock.c
include/drm/drm_modeset_lock.h