summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/dce80
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/dce80
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/dce80')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
index b2319dbf3be3..0123006e5360 100644
--- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
@@ -667,7 +667,7 @@ static void destruct(struct dce110_resource_pool *pool)
}
}
-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)
@@ -677,7 +677,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;
@@ -689,29 +688,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 */
@@ -786,7 +767,7 @@ enum dc_status dce80_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);
@@ -814,7 +795,7 @@ enum dc_status dce80_validate_guaranteed(
result = resource_map_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(