summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/dc/dce100
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/dce100
parent6be425f3dc16bac797f300136b976bce46229784 (diff)
downloadlinux-stable-9345d9874c324b2f8cce79d4de11f27ae1ef80e9.tar.gz
linux-stable-9345d9874c324b2f8cce79d4de11f27ae1ef80e9.tar.bz2
linux-stable-9345d9874c324b2f8cce79d4de11f27ae1ef80e9.zip
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/dce100')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
index 6938158bed7f..3d25a90e49b4 100644
--- a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
@@ -651,7 +651,7 @@ static void destruct(struct dce110_resource_pool *pool)
dal_irq_service_destroy(&pool->base.irqs);
}
-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)
@@ -661,7 +661,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;
@@ -673,28 +672,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 */
@@ -769,7 +751,7 @@ enum dc_status dce100_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);
@@ -798,7 +780,7 @@ enum dc_status dce100_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(