Commit 13625c7b authored by Dmytro Laktyushkin's avatar Dmytro Laktyushkin Committed by Alex Deucher

drm/amd/display: create scratch_val_ctx as temp w/a

Signed-off-by: default avatarDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b0070456
...@@ -452,6 +452,8 @@ static void destruct(struct core_dc *dc) ...@@ -452,6 +452,8 @@ static void destruct(struct core_dc *dc)
dm_free(dc->temp_flip_context); dm_free(dc->temp_flip_context);
dc->temp_flip_context = NULL; dc->temp_flip_context = NULL;
dm_free(dc->scratch_val_ctx);
dc->scratch_val_ctx = NULL;
destroy_links(dc); destroy_links(dc);
...@@ -490,6 +492,7 @@ static bool construct(struct core_dc *dc, ...@@ -490,6 +492,7 @@ static bool construct(struct core_dc *dc,
dc->current_context = dm_alloc(sizeof(*dc->current_context)); dc->current_context = dm_alloc(sizeof(*dc->current_context));
dc->temp_flip_context = dm_alloc(sizeof(*dc->temp_flip_context)); dc->temp_flip_context = dm_alloc(sizeof(*dc->temp_flip_context));
dc->scratch_val_ctx = dm_alloc(sizeof(*dc->temp_flip_context));
if (!dc->current_context || !dc->temp_flip_context) { if (!dc->current_context || !dc->temp_flip_context) {
dm_error("%s: failed to create validate ctx\n", __func__); dm_error("%s: failed to create validate ctx\n", __func__);
...@@ -1217,7 +1220,7 @@ bool dc_pre_update_surfaces_to_target( ...@@ -1217,7 +1220,7 @@ bool dc_pre_update_surfaces_to_target(
goto unexpected_fail; goto unexpected_fail;
} }
resource_validate_ctx_destruct(context); resource_validate_ctx_destruct(context);
dm_free(context); core_dc->scratch_val_ctx = context;
context = temp_context; context = temp_context;
} }
......
...@@ -24,6 +24,7 @@ struct core_dc { ...@@ -24,6 +24,7 @@ struct core_dc {
/* TODO: determine max number of targets*/ /* TODO: determine max number of targets*/
struct validate_context *current_context; struct validate_context *current_context;
struct validate_context *temp_flip_context; struct validate_context *temp_flip_context;
struct validate_context *scratch_val_ctx;
struct resource_pool *res_pool; struct resource_pool *res_pool;
/*Power State*/ /*Power State*/
......
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