Merge "disp: msm: update seamless check for cwb + any modeset"
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
d2dfe94cb3
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
|
||||||
* Copyright (C) 2014 Red Hat
|
* Copyright (C) 2014 Red Hat
|
||||||
* Author: Rob Clark <robdclark@gmail.com>
|
* Author: Rob Clark <robdclark@gmail.com>
|
||||||
@@ -114,12 +114,24 @@ static inline bool _msm_seamless_for_conn(struct drm_connector *connector,
|
|||||||
if (!old_conn_state || !old_conn_state->crtc)
|
if (!old_conn_state || !old_conn_state->crtc)
|
||||||
return false;
|
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 &&
|
if (!old_conn_state->crtc->state->mode_changed &&
|
||||||
!old_conn_state->crtc->state->active_changed &&
|
!old_conn_state->crtc->state->active_changed &&
|
||||||
old_conn_state->crtc->state->connectors_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;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (enable)
|
if (enable)
|
||||||
return false;
|
return false;
|
||||||
@@ -128,14 +140,6 @@ static inline bool _msm_seamless_for_conn(struct drm_connector *connector,
|
|||||||
old_conn_state->crtc->state->connectors_changed)
|
old_conn_state->crtc->state->connectors_changed)
|
||||||
return false;
|
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) ||
|
if (msm_is_mode_seamless(msm_mode) ||
|
||||||
msm_is_mode_seamless_vrr(msm_mode) ||
|
msm_is_mode_seamless_vrr(msm_mode) ||
|
||||||
msm_is_mode_seamless_dyn_clk(msm_mode) ||
|
msm_is_mode_seamless_dyn_clk(msm_mode) ||
|
||||||
@@ -326,7 +330,7 @@ msm_crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *old_state)
|
|||||||
if (!new_crtc_state->mode_changed &&
|
if (!new_crtc_state->mode_changed &&
|
||||||
new_crtc_state->connectors_changed) {
|
new_crtc_state->connectors_changed) {
|
||||||
if (_msm_seamless_for_conn(connector,
|
if (_msm_seamless_for_conn(connector,
|
||||||
old_conn_state, false))
|
old_conn_state, true))
|
||||||
continue;
|
continue;
|
||||||
} else if (!new_crtc_state->mode_changed) {
|
} else if (!new_crtc_state->mode_changed) {
|
||||||
if (!msm_is_private_mode_changed(
|
if (!msm_is_private_mode_changed(
|
||||||
|
|||||||
Reference in New Issue
Block a user