Commit 8122a253 authored by Harry Wentland's avatar Harry Wentland Committed by Alex Deucher

drm/amd/display: Move resource_validate_ctx_destruct to dc.h

This will be needed to clean up context once we add it to private
atomic state.
Signed-off-by: default avatarHarry Wentland <harry.wentland@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 927f6eff
......@@ -389,7 +389,7 @@ static void allocate_dc_stream_funcs(struct core_dc *core_dc)
static void destruct(struct core_dc *dc)
{
resource_validate_ctx_destruct(dc->current_context);
dc_resource_validate_ctx_destruct(dc->current_context);
destroy_links(dc);
......@@ -654,7 +654,7 @@ bool dc_validate_resources(
result = core_dc->res_pool->funcs->validate_with_context(
core_dc, set, set_count, context);
resource_validate_ctx_destruct(context);
dc_resource_validate_ctx_destruct(context);
dm_free(context);
context_alloc_fail:
......@@ -684,7 +684,7 @@ bool dc_validate_guaranteed(
result = core_dc->res_pool->funcs->validate_guaranteed(
core_dc, stream, context);
resource_validate_ctx_destruct(context);
dc_resource_validate_ctx_destruct(context);
dm_free(context);
context_alloc_fail:
......@@ -838,7 +838,7 @@ bool dc_commit_streams(
__func__,
result);
BREAK_TO_DEBUGGER();
resource_validate_ctx_destruct(context);
dc_resource_validate_ctx_destruct(context);
goto fail;
}
......@@ -870,7 +870,7 @@ bool dc_commit_streams(
context->streams[i]->public.timing.pix_clk_khz);
}
resource_validate_ctx_destruct(core_dc->current_context);
dc_resource_validate_ctx_destruct(core_dc->current_context);
dm_free(core_dc->current_context);
core_dc->current_context = context;
......@@ -903,7 +903,7 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc)
dm_error("%s: failed to create validate ctx\n", __func__);
return false;
}
resource_validate_ctx_copy_construct(core_dc->current_context, context);
dc_resource_validate_ctx_copy_construct(core_dc->current_context, context);
post_surface_trace(dc);
for (i = 0; i < context->res_ctx.pool->pipe_count; i++)
......@@ -920,9 +920,9 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc)
core_dc->hwss.set_bandwidth(core_dc, context, true);
resource_validate_ctx_copy_construct(context, core_dc->current_context);
dc_resource_validate_ctx_copy_construct(context, core_dc->current_context);
resource_validate_ctx_destruct(context);
dc_resource_validate_ctx_destruct(context);
dm_free(context);
return true;
......@@ -1205,7 +1205,7 @@ void dc_update_surfaces_and_stream(struct dc *dc,
/* initialize scratch memory for building context */
context = dm_alloc(sizeof(*context));
resource_validate_ctx_copy_construct(
dc_resource_validate_ctx_copy_construct(
core_dc->current_context, context);
/* add surface to context */
......@@ -1409,7 +1409,7 @@ void dc_update_surfaces_and_stream(struct dc *dc,
}
if (core_dc->current_context != context) {
resource_validate_ctx_destruct(core_dc->current_context);
dc_resource_validate_ctx_destruct(core_dc->current_context);
dm_free(core_dc->current_context);
core_dc->current_context = context;
......@@ -1418,7 +1418,7 @@ void dc_update_surfaces_and_stream(struct dc *dc,
fail:
if (core_dc->current_context != context) {
resource_validate_ctx_destruct(context);
dc_resource_validate_ctx_destruct(context);
dm_free(context);
}
}
......
......@@ -2050,7 +2050,7 @@ static void set_vsc_info_packet(
/*TODO: stereo 3D support and extend pixel encoding colorimetry*/
}
void resource_validate_ctx_destruct(struct validate_context *context)
void dc_resource_validate_ctx_destruct(struct validate_context *context)
{
int i, j;
......@@ -2069,7 +2069,7 @@ void resource_validate_ctx_destruct(struct validate_context *context)
* Copy src_ctx into dst_ctx and retain all surfaces and streams referenced
* by the src_ctx
*/
void resource_validate_ctx_copy_construct(
void dc_resource_validate_ctx_copy_construct(
const struct validate_context *src_ctx,
struct validate_context *dst_ctx)
{
......
......@@ -522,6 +522,12 @@ bool dc_validate_guaranteed(
const struct dc *dc,
const struct dc_stream *stream);
void dc_resource_validate_ctx_copy_construct(
const struct validate_context *src_ctx,
struct validate_context *dst_ctx);
void dc_resource_validate_ctx_destruct(struct validate_context *context);
/*
* Set up streams and links associated to drive sinks
* The streams parameter is an absolute set of all active streams.
......
......@@ -141,12 +141,6 @@ void resource_validate_ctx_update_pointer_after_copy(
const struct validate_context *src_ctx,
struct validate_context *dst_ctx);
void resource_validate_ctx_copy_construct(
const struct validate_context *src_ctx,
struct validate_context *dst_ctx);
void resource_validate_ctx_destruct(struct validate_context *context);
enum dc_status resource_map_clock_resources(
const struct core_dc *dc,
struct validate_context *context);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment