diff options
author | Rob Clark <robdclark@chromium.org> | 2020-10-21 00:26:00 +0200 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2020-11-01 19:13:09 +0100 |
commit | cb21f3f882ad12811331c1067b9acfc4dd359d3f (patch) | |
tree | a71e1bfa236a2e8da1e132ad942637fa5de65b51 /include/drm/drm_crtc.h | |
parent | drm/msm: Fix race condition in msm driver with async layer updates (diff) | |
download | linux-cb21f3f882ad12811331c1067b9acfc4dd359d3f.tar.xz linux-cb21f3f882ad12811331c1067b9acfc4dd359d3f.zip |
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 <robdclark@chromium.org>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
Diffstat (limited to 'include/drm/drm_crtc.h')
-rw-r--r-- | include/drm/drm_crtc.h | 10 |
1 files changed, 10 insertions, 0 deletions
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__ */ |