summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display
diff options
context:
space:
mode:
authorWenjing Liu <Wenjing.Liu@amd.com>2019-02-20 14:00:55 -0500
committerAlex Deucher <alexander.deucher@amd.com>2019-03-19 15:36:49 -0500
commite6bddf6c67f9a3abf6f1ef75e52bc1cd228dfe4d (patch)
treea48e8b434ccd9fde7233c189e8a222dc0efbd57d /drivers/gpu/drm/amd/display
parent3af91bb15093dd2bf53114b74b333458a03de1c8 (diff)
downloadlinux-stable-e6bddf6c67f9a3abf6f1ef75e52bc1cd228dfe4d.tar.gz
linux-stable-e6bddf6c67f9a3abf6f1ef75e52bc1cd228dfe4d.tar.bz2
linux-stable-e6bddf6c67f9a3abf6f1ef75e52bc1cd228dfe4d.zip
drm/amd/display: add pipe lock during stream update
[why] Stream update will adjust both info packets and stream params, need to make sure all things are applied togather. [how] add pipe lock during stream update Signed-off-by: Wenjing Liu <Wenjing.Liu@amd.com> Reviewed-by: Jun Lei <Jun.Lei@amd.com> Acked-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display')
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index b65551d07e4f..260a01ebd888 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -1672,6 +1672,7 @@ static void commit_planes_do_stream_update(struct dc *dc,
continue;
if (stream_update->dpms_off) {
+ dc->hwss.pipe_control_lock(dc, pipe_ctx, true);
if (*stream_update->dpms_off) {
core_link_disable_stream(pipe_ctx, KEEP_ACQUIRED_RESOURCE);
dc->hwss.optimize_bandwidth(dc, dc->current_state);
@@ -1679,6 +1680,7 @@ static void commit_planes_do_stream_update(struct dc *dc,
dc->hwss.prepare_bandwidth(dc, dc->current_state);
core_link_enable_stream(dc->current_state, pipe_ctx);
}
+ dc->hwss.pipe_control_lock(dc, pipe_ctx, false);
}
if (stream_update->abm_level && pipe_ctx->stream_res.abm) {