The sun4i atomic_check implementation uses the deprecated drm_atomic_get_existing_crtc_state() helper.
This hook is called as part of the global atomic_check, thus before the states are swapped. The existing state thus points to the new state, and we can use drm_atomic_get_new_crtc_state() instead. Signed-off-by: Maxime Ripard <mrip...@kernel.org> --- drivers/gpu/drm/sun4i/sun8i_ui_layer.c | 3 +-- drivers/gpu/drm/sun4i/sun8i_vi_layer.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun8i_ui_layer.c b/drivers/gpu/drm/sun4i/sun8i_ui_layer.c index f97be0040aab29cb4e138fcceb20e90c72db0252..94ac6ad6f30688a048e594811d2ae72aaa44376d 100644 --- a/drivers/gpu/drm/sun4i/sun8i_ui_layer.c +++ b/drivers/gpu/drm/sun4i/sun8i_ui_layer.c @@ -204,12 +204,11 @@ static int sun8i_ui_layer_atomic_check(struct drm_plane *plane, int min_scale, max_scale; if (!crtc) return 0; - crtc_state = drm_atomic_get_existing_crtc_state(state, - crtc); + crtc_state = drm_atomic_get_new_crtc_state(state, crtc); if (WARN_ON(!crtc_state)) return -EINVAL; min_scale = DRM_PLANE_NO_SCALING; max_scale = DRM_PLANE_NO_SCALING; diff --git a/drivers/gpu/drm/sun4i/sun8i_vi_layer.c b/drivers/gpu/drm/sun4i/sun8i_vi_layer.c index a09ee4097537fca8b653f34a833b36b69e343ea5..1f77e1d2984548e746805f8323f537f3b4d93198 100644 --- a/drivers/gpu/drm/sun4i/sun8i_vi_layer.c +++ b/drivers/gpu/drm/sun4i/sun8i_vi_layer.c @@ -325,12 +325,11 @@ static int sun8i_vi_layer_atomic_check(struct drm_plane *plane, int min_scale, max_scale; if (!crtc) return 0; - crtc_state = drm_atomic_get_existing_crtc_state(state, - crtc); + crtc_state = drm_atomic_get_new_crtc_state(state, crtc); if (WARN_ON(!crtc_state)) return -EINVAL; min_scale = DRM_PLANE_NO_SCALING; max_scale = DRM_PLANE_NO_SCALING; -- 2.50.1