mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 07:59:42 -04:00
drm/amd/display: Add control flags to force PSR / replay
To change PSR/Replay behavior based on OS preferences, add some config options. Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Karthi Kandasamy <karthi.kandasamy@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
1c65502f81
commit
88fdd89d1c
@@ -628,6 +628,7 @@ struct psr_config {
|
||||
unsigned int line_time_in_us;
|
||||
uint8_t rate_control_caps;
|
||||
uint16_t dsc_slice_height;
|
||||
bool os_request_force_ffu;
|
||||
};
|
||||
|
||||
union dmcu_psr_level {
|
||||
@@ -740,6 +741,7 @@ struct psr_context {
|
||||
unsigned int line_time_in_us;
|
||||
uint8_t rate_control_caps;
|
||||
uint16_t dsc_slice_height;
|
||||
bool os_request_force_ffu;
|
||||
};
|
||||
|
||||
struct colorspace_transform {
|
||||
@@ -1151,6 +1153,8 @@ struct replay_config {
|
||||
bool replay_video_conferencing_optimization_enabled;
|
||||
/* Replay alpm mode */
|
||||
enum dc_alpm_mode alpm_mode;
|
||||
/* Replay full screen only */
|
||||
bool os_request_force_ffu;
|
||||
};
|
||||
|
||||
/* Replay feature flags*/
|
||||
|
||||
@@ -391,7 +391,7 @@ static bool dmub_psr_copy_settings(struct dmub_psr *dmub,
|
||||
sizeof(DP_SINK_DEVICE_STR_ID_1)))
|
||||
link->psr_settings.force_ffu_mode = 1;
|
||||
|
||||
copy_settings_data->force_ffu_mode = link->psr_settings.force_ffu_mode;
|
||||
copy_settings_data->force_ffu_mode = link->psr_settings.force_ffu_mode || psr_context->os_request_force_ffu;
|
||||
|
||||
if (((link->dpcd_caps.fec_cap.bits.FEC_CAPABLE &&
|
||||
!link->dc->debug.disable_fec) &&
|
||||
|
||||
@@ -684,6 +684,7 @@ struct replay_context {
|
||||
/* Controller Id used for Dig Fe source select */
|
||||
enum controller_id controllerId;
|
||||
unsigned int line_time_in_ns;
|
||||
bool os_request_force_ffu;
|
||||
};
|
||||
|
||||
enum dc_replay_enable {
|
||||
|
||||
@@ -870,6 +870,8 @@ bool edp_setup_psr(struct dc_link *link,
|
||||
|
||||
psr_context->dsc_slice_height = psr_config->dsc_slice_height;
|
||||
|
||||
psr_context->os_request_force_ffu = psr_config->os_request_force_ffu;
|
||||
|
||||
if (psr) {
|
||||
link->psr_settings.psr_feature_enabled = psr->funcs->psr_copy_settings(psr,
|
||||
link, psr_context, panel_inst);
|
||||
@@ -1029,6 +1031,8 @@ bool edp_setup_replay(struct dc_link *link, const struct dc_stream_state *stream
|
||||
|
||||
replay_context.line_time_in_ns = lineTimeInNs;
|
||||
|
||||
replay_context.os_request_force_ffu = link->replay_settings.config.os_request_force_ffu;
|
||||
|
||||
link->replay_settings.replay_feature_enabled =
|
||||
replay->funcs->replay_copy_settings(replay, link, &replay_context, panel_inst);
|
||||
if (link->replay_settings.replay_feature_enabled) {
|
||||
|
||||
Reference in New Issue
Block a user