Skip to content

Commit

Permalink
drm/amd/display: Don't optimize bandwidth before disabling planes
Browse files Browse the repository at this point in the history
[ Upstream commit 6ad98e8 ]

[Why]
There is a window of time where we optimize bandwidth due to no streams
enabled will enable PSTATE changing but HUBPs are not disabled yet.
This results in underflow counter increasing in some hotplug scenarios.

[How]
Set the optimize-bandwidth flag for later processing once all the HUBPs
are properly disabled.

Signed-off-by: Aric Cyr <aric.cyr@amd.com>
Acked-by: Bindu Ramamurthy <bindu.r@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
AMD-aric authored and gregkh committed May 12, 2021
1 parent e9b75f1 commit 26a5506
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/amd/display/dc/core/dc.c
Expand Up @@ -2398,7 +2398,8 @@ static void commit_planes_do_stream_update(struct dc *dc,
if (pipe_ctx->stream_res.audio && !dc->debug.az_endpoint_mute_only)
pipe_ctx->stream_res.audio->funcs->az_disable(pipe_ctx->stream_res.audio);

dc->hwss.optimize_bandwidth(dc, dc->current_state);
dc->optimized_required = true;

} else {
if (dc->optimize_seamless_boot_streams == 0)
dc->hwss.prepare_bandwidth(dc, dc->current_state);
Expand Down

0 comments on commit 26a5506

Please sign in to comment.