summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/dce112
diff options
context:
space:
mode:
authorAndrey Grodzovsky <Andrey.Grodzovsky@amd.com>2017-07-21 16:34:36 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-09-26 18:15:40 -0400
commit9345d9874c324b2f8cce79d4de11f27ae1ef80e9 (patch)
treebbe93e912570a17ed2ba7153f091cdfed3a49e22 /drivers/gpu/drm/amd/display/dc/dce112
parent6be425f3dc16bac797f300136b976bce46229784 (diff)
drm/amd/display: Move stream validations into seperate function.
Stateless streams validations (not require resource population) moved into hook to be called directly from DM. Call dc_validate_stream be before validate_with_context for non Linux APIs Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com> Reviewed-by: Harry Wentland <Harry.Wentland@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dce112')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
index ca1e13e2a3db..19cd99923b24 100644
--- a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
@@ -720,7 +720,7 @@ static struct clock_source *find_matching_pll(
return 0;
}
-static enum dc_status validate_mapped_resource(
+static enum dc_status build_mapped_resource(
const struct core_dc *dc,
struct validate_context *context,
struct validate_context *old_context)
@@ -730,7 +730,6 @@ static enum dc_status validate_mapped_resource(
for (i = 0; i < context->stream_count; i++) {
struct core_stream *stream = context->streams[i];
- struct dc_link *link = stream->sink->link;
if (old_context && resource_is_stream_unchanged(old_context, stream))
continue;
@@ -742,29 +741,11 @@ static enum dc_status validate_mapped_resource(
if (context->res_ctx.pipe_ctx[j].stream != stream)
continue;
- if (!pipe_ctx->tg->funcs->validate_timing(
- pipe_ctx->tg, &stream->public.timing))
- return DC_FAIL_CONTROLLER_VALIDATE;
-
status = dce110_resource_build_pipe_hw_param(pipe_ctx);
if (status != DC_OK)
return status;
- if (!link->link_enc->funcs->validate_output_with_stream(
- link->link_enc,
- pipe_ctx))
- return DC_FAIL_ENC_VALIDATE;
-
- /* TODO: validate audio ASIC caps, encoder */
-
- status = dc_link_validate_mode_timing(stream,
- link,
- &stream->public.timing);
-
- if (status != DC_OK)
- return status;
-
resource_build_info_frame(pipe_ctx);
/* do not need to validate non root pipes */
@@ -952,7 +933,7 @@ enum dc_status dce112_validate_with_context(
}
if (result == DC_OK)
- result = validate_mapped_resource(dc, context, old_context);
+ result = build_mapped_resource(dc, context, old_context);
if (result == DC_OK)
result = resource_build_scaling_params_for_context(dc, context);
@@ -981,7 +962,7 @@ enum dc_status dce112_validate_guaranteed(
result = resource_map_phy_clock_resources(dc, context, NULL);
if (result == DC_OK)
- result = validate_mapped_resource(dc, context, NULL);
+ result = build_mapped_resource(dc, context, NULL);
if (result == DC_OK) {
validate_guaranteed_copy_streams(