summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
diff options
context:
space:
mode:
authorYongqiang Sun <yongqiang.sun@amd.com>2017-09-28 17:18:27 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-10-21 16:47:05 -0400
commit13ab1b44151195823fa0e2ceace1cf4687266dba (patch)
tree24cf877393ca11b454d1c4e6f2ca1165a39636c9 /drivers/gpu/drm/amd/display/dc/core/dc_resource.c
parent3af89b96b2f22119556b8e89edde72951f6bd410 (diff)
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>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/core/dc_resource.c')
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc_resource.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
index c31dccdc3d2e..c60f53069708 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -1446,7 +1446,7 @@ bool resource_is_stream_unchanged(
return false;
}
-bool dc_add_stream_to_ctx(
+enum dc_status dc_add_stream_to_ctx(
struct dc *dc,
struct dc_state *new_ctx,
struct dc_stream_state *stream)
@@ -1467,7 +1467,7 @@ bool dc_add_stream_to_ctx(
if (res != DC_OK)
DC_ERROR("Adding stream %p to context failed with err %d!\n", stream, res);
- return res == DC_OK;
+ return res;
}
bool dc_remove_stream_from_ctx(
@@ -1640,10 +1640,9 @@ enum dc_status resource_map_pool_resources(
/* acquire new resources */
pipe_idx = acquire_first_free_pipe(&context->res_ctx, pool, stream);
-#if defined(CONFIG_DRM_AMD_DC_DCN1_0)
if (pipe_idx < 0)
- acquire_first_split_pipe(&context->res_ctx, pool, stream);
-#endif
+ pipe_idx = acquire_first_split_pipe(&context->res_ctx, pool, stream);
+
if (pipe_idx < 0)
return DC_NO_CONTROLLER_RESOURCE;