From cb21f3f882ad12811331c1067b9acfc4dd359d3f Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 20 Oct 2020 15:26:00 -0700 Subject: drm/msm/atomic: Drop per-CRTC locks in reverse order lockdep dislikes seeing locks unwound in a non-nested fashion. Fixes: b3d91800d9ac ("drm/msm: Fix race condition in msm driver with async layer updates") Signed-off-by: Rob Clark Reviewed-by: Abhinav Kumar --- include/drm/drm_crtc.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/drm') diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 59b51a09cae6..cd42f79b2890 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.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__ */ -- cgit v1.2.3