disp: msm: sde: add support for qsync simulated panel logic

Currently, QSYNC sim panels are not fully emulating panel
side logic to allow different refresh rate depending on when
the frame is received by the panel.

This change adds the logic to reconfigure the TE watchdog at
different frame rate depending on when the frame is sent to the
simulated QSYNC panel.

Change-Id: I3f0de73976a0fc5748a76c4f7ab00205d1af9a1b
Signed-off-by: Amine Najahi <quic_anajahi@quicinc.com>
This commit is contained in:
Amine Najahi
2023-01-30 12:57:06 -05:00
committed by Gerrit - the friendly Code Review server
parent 40cd1686f1
commit 2d90a7d4a2
3 changed files with 167 additions and 0 deletions

View File

@@ -111,6 +111,33 @@ enum sde_enc_rc_states {
SDE_ENC_RC_STATE_IDLE
};
/*
* enum sde_sim_qsync_frame - simulated QSYNC frame type
* @SDE_SIM_QSYNC_FRAME_NOMINAL: Frame is triggered early and TE must come at nominal frame rate.
* @SDE_SIM_QSYNC_FRAME_EARLY_OR_LATE: Frame could be triggered early or late and TE must adjust
* accordingly.
* @SDE_SIM_QSYNC_FRAME_TIMEOUT: Frame is triggered too late and TE must adjust to the
* minimum QSYNC FPS.
*/
enum sde_sim_qsync_frame {
SDE_SIM_QSYNC_FRAME_NOMINAL,
SDE_SIM_QSYNC_FRAME_EARLY_OR_LATE,
SDE_SIM_QSYNC_FRAME_TIMEOUT
};
/*
* enum sde_sim_qsync_event - events that simulates a QSYNC panel
* @SDE_SIM_QSYNC_EVENT_FRAME_DETECTED: Event when DDIC is detecting a frame.
* @SDE_SIM_QSYNC_EVENT_TE_TRIGGER: Event when DDIC is triggering TE signal.
*/
enum sde_sim_qsync_event {
SDE_SIM_QSYNC_EVENT_FRAME_DETECTED,
SDE_SIM_QSYNC_EVENT_TE_TRIGGER
};
/* Frame rate value to trigger the watchdog TE in 200 us */
#define SDE_SIM_QSYNC_IMMEDIATE_FPS 5000
/**
* struct sde_encoder_virt - virtual encoder. Container of one or more physical
* encoders. Virtual encoder manages one "logical" display. Physical