Commit a35806b3 authored by David Zhang's avatar David Zhang Committed by Alex Deucher

drm/amd/display: Passing Y-granularity to dmub fw

[Why]
The Y-granularity panel parameter indicate the grid
pattern granularity in the Y direction for PSRSU.

[How]
Send the Y-granularity data by PSR_COPY_SETTINGS dmub command.
Signed-off-by: default avatarDavid Zhang <dingchen.zhang@amd.com>
Acked-by: default avatarLeo Li <sunpeng.li@amd.com>
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4c763180
...@@ -3270,6 +3270,10 @@ bool dc_link_setup_psr(struct dc_link *link, ...@@ -3270,6 +3270,10 @@ bool dc_link_setup_psr(struct dc_link *link,
DP_RECEIVER_ALPM_CONFIG, DP_RECEIVER_ALPM_CONFIG,
&alpm_configuration.raw, &alpm_configuration.raw,
sizeof(alpm_configuration.raw)); sizeof(alpm_configuration.raw));
psr_context->su_granularity_required =
psr_config->su_granularity_required;
psr_context->su_y_granularity =
psr_config->su_y_granularity;
} }
psr_context->channel = link->ddc->ddc_pin->hw_info.ddc_channel; psr_context->channel = link->ddc->ddc_pin->hw_info.ddc_channel;
......
...@@ -672,6 +672,10 @@ struct psr_config { ...@@ -672,6 +672,10 @@ struct psr_config {
unsigned int psr_sdp_transmit_line_num_deadline; unsigned int psr_sdp_transmit_line_num_deadline;
bool allow_smu_optimizations; bool allow_smu_optimizations;
bool allow_multi_disp_optimizations; bool allow_multi_disp_optimizations;
/* Panel self refresh 2 selective update granularity required */
bool su_granularity_required;
/* psr2 selective update y granularity capability */
uint8_t su_y_granularity;
}; };
union dmcu_psr_level { union dmcu_psr_level {
...@@ -775,6 +779,10 @@ struct psr_context { ...@@ -775,6 +779,10 @@ struct psr_context {
unsigned int frame_delay; unsigned int frame_delay;
bool allow_smu_optimizations; bool allow_smu_optimizations;
bool allow_multi_disp_optimizations; bool allow_multi_disp_optimizations;
/* Panel self refresh 2 selective update granularity required */
bool su_granularity_required;
/* psr2 selective update y granularity capability */
uint8_t su_y_granularity;
}; };
struct colorspace_transform { struct colorspace_transform {
......
...@@ -333,6 +333,12 @@ static bool dmub_psr_copy_settings(struct dmub_psr *dmub, ...@@ -333,6 +333,12 @@ static bool dmub_psr_copy_settings(struct dmub_psr *dmub,
copy_settings_data->debug.u32All = 0; copy_settings_data->debug.u32All = 0;
copy_settings_data->debug.bitfields.visual_confirm = dc->dc->debug.visual_confirm == VISUAL_CONFIRM_PSR; copy_settings_data->debug.bitfields.visual_confirm = dc->dc->debug.visual_confirm == VISUAL_CONFIRM_PSR;
copy_settings_data->debug.bitfields.use_hw_lock_mgr = 1; copy_settings_data->debug.bitfields.use_hw_lock_mgr = 1;
if (psr_context->su_granularity_required == 0)
copy_settings_data->su_y_granularity = 0;
else
copy_settings_data->su_y_granularity = psr_context->su_y_granularity;
copy_settings_data->fec_enable_status = (link->fec_state == dc_link_fec_enabled); copy_settings_data->fec_enable_status = (link->fec_state == dc_link_fec_enabled);
copy_settings_data->fec_enable_delay_in100us = link->dc->debug.fec_enable_delay_in100us; copy_settings_data->fec_enable_delay_in100us = link->dc->debug.fec_enable_delay_in100us;
copy_settings_data->cmd_version = DMUB_CMD_PSR_CONTROL_VERSION_1; copy_settings_data->cmd_version = DMUB_CMD_PSR_CONTROL_VERSION_1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment