diff --git a/msm/msm_atomic.c b/msm/msm_atomic.c index fe23fc7fb8..b6ff7035bf 100644 --- a/msm/msm_atomic.c +++ b/msm/msm_atomic.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. * Copyright (C) 2014 Red Hat * Author: Rob Clark @@ -117,11 +117,23 @@ static inline bool _msm_seamless_for_conn(struct drm_connector *connector, if (!old_conn_state || !old_conn_state->crtc) return false; + if (!priv || !priv->kms || !priv->kms->funcs->get_msm_mode) + return false; + + msm_mode = priv->kms->funcs->get_msm_mode( + _msm_get_conn_state(old_conn_state->crtc->state)); + if (!msm_mode) + return false; + if (!old_conn_state->crtc->state->mode_changed && !old_conn_state->crtc->state->active_changed && old_conn_state->crtc->state->connectors_changed) { - if (old_conn_state->crtc == connector->state->crtc) + if (old_conn_state->crtc == connector->state->crtc) { + if (enable && msm_is_private_mode_changed( + _msm_get_conn_state(old_conn_state->crtc->state))) + return false; return true; + } } if (enable) @@ -131,14 +143,6 @@ static inline bool _msm_seamless_for_conn(struct drm_connector *connector, old_conn_state->crtc->state->connectors_changed) return false; - if (!priv || !priv->kms || !priv->kms->funcs->get_msm_mode) - return false; - - msm_mode = priv->kms->funcs->get_msm_mode( - _msm_get_conn_state(old_conn_state->crtc->state)); - if (!msm_mode) - return false; - if (msm_is_mode_seamless(msm_mode) || msm_is_mode_seamless_vrr(msm_mode) || msm_is_mode_seamless_dyn_clk(msm_mode) || @@ -329,7 +333,7 @@ msm_crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *old_state) if (!new_crtc_state->mode_changed && new_crtc_state->connectors_changed) { if (_msm_seamless_for_conn(connector, - old_conn_state, false)) + old_conn_state, true)) continue; } else if (!new_crtc_state->mode_changed) { if (!msm_is_private_mode_changed(