Each plane's and CRTC's atomic_check might trigger a full modeset. As this affects the plane's damage handling, evaluate damage clips after running the atomic_check helpers.
Examples can be found in a number of drivers, such as ast, gud, ingenic, mgag200 or vmwgfx, which all set mode_changed in the CRTC state to true. Ingenic even reevaluates damage information in its plane's atomic_check. Doing this after the atomic_check helpers ran benefits all drivers. There's already a damage evaluation before the calls to atomic_check. With a few fixes to drivers, this can be removed. Signed-off-by: Thomas Zimmermann <[email protected]> --- drivers/gpu/drm/drm_atomic_helper.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 51f39edc31ed..4c37299e8ccb 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -1065,6 +1065,10 @@ drm_atomic_helper_check_planes(struct drm_device *dev, } } + for_each_oldnew_plane_in_state(state, plane, old_plane_state, new_plane_state, i) { + drm_atomic_helper_check_plane_damage(state, new_plane_state); + } + return ret; } EXPORT_SYMBOL(drm_atomic_helper_check_planes); -- 2.54.0
