drm/msm/atomic: Drop per-CRTC locks in reverse order
lockdep dislikes seeing locks unwound in a non-nested fashion.
Fixes: b3d91800d9
("drm/msm: Fix race condition in msm driver with async layer updates")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
This commit is contained in:
Родитель
b3d91800d9
Коммит
cb21f3f882
|
@ -67,7 +67,7 @@ static void unlock_crtcs(struct msm_kms *kms, unsigned int crtc_mask)
|
|||
{
|
||||
struct drm_crtc *crtc;
|
||||
|
||||
for_each_crtc_mask(kms->dev, crtc, crtc_mask)
|
||||
for_each_crtc_mask_reverse(kms->dev, crtc, crtc_mask)
|
||||
mutex_unlock(&kms->commit_lock[drm_crtc_index(crtc)]);
|
||||
}
|
||||
|
||||
|
|
|
@ -196,4 +196,8 @@ int dpu_mdss_init(struct drm_device *dev);
|
|||
drm_for_each_crtc(crtc, dev) \
|
||||
for_each_if (drm_crtc_mask(crtc) & (crtc_mask))
|
||||
|
||||
#define for_each_crtc_mask_reverse(dev, crtc, crtc_mask) \
|
||||
drm_for_each_crtc_reverse(crtc, dev) \
|
||||
for_each_if (drm_crtc_mask(crtc) & (crtc_mask))
|
||||
|
||||
#endif /* __MSM_KMS_H__ */
|
||||
|
|
|
@ -1266,4 +1266,14 @@ static inline struct drm_crtc *drm_crtc_find(struct drm_device *dev,
|
|||
#define drm_for_each_crtc(crtc, dev) \
|
||||
list_for_each_entry(crtc, &(dev)->mode_config.crtc_list, head)
|
||||
|
||||
/**
|
||||
* drm_for_each_crtc_reverse - iterate over all CRTCs in reverse order
|
||||
* @crtc: a &struct drm_crtc as the loop cursor
|
||||
* @dev: the &struct drm_device
|
||||
*
|
||||
* Iterate over all CRTCs of @dev.
|
||||
*/
|
||||
#define drm_for_each_crtc_reverse(crtc, dev) \
|
||||
list_for_each_entry_reverse(crtc, &(dev)->mode_config.crtc_list, head)
|
||||
|
||||
#endif /* __DRM_CRTC_H__ */
|
||||
|
|
Загрузка…
Ссылка в новой задаче