disp: msm: sde: support qsync and vrr in same atomic commit

This change adds support to program both qsync and variable
refresh rate in the same atomic commit. During vrr
usecase, if qsync is enabled, avr ctrl gets programmed
during prepare phase as well as after configuring timing
engine. This change also handles such scenarios to prevent
double programming of avr ctrl.

Change-Id: I19461423b0ae08c8204b5edeb98e3d73ce16a21b
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
Цей коміт міститься в:
Yashwanth
2020-09-04 17:46:49 +05:30
джерело cf51cabb69
коміт 30b1dd339b
2 змінених файлів з 16 додано та 3 видалено

Переглянути файл

@@ -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);
}