drm/msm/kms: Use nested locking for crtc lock instead of custom classes
authorStephen Boyd <swboyd@chromium.org>
Thu, 11 Feb 2021 22:40:58 +0000 (14:40 -0800)
committerRob Clark <robdclark@chromium.org>
Tue, 23 Feb 2021 20:39:29 +0000 (12:39 -0800)
commit743c97ca9dc989b0b08ca1fbfd134a83b37fe9ec
treefb02cd353769e9ccec6a650f7fe04e51571e0188
parent182b4a2d251305201b6f9cae29067f7112f05835
drm/msm/kms: Use nested locking for crtc lock instead of custom classes

We don't need to make up custom lock classes here, we can simply use
mutex_lock_nested() and pass in the index of the crtc to the locking
APIs instead. This helps lockdep understand that these are really
different locks while avoiding having to allocate custom lockdep
classes.

Cc: Krishna Manikandan <mkrishn@codeaurora.org>
Suggested-by: Daniel Vetter <daniel@ffwll.ch>
Fixes: b3d91800d9ac ("drm/msm: Fix race condition in msm driver with async layer updates")
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/msm_atomic.c
drivers/gpu/drm/msm/msm_kms.h