return false;
}
-/**
- * dc_stream_adjust_vmin_vmax - look up pipe context & update parts of DRR
- * @dc: dc reference
- * @stream: Initial dc stream state
- * @adjust: Updated parameters for vertical_total_min and vertical_total_max
- *
- * Looks up the pipe context of dc_stream_state and updates the
- * vertical_total_min and vertical_total_max of the DRR, Dynamic Refresh
- * Rate, which is a power-saving feature that targets reducing panel
- * refresh rate while the screen is static
- *
- * Return: %true if the pipe context is found and adjusted;
- * %false if the pipe context is not found.
- */
-bool dc_stream_adjust_vmin_vmax(struct dc *dc,
- struct dc_stream_state *stream,
- struct dc_crtc_timing_adjust *adjust)
-{
- int i;
-
- /*
- * Don't adjust DRR while there's bandwidth optimizations pending to
- * avoid conflicting with firmware updates.
- */
- if (dc->ctx->dce_version > DCE_VERSION_MAX) {
- if (dc->optimized_required &&
- (stream->adjust.v_total_max != adjust->v_total_max ||
- stream->adjust.v_total_min != adjust->v_total_min)) {
- stream->adjust.timing_adjust_pending = true;
- return false;
- }
- }
-
- dc_exit_ips_for_hw_access(dc);
-
- stream->adjust.v_total_max = adjust->v_total_max;
- stream->adjust.v_total_mid = adjust->v_total_mid;
- stream->adjust.v_total_mid_frame_num = adjust->v_total_mid_frame_num;
- stream->adjust.v_total_min = adjust->v_total_min;
- stream->adjust.allow_otg_v_count_halt = adjust->allow_otg_v_count_halt;
-
- if (dc->caps.max_v_total != 0 &&
- (adjust->v_total_max > dc->caps.max_v_total || adjust->v_total_min > dc->caps.max_v_total)) {
- stream->adjust.timing_adjust_pending = false;
- if (adjust->allow_otg_v_count_halt)
- return set_long_vtotal(dc, stream, adjust);
- else
- return false;
- }
-
- for (i = 0; i < MAX_PIPES; i++) {
- struct pipe_ctx *pipe = &dc->current_state->res_ctx.pipe_ctx[i];
-
- if (pipe->stream == stream && pipe->stream_res.tg) {
- dc->hwss.set_drr(&pipe,
- 1,
- *adjust);
- stream->adjust.timing_adjust_pending = false;
-
- if (dc->hwss.notify_cursor_offload_drr_update)
- dc->hwss.notify_cursor_offload_drr_update(dc, dc->current_state, stream);
-
- return true;
- }
- }
-
- return false;
-}
-
/**
* dc_stream_get_last_used_drr_vtotal - Looks up the pipe context of
* dc_stream_state and gets the last VTOTAL used by DRR (Dynamic Refresh Rate)
get_fams2_visual_confirm_color(dc, context, pipe_ctx, &(pipe_ctx->visual_confirm_color));
else if (dc->debug.visual_confirm == VISUAL_CONFIRM_VABC)
get_vabc_visual_confirm_color(pipe_ctx, &(pipe_ctx->visual_confirm_color));
+ else if (dc->debug.visual_confirm == VISUAL_CONFIRM_BOOSTED_REFRESH_RATE)
+ get_refresh_rate_confirm_color(pipe_ctx, &(pipe_ctx->visual_confirm_color));
}
}
}
}
}
+/**
+ * dc_stream_adjust_vmin_vmax - look up pipe context & update parts of DRR
+ * @dc: dc reference
+ * @stream: Initial dc stream state
+ * @adjust: Updated parameters for vertical_total_min and vertical_total_max
+ *
+ * Looks up the pipe context of dc_stream_state and updates the
+ * vertical_total_min and vertical_total_max of the DRR, Dynamic Refresh
+ * Rate, which is a power-saving feature that targets reducing panel
+ * refresh rate while the screen is static
+ *
+ * Return: %true if the pipe context is found and adjusted;
+ * %false if the pipe context is not found.
+ */
+bool dc_stream_adjust_vmin_vmax(struct dc *dc,
+ struct dc_stream_state *stream,
+ struct dc_crtc_timing_adjust *adjust)
+{
+ int i;
+
+ /*
+ * Don't adjust DRR while there's bandwidth optimizations pending to
+ * avoid conflicting with firmware updates.
+ */
+ if (dc->ctx->dce_version > DCE_VERSION_MAX) {
+ if (dc->optimized_required &&
+ (stream->adjust.v_total_max != adjust->v_total_max ||
+ stream->adjust.v_total_min != adjust->v_total_min)) {
+ stream->adjust.timing_adjust_pending = true;
+ return false;
+ }
+ }
+
+ dc_exit_ips_for_hw_access(dc);
+
+ stream->adjust.v_total_max = adjust->v_total_max;
+ stream->adjust.v_total_mid = adjust->v_total_mid;
+ stream->adjust.v_total_mid_frame_num = adjust->v_total_mid_frame_num;
+ stream->adjust.v_total_min = adjust->v_total_min;
+ stream->adjust.allow_otg_v_count_halt = adjust->allow_otg_v_count_halt;
+
+ if (dc->caps.max_v_total != 0 &&
+ (adjust->v_total_max > dc->caps.max_v_total || adjust->v_total_min > dc->caps.max_v_total)) {
+ stream->adjust.timing_adjust_pending = false;
+ if (adjust->allow_otg_v_count_halt)
+ return set_long_vtotal(dc, stream, adjust);
+ else
+ return false;
+ }
+
+ for (i = 0; i < MAX_PIPES; i++) {
+ struct pipe_ctx *pipe = &dc->current_state->res_ctx.pipe_ctx[i];
+
+ if (pipe->stream == stream && pipe->stream_res.tg) {
+ dc->hwss.set_drr(&pipe,
+ 1,
+ *adjust);
+ stream->adjust.timing_adjust_pending = false;
+
+ if (dc->debug.visual_confirm == VISUAL_CONFIRM_BOOSTED_REFRESH_RATE) {
+ if (pipe->stream && pipe->plane_state) {
+ dc_update_visual_confirm_color(dc, dc->current_state, pipe);
+ dc->hwss.update_visual_confirm_color(dc, pipe, pipe->plane_res.hubp->mpcc_id);
+
+ }
+ }
+
+ if (dc->hwss.notify_cursor_offload_drr_update)
+ dc->hwss.notify_cursor_offload_drr_update(dc, dc->current_state, stream);
+
+ return true;
+ }
+ }
+
+ return false;
+}
+
static void disable_dangling_plane(struct dc *dc, struct dc_state *context)
{
int i, j;