summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2022-08-01 16:08:59 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2022-08-01 16:08:59 +0000
commit74b0186d037412f02af9d9469ea14c986f19da04 (patch)
tree2ddc414d93d6dc9c2724dfc24c89db8aadb9d862
parentfecf388a18188bb0a3c5f1e97c5ba56761769164 (diff)
drm/amd/display: Optimize bandwidth on following fast update
From Nicholas Kazlauskas 9581511948582a0ed8da03fb91d2ab658087283d in linux 5.15.y/5.15.58 34316c1e561db0b24e341029f04a5a5bead9a7bc in mainline linux
-rw-r--r--sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c b/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c
index b37c4d2e7a1..46bef173992 100644
--- a/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c
+++ b/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c
@@ -1788,6 +1788,11 @@ void dc_post_update_surfaces_to_stream(struct dc *dc)
post_surface_trace(dc);
+ if (dc->ctx->dce_version >= DCE_VERSION_MAX)
+ TRACE_DCN_CLOCK_STATE(&context->bw_ctx.bw.dcn.clk);
+ else
+ TRACE_DCE_CLOCK_STATE(&context->bw_ctx.bw.dce);
+
if (is_flip_pending_in_pipes(dc, context))
return;
@@ -2974,6 +2979,9 @@ void dc_commit_updates_for_stream(struct dc *dc,
if (new_pipe->plane_state && new_pipe->plane_state != old_pipe->plane_state)
new_pipe->plane_state->force_full_update = true;
}
+ } else if (update_type == UPDATE_TYPE_FAST) {
+ /* Previous frame finished and HW is ready for optimization. */
+ dc_post_update_surfaces_to_stream(dc);
}
@@ -3030,15 +3038,6 @@ void dc_commit_updates_for_stream(struct dc *dc,
pipe_ctx->plane_state->force_full_update = false;
}
}
- /*let's use current_state to update watermark etc*/
- if (update_type >= UPDATE_TYPE_FULL) {
- dc_post_update_surfaces_to_stream(dc);
-
- if (dc_ctx->dce_version >= DCE_VERSION_MAX)
- TRACE_DCN_CLOCK_STATE(&context->bw_ctx.bw.dcn.clk);
- else
- TRACE_DCE_CLOCK_STATE(&context->bw_ctx.bw.dce);
- }
return;