drm/amd/display: Fixed extend to second screen mode hang

1. Fixed acquire free split pipe bug.
	2. Change return value for dc_add_stream_to_ctx
	   from bool to enum.
	4. Remove redundant apply_ctx_for_surface calling
	5. Unlock pipe after back end programming.

Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Yongqiang Sun
2017-09-28 17:18:27 -04:00
committed by Alex Deucher
parent 3af89b96b2
commit 13ab1b4415
4 changed files with 31 additions and 30 deletions

View File

@@ -4495,10 +4495,10 @@ static int dm_update_crtcs_state(struct dc *dc,
DRM_DEBUG_DRIVER("Enabling DRM crtc: %d\n",
crtc->base.id);
if (!dc_add_stream_to_ctx(
if (dc_add_stream_to_ctx(
dc,
dm_state->context,
dm_new_crtc_state->stream)) {
dm_new_crtc_state->stream) != DC_OK) {
ret = -EINVAL;
goto fail;
}