mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 01:13:55 +07:00
drm/amd/display: Adding stutter entry wm to dce bw struct
Adding the stutter_entry_wm object to dce_bw_output struct and populating it with bw calculations data Signed-off-by: Mikita Lipski <mikita.lipski@amd.com> Reviewed-by: Harry Wentland <Harry.Wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
c1f8d3fa46
commit
b361521f59
@ -3091,7 +3091,33 @@ bool bw_calcs(struct dc_context *ctx,
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_exit_watermark[9], bw_int_to_fixed(1000)));
|
||||
|
||||
|
||||
calcs_output->stutter_entry_wm_ns[0].a_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[4], bw_int_to_fixed(1000)));
|
||||
calcs_output->stutter_entry_wm_ns[1].a_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[5], bw_int_to_fixed(1000)));
|
||||
calcs_output->stutter_entry_wm_ns[2].a_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[6], bw_int_to_fixed(1000)));
|
||||
if (ctx->dc->caps.max_slave_planes) {
|
||||
calcs_output->stutter_entry_wm_ns[3].a_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[0], bw_int_to_fixed(1000)));
|
||||
calcs_output->stutter_entry_wm_ns[4].a_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[1], bw_int_to_fixed(1000)));
|
||||
} else {
|
||||
calcs_output->stutter_entry_wm_ns[3].a_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[7], bw_int_to_fixed(1000)));
|
||||
calcs_output->stutter_entry_wm_ns[4].a_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[8], bw_int_to_fixed(1000)));
|
||||
}
|
||||
calcs_output->stutter_entry_wm_ns[5].a_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[9], bw_int_to_fixed(1000)));
|
||||
|
||||
calcs_output->urgent_wm_ns[0].a_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
@ -3186,7 +3212,33 @@ bool bw_calcs(struct dc_context *ctx,
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_exit_watermark[9], bw_int_to_fixed(1000)));
|
||||
|
||||
|
||||
calcs_output->stutter_entry_wm_ns[0].b_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[4], bw_int_to_fixed(1000)));
|
||||
calcs_output->stutter_entry_wm_ns[1].b_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[5], bw_int_to_fixed(1000)));
|
||||
calcs_output->stutter_entry_wm_ns[2].b_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[6], bw_int_to_fixed(1000)));
|
||||
if (ctx->dc->caps.max_slave_planes) {
|
||||
calcs_output->stutter_entry_wm_ns[3].b_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[0], bw_int_to_fixed(1000)));
|
||||
calcs_output->stutter_entry_wm_ns[4].b_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[1], bw_int_to_fixed(1000)));
|
||||
} else {
|
||||
calcs_output->stutter_entry_wm_ns[3].b_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[7], bw_int_to_fixed(1000)));
|
||||
calcs_output->stutter_entry_wm_ns[4].b_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[8], bw_int_to_fixed(1000)));
|
||||
}
|
||||
calcs_output->stutter_entry_wm_ns[5].b_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[9], bw_int_to_fixed(1000)));
|
||||
|
||||
calcs_output->urgent_wm_ns[0].b_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
@ -3279,6 +3331,34 @@ bool bw_calcs(struct dc_context *ctx,
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_exit_watermark[9], bw_int_to_fixed(1000)));
|
||||
|
||||
calcs_output->stutter_entry_wm_ns[0].c_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[4], bw_int_to_fixed(1000)));
|
||||
calcs_output->stutter_entry_wm_ns[1].c_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[5], bw_int_to_fixed(1000)));
|
||||
calcs_output->stutter_entry_wm_ns[2].c_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[6], bw_int_to_fixed(1000)));
|
||||
if (ctx->dc->caps.max_slave_planes) {
|
||||
calcs_output->stutter_entry_wm_ns[3].c_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[0], bw_int_to_fixed(1000)));
|
||||
calcs_output->stutter_entry_wm_ns[4].c_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[1], bw_int_to_fixed(1000)));
|
||||
} else {
|
||||
calcs_output->stutter_entry_wm_ns[3].c_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[7], bw_int_to_fixed(1000)));
|
||||
calcs_output->stutter_entry_wm_ns[4].c_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[8], bw_int_to_fixed(1000)));
|
||||
}
|
||||
calcs_output->stutter_entry_wm_ns[5].c_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[9], bw_int_to_fixed(1000)));
|
||||
|
||||
calcs_output->urgent_wm_ns[0].c_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
urgent_watermark[4], bw_int_to_fixed(1000)));
|
||||
@ -3383,6 +3463,33 @@ bool bw_calcs(struct dc_context *ctx,
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_exit_watermark[9], bw_int_to_fixed(1000)));
|
||||
|
||||
calcs_output->stutter_entry_wm_ns[0].d_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[4], bw_int_to_fixed(1000)));
|
||||
calcs_output->stutter_entry_wm_ns[1].d_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[5], bw_int_to_fixed(1000)));
|
||||
calcs_output->stutter_entry_wm_ns[2].d_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[6], bw_int_to_fixed(1000)));
|
||||
if (ctx->dc->caps.max_slave_planes) {
|
||||
calcs_output->stutter_entry_wm_ns[3].d_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[0], bw_int_to_fixed(1000)));
|
||||
calcs_output->stutter_entry_wm_ns[4].d_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[1], bw_int_to_fixed(1000)));
|
||||
} else {
|
||||
calcs_output->stutter_entry_wm_ns[3].d_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[7], bw_int_to_fixed(1000)));
|
||||
calcs_output->stutter_entry_wm_ns[4].d_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[8], bw_int_to_fixed(1000)));
|
||||
}
|
||||
calcs_output->stutter_entry_wm_ns[5].d_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
stutter_entry_watermark[9], bw_int_to_fixed(1000)));
|
||||
|
||||
calcs_output->urgent_wm_ns[0].d_mark =
|
||||
bw_fixed_to_int(bw_mul(data->
|
||||
|
@ -250,6 +250,7 @@ struct dce_bw_output {
|
||||
bool all_displays_in_sync;
|
||||
struct dce_watermarks urgent_wm_ns[MAX_PIPES];
|
||||
struct dce_watermarks stutter_exit_wm_ns[MAX_PIPES];
|
||||
struct dce_watermarks stutter_entry_wm_ns[MAX_PIPES];
|
||||
struct dce_watermarks nbp_state_change_wm_ns[MAX_PIPES];
|
||||
int sclk_khz;
|
||||
int sclk_deep_sleep_khz;
|
||||
|
Loading…
Reference in New Issue
Block a user