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: Wenjing Liu <Wenjing.Liu@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Wenjing Liu 2018-11-13 18:21:53 -05:00 committed by Alex Deucher
parent 630cb40ffd
commit d5cf79eeda
2 changed files with 11 additions and 1 deletions

View File

@ -840,6 +840,11 @@ alloc_fail:
return NULL;
}
void dc_init_callbacks(struct dc *dc,
const struct dc_callback_init *init_params)
{
}
void dc_destroy(struct dc **dc)
{
destruct(*dc);

View File

@ -339,8 +339,13 @@ struct dc_init_data {
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);
/*******************************************************************************