Commit e7f93e90 authored by Leo (Sunpeng) Li's avatar Leo (Sunpeng) Li Committed by Alex Deucher

drm/amd/display: Early return on stream programming failure

The fail goto is incorrect. It will incorrectly release the dc_states on
stream programming failure.
Signed-off-by: default avatarLeo (Sunpeng) Li <sunpeng.li@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b674f1ed
...@@ -899,7 +899,7 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c ...@@ -899,7 +899,7 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c
result = dc->hwss.apply_ctx_to_hw(dc, context); result = dc->hwss.apply_ctx_to_hw(dc, context);
if (result != DC_OK) if (result != DC_OK)
goto fail; return result;
if (context->stream_count > 1) { if (context->stream_count > 1) {
enable_timing_multisync(dc, context); enable_timing_multisync(dc, context);
...@@ -938,7 +938,6 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c ...@@ -938,7 +938,6 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c
context->streams[i]->timing.pix_clk_khz); context->streams[i]->timing.pix_clk_khz);
} }
fail:
dc_enable_stereo(dc, context, dc_streams, context->stream_count); dc_enable_stereo(dc, context, dc_streams, context->stream_count);
dc_release_state(dc->current_state); dc_release_state(dc->current_state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment