mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
Merge "disp: msm: sde: support qsync and vrr in same atomic commit"
This commit is contained in:
commit
81b698b276
2 changed files with 16 additions and 3 deletions
|
|
@ -2340,6 +2340,7 @@ static int sde_connector_atomic_check(struct drm_connector *connector,
|
|||
struct sde_connector_state *c_state;
|
||||
bool qsync_dirty = false, has_modeset = false;
|
||||
struct drm_connector_state *new_conn_state;
|
||||
struct drm_crtc_state *new_crtc_state = NULL;
|
||||
|
||||
if (!connector) {
|
||||
SDE_ERROR("invalid connector\n");
|
||||
|
|
@ -2355,6 +2356,9 @@ static int sde_connector_atomic_check(struct drm_connector *connector,
|
|||
}
|
||||
|
||||
c_state = to_sde_connector_state(new_conn_state);
|
||||
if (new_conn_state->crtc)
|
||||
new_crtc_state = drm_atomic_get_new_crtc_state(state,
|
||||
new_conn_state->crtc);
|
||||
|
||||
has_modeset = sde_crtc_atomic_check_has_modeset(new_conn_state->state,
|
||||
new_conn_state->crtc);
|
||||
|
|
@ -2363,7 +2367,8 @@ static int sde_connector_atomic_check(struct drm_connector *connector,
|
|||
CONNECTOR_PROP_QSYNC_MODE);
|
||||
|
||||
SDE_DEBUG("has_modeset %d qsync_dirty %d\n", has_modeset, qsync_dirty);
|
||||
if (has_modeset && qsync_dirty) {
|
||||
if (has_modeset && qsync_dirty && new_crtc_state &&
|
||||
!msm_is_mode_seamless_vrr(&new_crtc_state->adjusted_mode)) {
|
||||
SDE_ERROR("invalid qsync update during modeset\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1135,13 +1135,21 @@ static void sde_encoder_phys_vid_handle_post_kickoff(
|
|||
static void sde_encoder_phys_vid_prepare_for_commit(
|
||||
struct sde_encoder_phys *phys_enc)
|
||||
{
|
||||
struct drm_crtc *crtc;
|
||||
|
||||
if (!phys_enc) {
|
||||
if (!phys_enc || !phys_enc->parent) {
|
||||
SDE_ERROR("invalid encoder parameters\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (sde_connector_is_qsync_updated(phys_enc->connector))
|
||||
crtc = phys_enc->parent->crtc;
|
||||
if (!crtc || !crtc->state) {
|
||||
SDE_ERROR("invalid crtc state\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!msm_is_mode_seamless_vrr(&crtc->state->adjusted_mode)
|
||||
&& sde_connector_is_qsync_updated(phys_enc->connector))
|
||||
_sde_encoder_phys_vid_avr_ctrl(phys_enc);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue