disp: msm: expose qsync avr step as part of conn mode caps

Add capability to read avr step for each timing mode. This will
be in addition to the existing avr-step-list which is defined
when dfps is enabled. Expose the avr-step as part of each
mode in connector caps to user-mode.
Additionally, change the avr_step connector property to enum
to give usermode just the capability to enable/disable avr-step
and not alter the step value as its fixed from the device tree.

Change-Id: I6d7f8e9fcf03f98abef7640fc741e5e1be8597a1
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
Esse commit está contido em:
Veera Sundaram Sankaran
2023-01-20 15:20:10 -08:00
commit 2e3ba9430c
13 arquivos alterados com 155 adições e 141 exclusões

Ver arquivo

@@ -408,12 +408,11 @@ struct sde_connector_ops {
int (*get_qsync_min_fps)(struct drm_connector_state *conn_state);
/**
* get_avr_step_req - Get the required avr_step for given fps rate
* @display: Pointer to private display structure
* @mode_fps: Fps value in dfps list
* get_avr_step_fps - Get the required avr_step for given fps rate
* @conn_state: Pointer to drm_connector_state structure
* Returns: AVR step fps value on success
*/
int (*get_avr_step_req)(void *display, u32 mode_fps);
int (*get_avr_step_fps)(struct drm_connector_state *conn_state);
/**
* set_submode_info - populate given sub mode blob
@@ -449,6 +448,18 @@ struct sde_connector_ops {
};
/**
* enum sde_connector_avr_step_state: states of avr step fps
* @AVR_STEP_NONE: no-op
* @AVR_STEP_ENABLE: enable AVR step
* #AVR_STEP_DISABLE: disable AVR step
*/
enum sde_connector_avr_step_state {
AVR_STEP_NONE,
AVR_STEP_ENABLE,
AVR_STEP_DISABLE,
};
/**
* enum sde_connector_display_type - list of display types
*/
@@ -556,7 +567,6 @@ struct sde_misr_sign {
* @dimming_bl_notify_enabled: Flag to indicate if dimming bl notify is enabled 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
@@ -631,7 +641,6 @@ struct sde_connector {
u8 hdr_plus_app_ver;
u32 qsync_mode;
bool qsync_updated;
u32 avr_step;
bool colorspace_updated;
@@ -687,13 +696,6 @@ 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