From: Dillon Varone <[email protected]> [Why & How] Adds toggle to immediately restore FAMS2 streams instead of waiting for DRR VTotal changes to latch
Reviewed-by: Alvin Lee <[email protected]> Signed-off-by: Dillon Varone <[email protected]> Signed-off-by: Ray Wu <[email protected]> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 3 +++ drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 2 ++ 4 files changed, 9 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 9f64bea15ea1..8879196b2675 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -711,6 +711,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) /* TODO: Remove after DP2 receiver gets proper support of Cable ID feature */ adev->dm.dc->debug.ignore_cable_id = true; + /* temporary enable immediate restore for FAMS2 */ + adev->dm.dc->debug.fams2_imm_restore_drr = true; + if (adev->dm.dc->caps.dp_hdmi21_pcon_support) drm_info(adev_to_drm(adev), "DP-HDMI FRL PCON supported\n"); diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index e1f1b0602b6d..4b85727aaff9 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -1288,6 +1288,7 @@ struct dc_debug_options { uint32_t dml21_disable_pstate_method_mask; union fw_assisted_mclk_switch_version fams_version; union dmub_fams2_global_feature_config fams2_config; + bool fams2_imm_restore_drr; unsigned int force_cositing; unsigned int disable_spl; unsigned int force_easf; diff --git a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c index 143facdbde54..d08dd372179c 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +++ b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c @@ -1847,6 +1847,9 @@ static void dc_dmub_srv_rb_based_fams2_update_config(struct dc *dc, memcpy(&stream_sub_state_cmd->config, &context->bw_ctx.bw.dcn.fams2_stream_sub_params[i], sizeof(union dmub_cmd_fams2_config)); + + /* temp override */ + stream_base_cmd->config.stream_v1.base.config.bits.imm_restore_drr = dc->debug.fams2_imm_restore_drr; } } diff --git a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h index 105a0f8762e8..a4043c5f22ea 100644 --- a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +++ b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h @@ -2777,6 +2777,7 @@ struct dmub_fams2_stream_static_state { uint8_t is_drr : 1; // stream is DRR enabled uint8_t clamp_vtotal_min : 1; // clamp vtotal to min instead of nominal uint8_t min_ttu_vblank_usable : 1; // if min ttu vblank is above wm, no force pstate is needed in blank + uint8_t imm_restore_drr : 1; // does not wait to latch DRR vtotal on restore } bits; uint8_t all; } config; @@ -2809,6 +2810,7 @@ struct dmub_fams2_cmd_stream_static_base_state { uint8_t is_drr : 1; // stream is DRR enabled uint8_t clamp_vtotal_min : 1; // clamp vtotal to min instead of nominal uint8_t min_ttu_vblank_usable : 1; // if min ttu vblank is above wm, no force pstate is needed in blank + uint8_t imm_restore_drr : 1; // does not wait to latch DRR vtotal on restore } bits; uint8_t all; } config; -- 2.43.0
