]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Fix locking in drm_atomic_helper_resume
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 31 May 2017 08:38:13 +0000 (10:38 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 31 May 2017 14:35:45 +0000 (16:35 +0200)
commita2f777cd32113158da4597d487317f2032b70a79
treeda620b7135f48548b9d7ce89a4985cc17917e7b7
parentb14ec43aec46a55ab4b8eda205c2b6dbdb65b5cf
drm: Fix locking in drm_atomic_helper_resume

In the conversion to drop drm_modeset_lock_all and the magic implicit
context I failed to realize that _resume starts out with a pile of
state copies, but not with the locks. And hence drm_atomic_commit
won't grab these for us.

v2: Add locking checks in helpers to make sure we catch this in the
future. Note we can only require the locks in the atomic_check phase,
not in the commit phase. But since any commit is guaranteed to first
run the checks (even for the resume stuff where we use stored
duplicated old state) this should give us full coverage. Requested by
Maarten.

Cc: Jyri Sarha <jsarha@ti.com>
Fixes: c188ef52f1a2 ("drm/atomic-helper: remove modeset_lock_all from helper_resume")
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170531083813.1390-1-daniel.vetter@ffwll.ch
drivers/gpu/drm/drm_atomic_helper.c