Commit d5cf79ee authored by Wenjing Liu's avatar Wenjing Liu Committed by Alex Deucher

drm/amd/display: implement dc_init_callbacks to assign callback pointers after dc_create

[why]
Some components depend on dc to constuct
but need to assign callback functions to dc.

[how]
Instead of assigning dc callback functions in dc_create,
decouple the callback init to a standlone function after dc_create. This
is currently a no-op.
Signed-off-by: default avatarWenjing Liu <Wenjing.Liu@amd.com>
Reviewed-by: default avatarJun Lei <Jun.Lei@amd.com>
Acked-by: default avatarLeo Li <sunpeng.li@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 630cb40f
...@@ -840,6 +840,11 @@ struct dc *dc_create(const struct dc_init_data *init_params) ...@@ -840,6 +840,11 @@ struct dc *dc_create(const struct dc_init_data *init_params)
return NULL; return NULL;
} }
void dc_init_callbacks(struct dc *dc,
const struct dc_callback_init *init_params)
{
}
void dc_destroy(struct dc **dc) void dc_destroy(struct dc **dc)
{ {
destruct(*dc); destruct(*dc);
......
...@@ -339,8 +339,13 @@ struct dc_init_data { ...@@ -339,8 +339,13 @@ struct dc_init_data {
uint32_t log_mask; uint32_t log_mask;
}; };
struct dc *dc_create(const struct dc_init_data *init_params); struct dc_callback_init {
uint8_t reserved;
};
struct dc *dc_create(const struct dc_init_data *init_params);
void dc_init_callbacks(struct dc *dc,
const struct dc_callback_init *init_params);
void dc_destroy(struct dc **dc); void dc_destroy(struct dc **dc);
/******************************************************************************* /*******************************************************************************
......
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