The drm_atomic_get_crtc_state() function calls the deprecated drm_atomic_get_existing_crtc_state() helper to get find if a crtc state had already been allocated and was part of the given drm_atomic_state.
At the point in time where drm_atomic_get_crtc_state() can be called (ie, during atomic_check), the existing state is the new state and drm_atomic_get_existing_crtc_state() can thus be replaced by drm_atomic_get_new_crtc_state(). Reviewed-by: Ville Syrjälä <ville.syrj...@linux.intel.com> Signed-off-by: Maxime Ripard <mrip...@kernel.org> --- To: Maarten Lankhorst <maarten.lankho...@linux.intel.com> To: Maxime Ripard <mrip...@kernel.org> To: Thomas Zimmermann <tzimmerm...@suse.de> --- drivers/gpu/drm/drm_atomic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 15584928f06a9175308c3ef8f1ecbe1b33b17f47..435a93c83149e60e4a1bf4310ee5e865242cac7b 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -347,11 +347,11 @@ drm_atomic_get_crtc_state(struct drm_atomic_state *state, int ret, index = drm_crtc_index(crtc); struct drm_crtc_state *crtc_state; WARN_ON(!state->acquire_ctx); - crtc_state = drm_atomic_get_existing_crtc_state(state, crtc); + crtc_state = drm_atomic_get_new_crtc_state(state, crtc); if (crtc_state) return crtc_state; ret = drm_modeset_lock(&crtc->mutex, state->acquire_ctx); if (ret) -- 2.50.1