disp: msm: sde: add support for AVR_STEP feature

Add AVR step support so SW can trigger a late frame and instead
of immediately triggering, HW will perform the update at the
start of the next step interval. This allows for a fixed SW
vsync timeline to be maintained in userland, eliminating the
usual drift from the actual HW vsync caused by a late frame.

This change adds AVR_STEP support via a DRM property.

Change-Id: I4cf8a296989805f134c2165a3bed0b050bb09c96
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
This commit is contained in:
Steve Cohen
2021-01-19 19:27:57 -05:00
والد ccf41a547c
کامیت cf86c94f8e
9فایلهای تغییر یافته به همراه146 افزوده شده و 83 حذف شده

مشاهده پرونده

@@ -484,6 +484,7 @@ struct sde_connector_dyn_hdr_metadata {
* @allow_bl_update: Flag to indicate if BL update is allowed currently or not
* @qsync_mode: Cached Qsync mode, 0=disabled, 1=continuous mode
* @qsync_updated: Qsync settings were updated
* @avr_step: fps rate for fixed steps in AVR mode; 0 means step is disabled
* @colorspace_updated: Colorspace property was updated
* @last_cmd_tx_sts: status of the last command transfer
* @hdr_capable: external hdr support present
@@ -553,6 +554,7 @@ struct sde_connector {
u8 hdr_plus_app_ver;
u32 qsync_mode;
bool qsync_updated;
u32 avr_step;
bool colorspace_updated;
@@ -604,6 +606,13 @@ struct sde_connector {
#define sde_connector_get_qsync_mode(C) \
((C) ? to_sde_connector((C))->qsync_mode : 0)
/**
* sde_connector_get_avr_step - get sde connector's avr_step
* @C: Pointer to drm connector structure
* Returns: Current cached avr_step value for given connector
*/
#define sde_connector_get_avr_step(C) ((C) ? to_sde_connector((C))->avr_step : 0)
/**
* sde_connector_get_propinfo - get sde connector's property info pointer
* @C: Pointer to drm connector structure