@@ -3034,6 +3034,248 @@ static bool all_displays_in_sync(const struct pipe_ctx pipe[],
return true;
}
+void bw_calcs_mid_phase(struct dc_context *ctx, const struct bw_calcs_dceip *dceip,
+ const struct bw_calcs_vbios *vbios, struct dce_bw_output *calcs_output,
+ struct bw_fixed low_sclk, struct bw_fixed mid1_sclk,
+ struct bw_fixed mid2_sclk, struct bw_fixed mid3_sclk,
+ struct bw_fixed mid_yclk, struct bw_calcs_data *data)
+{
+ ((struct bw_calcs_vbios *)vbios)->low_sclk = mid3_sclk;
+ ((struct bw_calcs_vbios *)vbios)->mid1_sclk = mid3_sclk;
+ ((struct bw_calcs_vbios *)vbios)->mid2_sclk = mid3_sclk;
+ calculate_bandwidth(dceip, vbios, data);
+
+ calcs_output->nbp_state_change_wm_ns[0].b_mark =
+ bw_fixed_to_int(bw_mul(data->
+ nbp_state_change_watermark[4],bw_int_to_fixed(1000)));
+ calcs_output->nbp_state_change_wm_ns[1].b_mark =
+ bw_fixed_to_int(bw_mul(data->
+ nbp_state_change_watermark[5], bw_int_to_fixed(1000)));
+ calcs_output->nbp_state_change_wm_ns[2].b_mark =
+ bw_fixed_to_int(bw_mul(data->
+ nbp_state_change_watermark[6], bw_int_to_fixed(1000)));
+
+ if (ctx->dc->caps.max_slave_planes) {
+ calcs_output->nbp_state_change_wm_ns[3].b_mark =
+ bw_fixed_to_int(bw_mul(data->
+ nbp_state_change_watermark[0], bw_int_to_fixed(1000)));
+ calcs_output->nbp_state_change_wm_ns[4].b_mark =
+ bw_fixed_to_int(bw_mul(data->
+ nbp_state_change_watermark[1], bw_int_to_fixed(1000)));
+ } else {
+ calcs_output->nbp_state_change_wm_ns[3].b_mark =
+ bw_fixed_to_int(bw_mul(data->
+ nbp_state_change_watermark[7], bw_int_to_fixed(1000)));
+ calcs_output->nbp_state_change_wm_ns[4].b_mark =
+ bw_fixed_to_int(bw_mul(data->
+ nbp_state_change_watermark[8], bw_int_to_fixed(1000)));
+ }
+ calcs_output->nbp_state_change_wm_ns[5].b_mark =
+ bw_fixed_to_int(bw_mul(data->
+ nbp_state_change_watermark[9], bw_int_to_fixed(1000)));
+
+ calcs_output->stutter_exit_wm_ns[0].b_mark =
+ bw_fixed_to_int(bw_mul(data->
+ stutter_exit_watermark[4], bw_int_to_fixed(1000)));
+ calcs_output->stutter_exit_wm_ns[1].b_mark =
+ bw_fixed_to_int(bw_mul(data->
+ stutter_exit_watermark[5], bw_int_to_fixed(1000)));
+ calcs_output->stutter_exit_wm_ns[2].b_mark =
+ bw_fixed_to_int(bw_mul(data->
+ stutter_exit_watermark[6], bw_int_to_fixed(1000)));
+ if (ctx->dc->caps.max_slave_planes) {
+ calcs_output->stutter_exit_wm_ns[3].b_mark =
+ bw_fixed_to_int(bw_mul(data->
+ stutter_exit_watermark[0], bw_int_to_fixed(1000)));
+ calcs_output->stutter_exit_wm_ns[4].b_mark =
+ bw_fixed_to_int(bw_mul(data->
+ stutter_exit_watermark[1], bw_int_to_fixed(1000)));
+ } else {
+ calcs_output->stutter_exit_wm_ns[3].b_mark =
+ bw_fixed_to_int(bw_mul(data->
+ stutter_exit_watermark[7], bw_int_to_fixed(1000)));
+ calcs_output->stutter_exit_wm_ns[4].b_mark =
+ bw_fixed_to_int(bw_mul(data->
+ stutter_exit_watermark[8], bw_int_to_fixed(1000)));
+ }
+ calcs_output->stutter_exit_wm_ns[5].b_mark =
+ 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->
+ urgent_watermark[4], bw_int_to_fixed(1000)));
+ calcs_output->urgent_wm_ns[1].b_mark =
+ bw_fixed_to_int(bw_mul(data->
+ urgent_watermark[5], bw_int_to_fixed(1000)));
+ calcs_output->urgent_wm_ns[2].b_mark =
+ bw_fixed_to_int(bw_mul(data->
+ urgent_watermark[6], bw_int_to_fixed(1000)));
+ if (ctx->dc->caps.max_slave_planes) {
+ calcs_output->urgent_wm_ns[3].b_mark =
+ bw_fixed_to_int(bw_mul(data->
+ urgent_watermark[0], bw_int_to_fixed(1000)));
+ calcs_output->urgent_wm_ns[4].b_mark =
+ bw_fixed_to_int(bw_mul(data->
+ urgent_watermark[1], bw_int_to_fixed(1000)));
+ } else {
+ calcs_output->urgent_wm_ns[3].b_mark =
+ bw_fixed_to_int(bw_mul(data->
+ urgent_watermark[7], bw_int_to_fixed(1000)));
+ calcs_output->urgent_wm_ns[4].b_mark =
+ bw_fixed_to_int(bw_mul(data->
+ urgent_watermark[8], bw_int_to_fixed(1000)));
+ }
+ calcs_output->urgent_wm_ns[5].b_mark =
+ bw_fixed_to_int(bw_mul(data->
+ urgent_watermark[9], bw_int_to_fixed(1000)));
+
+ ((struct bw_calcs_vbios *)vbios)->low_sclk = low_sclk;
+ ((struct bw_calcs_vbios *)vbios)->mid1_sclk = mid1_sclk;
+ ((struct bw_calcs_vbios *)vbios)->mid2_sclk = mid2_sclk;
+ ((struct bw_calcs_vbios *)vbios)->low_yclk = mid_yclk;
+ calculate_bandwidth(dceip, vbios, data);
+
+ calcs_output->nbp_state_change_wm_ns[0].c_mark =
+ bw_fixed_to_int(bw_mul(data->
+ nbp_state_change_watermark[4], bw_int_to_fixed(1000)));
+ calcs_output->nbp_state_change_wm_ns[1].c_mark =
+ bw_fixed_to_int(bw_mul(data->
+ nbp_state_change_watermark[5], bw_int_to_fixed(1000)));
+ calcs_output->nbp_state_change_wm_ns[2].c_mark =
+ bw_fixed_to_int(bw_mul(data->
+ nbp_state_change_watermark[6], bw_int_to_fixed(1000)));
+ if (ctx->dc->caps.max_slave_planes) {
+ calcs_output->nbp_state_change_wm_ns[3].c_mark =
+ bw_fixed_to_int(bw_mul(data->
+ nbp_state_change_watermark[0], bw_int_to_fixed(1000)));
+ calcs_output->nbp_state_change_wm_ns[4].c_mark =
+ bw_fixed_to_int(bw_mul(data->
+ nbp_state_change_watermark[1], bw_int_to_fixed(1000)));
+ } else {
+ calcs_output->nbp_state_change_wm_ns[3].c_mark =
+ bw_fixed_to_int(bw_mul(data->
+ nbp_state_change_watermark[7], bw_int_to_fixed(1000)));
+ calcs_output->nbp_state_change_wm_ns[4].c_mark =
+ bw_fixed_to_int(bw_mul(data->
+ nbp_state_change_watermark[8], bw_int_to_fixed(1000)));
+ }
+ calcs_output->nbp_state_change_wm_ns[5].c_mark =
+ bw_fixed_to_int(bw_mul(data->
+ nbp_state_change_watermark[9], bw_int_to_fixed(1000)));
+
+
+ calcs_output->stutter_exit_wm_ns[0].c_mark =
+ bw_fixed_to_int(bw_mul(data->
+ stutter_exit_watermark[4], bw_int_to_fixed(1000)));
+ calcs_output->stutter_exit_wm_ns[1].c_mark =
+ bw_fixed_to_int(bw_mul(data->
+ stutter_exit_watermark[5], bw_int_to_fixed(1000)));
+ calcs_output->stutter_exit_wm_ns[2].c_mark =
+ bw_fixed_to_int(bw_mul(data->
+ stutter_exit_watermark[6], bw_int_to_fixed(1000)));
+ if (ctx->dc->caps.max_slave_planes) {
+ calcs_output->stutter_exit_wm_ns[3].c_mark =
+ bw_fixed_to_int(bw_mul(data->
+ stutter_exit_watermark[0], bw_int_to_fixed(1000)));
+ calcs_output->stutter_exit_wm_ns[4].c_mark =
+ bw_fixed_to_int(bw_mul(data->
+ stutter_exit_watermark[1], bw_int_to_fixed(1000)));
+ } else {
+ calcs_output->stutter_exit_wm_ns[3].c_mark =
+ bw_fixed_to_int(bw_mul(data->
+ stutter_exit_watermark[7], bw_int_to_fixed(1000)));
+ calcs_output->stutter_exit_wm_ns[4].c_mark =
+ bw_fixed_to_int(bw_mul(data->
+ stutter_exit_watermark[8], bw_int_to_fixed(1000)));
+ }
+ calcs_output->stutter_exit_wm_ns[5].c_mark =
+ 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)));
+ calcs_output->urgent_wm_ns[1].c_mark =
+ bw_fixed_to_int(bw_mul(data->
+ urgent_watermark[5], bw_int_to_fixed(1000)));
+ calcs_output->urgent_wm_ns[2].c_mark =
+ bw_fixed_to_int(bw_mul(data->
+ urgent_watermark[6], bw_int_to_fixed(1000)));
+ if (ctx->dc->caps.max_slave_planes) {
+ calcs_output->urgent_wm_ns[3].c_mark =
+ bw_fixed_to_int(bw_mul(data->
+ urgent_watermark[0], bw_int_to_fixed(1000)));
+ calcs_output->urgent_wm_ns[4].c_mark =
+ bw_fixed_to_int(bw_mul(data->
+ urgent_watermark[1], bw_int_to_fixed(1000)));
+ } else {
+ calcs_output->urgent_wm_ns[3].c_mark =
+ bw_fixed_to_int(bw_mul(data->
+ urgent_watermark[7], bw_int_to_fixed(1000)));
+ calcs_output->urgent_wm_ns[4].c_mark =
+ bw_fixed_to_int(bw_mul(data->
+ urgent_watermark[8], bw_int_to_fixed(1000)));
+ }
+ calcs_output->urgent_wm_ns[5].c_mark =
+ bw_fixed_to_int(bw_mul(data->
+ urgent_watermark[9], bw_int_to_fixed(1000)));
+}
+
/*
* Return:
* true - Display(s) configuration supported.
@@ -3228,244 +3470,9 @@ bool bw_calcs(struct dc_context *ctx,
bw_fixed_to_int(bw_mul(data->
urgent_watermark[9], bw_int_to_fixed(1000)));
- if (dceip->version != BW_CALCS_VERSION_CARRIZO) {
- ((struct bw_calcs_vbios *)vbios)->low_sclk = mid3_sclk;
- ((struct bw_calcs_vbios *)vbios)->mid1_sclk = mid3_sclk;
- ((struct bw_calcs_vbios *)vbios)->mid2_sclk = mid3_sclk;
- calculate_bandwidth(dceip, vbios, data);
-
- calcs_output->nbp_state_change_wm_ns[0].b_mark =
- bw_fixed_to_int(bw_mul(data->
- nbp_state_change_watermark[4],bw_int_to_fixed(1000)));
- calcs_output->nbp_state_change_wm_ns[1].b_mark =
- bw_fixed_to_int(bw_mul(data->
- nbp_state_change_watermark[5], bw_int_to_fixed(1000)));
- calcs_output->nbp_state_change_wm_ns[2].b_mark =
- bw_fixed_to_int(bw_mul(data->
- nbp_state_change_watermark[6], bw_int_to_fixed(1000)));
-
- if (ctx->dc->caps.max_slave_planes) {
- calcs_output->nbp_state_change_wm_ns[3].b_mark =
- bw_fixed_to_int(bw_mul(data->
- nbp_state_change_watermark[0], bw_int_to_fixed(1000)));
- calcs_output->nbp_state_change_wm_ns[4].b_mark =
- bw_fixed_to_int(bw_mul(data->
- nbp_state_change_watermark[1], bw_int_to_fixed(1000)));
- } else {
- calcs_output->nbp_state_change_wm_ns[3].b_mark =
- bw_fixed_to_int(bw_mul(data->
- nbp_state_change_watermark[7], bw_int_to_fixed(1000)));
- calcs_output->nbp_state_change_wm_ns[4].b_mark =
- bw_fixed_to_int(bw_mul(data->
- nbp_state_change_watermark[8], bw_int_to_fixed(1000)));
- }
- calcs_output->nbp_state_change_wm_ns[5].b_mark =
- bw_fixed_to_int(bw_mul(data->
- nbp_state_change_watermark[9], bw_int_to_fixed(1000)));
-
-
-
- calcs_output->stutter_exit_wm_ns[0].b_mark =
- bw_fixed_to_int(bw_mul(data->
- stutter_exit_watermark[4], bw_int_to_fixed(1000)));
- calcs_output->stutter_exit_wm_ns[1].b_mark =
- bw_fixed_to_int(bw_mul(data->
- stutter_exit_watermark[5], bw_int_to_fixed(1000)));
- calcs_output->stutter_exit_wm_ns[2].b_mark =
- bw_fixed_to_int(bw_mul(data->
- stutter_exit_watermark[6], bw_int_to_fixed(1000)));
- if (ctx->dc->caps.max_slave_planes) {
- calcs_output->stutter_exit_wm_ns[3].b_mark =
- bw_fixed_to_int(bw_mul(data->
- stutter_exit_watermark[0], bw_int_to_fixed(1000)));
- calcs_output->stutter_exit_wm_ns[4].b_mark =
- bw_fixed_to_int(bw_mul(data->
- stutter_exit_watermark[1], bw_int_to_fixed(1000)));
- } else {
- calcs_output->stutter_exit_wm_ns[3].b_mark =
- bw_fixed_to_int(bw_mul(data->
- stutter_exit_watermark[7], bw_int_to_fixed(1000)));
- calcs_output->stutter_exit_wm_ns[4].b_mark =
- bw_fixed_to_int(bw_mul(data->
- stutter_exit_watermark[8], bw_int_to_fixed(1000)));
- }
- calcs_output->stutter_exit_wm_ns[5].b_mark =
- 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->
- urgent_watermark[4], bw_int_to_fixed(1000)));
- calcs_output->urgent_wm_ns[1].b_mark =
- bw_fixed_to_int(bw_mul(data->
- urgent_watermark[5], bw_int_to_fixed(1000)));
- calcs_output->urgent_wm_ns[2].b_mark =
- bw_fixed_to_int(bw_mul(data->
- urgent_watermark[6], bw_int_to_fixed(1000)));
- if (ctx->dc->caps.max_slave_planes) {
- calcs_output->urgent_wm_ns[3].b_mark =
- bw_fixed_to_int(bw_mul(data->
- urgent_watermark[0], bw_int_to_fixed(1000)));
- calcs_output->urgent_wm_ns[4].b_mark =
- bw_fixed_to_int(bw_mul(data->
- urgent_watermark[1], bw_int_to_fixed(1000)));
- } else {
- calcs_output->urgent_wm_ns[3].b_mark =
- bw_fixed_to_int(bw_mul(data->
- urgent_watermark[7], bw_int_to_fixed(1000)));
- calcs_output->urgent_wm_ns[4].b_mark =
- bw_fixed_to_int(bw_mul(data->
- urgent_watermark[8], bw_int_to_fixed(1000)));
- }
- calcs_output->urgent_wm_ns[5].b_mark =
- bw_fixed_to_int(bw_mul(data->
- urgent_watermark[9], bw_int_to_fixed(1000)));
-
- ((struct bw_calcs_vbios *)vbios)->low_sclk = low_sclk;
- ((struct bw_calcs_vbios *)vbios)->mid1_sclk = mid1_sclk;
- ((struct bw_calcs_vbios *)vbios)->mid2_sclk = mid2_sclk;
- ((struct bw_calcs_vbios *)vbios)->low_yclk = mid_yclk;
- calculate_bandwidth(dceip, vbios, data);
-
- calcs_output->nbp_state_change_wm_ns[0].c_mark =
- bw_fixed_to_int(bw_mul(data->
- nbp_state_change_watermark[4], bw_int_to_fixed(1000)));
- calcs_output->nbp_state_change_wm_ns[1].c_mark =
- bw_fixed_to_int(bw_mul(data->
- nbp_state_change_watermark[5], bw_int_to_fixed(1000)));
- calcs_output->nbp_state_change_wm_ns[2].c_mark =
- bw_fixed_to_int(bw_mul(data->
- nbp_state_change_watermark[6], bw_int_to_fixed(1000)));
- if (ctx->dc->caps.max_slave_planes) {
- calcs_output->nbp_state_change_wm_ns[3].c_mark =
- bw_fixed_to_int(bw_mul(data->
- nbp_state_change_watermark[0], bw_int_to_fixed(1000)));
- calcs_output->nbp_state_change_wm_ns[4].c_mark =
- bw_fixed_to_int(bw_mul(data->
- nbp_state_change_watermark[1], bw_int_to_fixed(1000)));
- } else {
- calcs_output->nbp_state_change_wm_ns[3].c_mark =
- bw_fixed_to_int(bw_mul(data->
- nbp_state_change_watermark[7], bw_int_to_fixed(1000)));
- calcs_output->nbp_state_change_wm_ns[4].c_mark =
- bw_fixed_to_int(bw_mul(data->
- nbp_state_change_watermark[8], bw_int_to_fixed(1000)));
- }
- calcs_output->nbp_state_change_wm_ns[5].c_mark =
- bw_fixed_to_int(bw_mul(data->
- nbp_state_change_watermark[9], bw_int_to_fixed(1000)));
-
-
- calcs_output->stutter_exit_wm_ns[0].c_mark =
- bw_fixed_to_int(bw_mul(data->
- stutter_exit_watermark[4], bw_int_to_fixed(1000)));
- calcs_output->stutter_exit_wm_ns[1].c_mark =
- bw_fixed_to_int(bw_mul(data->
- stutter_exit_watermark[5], bw_int_to_fixed(1000)));
- calcs_output->stutter_exit_wm_ns[2].c_mark =
- bw_fixed_to_int(bw_mul(data->
- stutter_exit_watermark[6], bw_int_to_fixed(1000)));
- if (ctx->dc->caps.max_slave_planes) {
- calcs_output->stutter_exit_wm_ns[3].c_mark =
- bw_fixed_to_int(bw_mul(data->
- stutter_exit_watermark[0], bw_int_to_fixed(1000)));
- calcs_output->stutter_exit_wm_ns[4].c_mark =
- bw_fixed_to_int(bw_mul(data->
- stutter_exit_watermark[1], bw_int_to_fixed(1000)));
- } else {
- calcs_output->stutter_exit_wm_ns[3].c_mark =
- bw_fixed_to_int(bw_mul(data->
- stutter_exit_watermark[7], bw_int_to_fixed(1000)));
- calcs_output->stutter_exit_wm_ns[4].c_mark =
- bw_fixed_to_int(bw_mul(data->
- stutter_exit_watermark[8], bw_int_to_fixed(1000)));
- }
- calcs_output->stutter_exit_wm_ns[5].c_mark =
- 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)));
- calcs_output->urgent_wm_ns[1].c_mark =
- bw_fixed_to_int(bw_mul(data->
- urgent_watermark[5], bw_int_to_fixed(1000)));
- calcs_output->urgent_wm_ns[2].c_mark =
- bw_fixed_to_int(bw_mul(data->
- urgent_watermark[6], bw_int_to_fixed(1000)));
- if (ctx->dc->caps.max_slave_planes) {
- calcs_output->urgent_wm_ns[3].c_mark =
- bw_fixed_to_int(bw_mul(data->
- urgent_watermark[0], bw_int_to_fixed(1000)));
- calcs_output->urgent_wm_ns[4].c_mark =
- bw_fixed_to_int(bw_mul(data->
- urgent_watermark[1], bw_int_to_fixed(1000)));
- } else {
- calcs_output->urgent_wm_ns[3].c_mark =
- bw_fixed_to_int(bw_mul(data->
- urgent_watermark[7], bw_int_to_fixed(1000)));
- calcs_output->urgent_wm_ns[4].c_mark =
- bw_fixed_to_int(bw_mul(data->
- urgent_watermark[8], bw_int_to_fixed(1000)));
- }
- calcs_output->urgent_wm_ns[5].c_mark =
- bw_fixed_to_int(bw_mul(data->
- urgent_watermark[9], bw_int_to_fixed(1000)));
- }
+ if (dceip->version != BW_CALCS_VERSION_CARRIZO)
+ bw_calcs_mid_phase(ctx, dceip, vbios, calcs_output, low_sclk,
+ mid1_sclk, mid2_sclk, mid3_sclk, mid_yclk, data);
if (dceip->version == BW_CALCS_VERSION_CARRIZO) {
((struct bw_calcs_vbios *)vbios)->low_yclk = high_yclk;