From: Leo (Sunpeng) Li Date: Wed, 4 Oct 2017 16:47:13 +0000 (-0400) Subject: drm/amd/display: Do not set bandwidth on page flips. X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=3df8fcafb7edab79d76c4c76c93446b91eb4916f;p=openwrt%2Fstaging%2Fblogic.git drm/amd/display: Do not set bandwidth on page flips. Which removes a lockdep warning for a possible deadlock situation: While holding the drm event mutex (hard irq safe), dc_post_update_surfaces_to_stream eventually acquires the atom context lock, which is hard irq unsafe. We should only be calling it on full updates anyways. Also remove a redundant call to dc_post_update_surfaces_to_stream, dc_commit_updates_for_stream already calls it. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 80ddccc2570a..9d750fa29a87 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -980,8 +980,6 @@ bool dc_commit_planes_to_stream( new_plane_count, dc_stream, stream_update, plane_states, state); - dc_post_update_surfaces_to_stream(dc); - kfree(stream_update); return true; } @@ -1418,7 +1416,8 @@ void dc_commit_updates_for_stream(struct dc *dc, update_type, context); - dc_post_update_surfaces_to_stream(dc); + if (update_type >= UPDATE_TYPE_FULL) + dc_post_update_surfaces_to_stream(dc); if (dc->current_state != context) {