drm/amd/display: cleanup of construct and destruct funcs
[Why] Too many construct functions which makes searching difficult, especially on some debuggers. [How] Append all construct and destruct functions with dcn number and object type to make each construct function name unique Signed-off-by: Anthony Koo <Anthony.Koo@amd.com> Reviewed-by: Aric Cyr <Aric.Cyr@amd.com> Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
03527f0d00
commit
d9e32672a1
|
@ -111,7 +111,7 @@ struct dc_bios *bios_parser_create(
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static void destruct(struct bios_parser *bp)
|
||||
static void bios_parser_destruct(struct bios_parser *bp)
|
||||
{
|
||||
kfree(bp->base.bios_local_image);
|
||||
kfree(bp->base.integrated_info);
|
||||
|
@ -126,7 +126,7 @@ static void bios_parser_destroy(struct dc_bios **dcb)
|
|||
return;
|
||||
}
|
||||
|
||||
destruct(bp);
|
||||
bios_parser_destruct(bp);
|
||||
|
||||
kfree(bp);
|
||||
*dcb = NULL;
|
||||
|
|
|
@ -111,7 +111,7 @@ static struct atom_encoder_caps_record *get_encoder_cap_record(
|
|||
|
||||
#define DATA_TABLES(table) (bp->master_data_tbl->listOfdatatables.table)
|
||||
|
||||
static void destruct(struct bios_parser *bp)
|
||||
static void bios_parser2_destruct(struct bios_parser *bp)
|
||||
{
|
||||
kfree(bp->base.bios_local_image);
|
||||
kfree(bp->base.integrated_info);
|
||||
|
@ -126,7 +126,7 @@ static void firmware_parser_destroy(struct dc_bios **dcb)
|
|||
return;
|
||||
}
|
||||
|
||||
destruct(bp);
|
||||
bios_parser2_destruct(bp);
|
||||
|
||||
kfree(bp);
|
||||
*dcb = NULL;
|
||||
|
@ -1925,7 +1925,7 @@ static const struct dc_vbios_funcs vbios_funcs = {
|
|||
.get_board_layout_info = bios_get_board_layout_info,
|
||||
};
|
||||
|
||||
static bool bios_parser_construct(
|
||||
static bool bios_parser2_construct(
|
||||
struct bios_parser *bp,
|
||||
struct bp_init_data *init,
|
||||
enum dce_version dce_version)
|
||||
|
@ -2018,7 +2018,7 @@ struct dc_bios *firmware_parser_create(
|
|||
if (!bp)
|
||||
return NULL;
|
||||
|
||||
if (bios_parser_construct(bp, init, dce_version))
|
||||
if (bios_parser2_construct(bp, init, dce_version))
|
||||
return &bp->base;
|
||||
|
||||
kfree(bp);
|
||||
|
|
|
@ -533,7 +533,7 @@ void dc_stream_set_static_screen_events(struct dc *dc,
|
|||
dc->hwss.set_static_screen_control(pipes_affected, num_pipes_affected, events);
|
||||
}
|
||||
|
||||
static void destruct(struct dc *dc)
|
||||
static void dc_destruct(struct dc *dc)
|
||||
{
|
||||
if (dc->current_state) {
|
||||
dc_release_state(dc->current_state);
|
||||
|
@ -579,7 +579,7 @@ static void destruct(struct dc *dc)
|
|||
|
||||
}
|
||||
|
||||
static bool construct(struct dc *dc,
|
||||
static bool dc_construct(struct dc *dc,
|
||||
const struct dc_init_data *init_params)
|
||||
{
|
||||
struct dc_context *dc_ctx;
|
||||
|
@ -729,7 +729,7 @@ static bool construct(struct dc *dc,
|
|||
|
||||
fail:
|
||||
|
||||
destruct(dc);
|
||||
dc_destruct(dc);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -795,7 +795,7 @@ struct dc *dc_create(const struct dc_init_data *init_params)
|
|||
if (NULL == dc)
|
||||
goto alloc_fail;
|
||||
|
||||
if (false == construct(dc, init_params))
|
||||
if (false == dc_construct(dc, init_params))
|
||||
goto construct_fail;
|
||||
|
||||
full_pipe_count = dc->res_pool->pipe_count;
|
||||
|
@ -852,7 +852,7 @@ void dc_deinit_callbacks(struct dc *dc)
|
|||
|
||||
void dc_destroy(struct dc **dc)
|
||||
{
|
||||
destruct(*dc);
|
||||
dc_destruct(*dc);
|
||||
kfree(*dc);
|
||||
*dc = NULL;
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ enum {
|
|||
/*******************************************************************************
|
||||
* Private functions
|
||||
******************************************************************************/
|
||||
static void destruct(struct dc_link *link)
|
||||
static void dc_link_destruct(struct dc_link *link)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -1244,7 +1244,7 @@ static enum transmitter translate_encoder_to_transmitter(
|
|||
}
|
||||
}
|
||||
|
||||
static bool construct(
|
||||
static bool dc_link_construct(
|
||||
struct dc_link *link,
|
||||
const struct link_init_data *init_params)
|
||||
{
|
||||
|
@ -1446,7 +1446,7 @@ struct dc_link *link_create(const struct link_init_data *init_params)
|
|||
if (NULL == link)
|
||||
goto alloc_fail;
|
||||
|
||||
if (false == construct(link, init_params))
|
||||
if (false == dc_link_construct(link, init_params))
|
||||
goto construct_fail;
|
||||
|
||||
return link;
|
||||
|
@ -1460,7 +1460,7 @@ alloc_fail:
|
|||
|
||||
void link_destroy(struct dc_link **link)
|
||||
{
|
||||
destruct(*link);
|
||||
dc_link_destruct(*link);
|
||||
kfree(*link);
|
||||
*link = NULL;
|
||||
}
|
||||
|
|
|
@ -187,7 +187,7 @@ void dal_ddc_i2c_payloads_add(
|
|||
|
||||
}
|
||||
|
||||
static void construct(
|
||||
static void ddc_service_construct(
|
||||
struct ddc_service *ddc_service,
|
||||
struct ddc_service_init_data *init_data)
|
||||
{
|
||||
|
@ -239,11 +239,11 @@ struct ddc_service *dal_ddc_service_create(
|
|||
if (!ddc_service)
|
||||
return NULL;
|
||||
|
||||
construct(ddc_service, init_data);
|
||||
ddc_service_construct(ddc_service, init_data);
|
||||
return ddc_service;
|
||||
}
|
||||
|
||||
static void destruct(struct ddc_service *ddc)
|
||||
static void ddc_service_destruct(struct ddc_service *ddc)
|
||||
{
|
||||
if (ddc->ddc_pin)
|
||||
dal_gpio_destroy_ddc(&ddc->ddc_pin);
|
||||
|
@ -255,7 +255,7 @@ void dal_ddc_service_destroy(struct ddc_service **ddc)
|
|||
BREAK_TO_DEBUGGER();
|
||||
return;
|
||||
}
|
||||
destruct(*ddc);
|
||||
ddc_service_destruct(*ddc);
|
||||
kfree(*ddc);
|
||||
*ddc = NULL;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
* Private functions
|
||||
******************************************************************************/
|
||||
|
||||
static void destruct(struct dc_sink *sink)
|
||||
static void dc_sink_destruct(struct dc_sink *sink)
|
||||
{
|
||||
if (sink->dc_container_id) {
|
||||
kfree(sink->dc_container_id);
|
||||
|
@ -41,7 +41,7 @@ static void destruct(struct dc_sink *sink)
|
|||
}
|
||||
}
|
||||
|
||||
static bool construct(struct dc_sink *sink, const struct dc_sink_init_data *init_params)
|
||||
static bool dc_sink_construct(struct dc_sink *sink, const struct dc_sink_init_data *init_params)
|
||||
{
|
||||
|
||||
struct dc_link *link = init_params->link;
|
||||
|
@ -75,7 +75,7 @@ void dc_sink_retain(struct dc_sink *sink)
|
|||
static void dc_sink_free(struct kref *kref)
|
||||
{
|
||||
struct dc_sink *sink = container_of(kref, struct dc_sink, refcount);
|
||||
destruct(sink);
|
||||
dc_sink_destruct(sink);
|
||||
kfree(sink);
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ struct dc_sink *dc_sink_create(const struct dc_sink_init_data *init_params)
|
|||
if (NULL == sink)
|
||||
goto alloc_fail;
|
||||
|
||||
if (false == construct(sink, init_params))
|
||||
if (false == dc_sink_construct(sink, init_params))
|
||||
goto construct_fail;
|
||||
|
||||
kref_init(&sink->refcount);
|
||||
|
|
|
@ -58,7 +58,7 @@ void update_stream_signal(struct dc_stream_state *stream, struct dc_sink *sink)
|
|||
}
|
||||
}
|
||||
|
||||
static void construct(struct dc_stream_state *stream,
|
||||
static void dc_stream_construct(struct dc_stream_state *stream,
|
||||
struct dc_sink *dc_sink_data)
|
||||
{
|
||||
uint32_t i = 0;
|
||||
|
@ -127,7 +127,7 @@ static void construct(struct dc_stream_state *stream,
|
|||
stream->ctx->dc_stream_id_count++;
|
||||
}
|
||||
|
||||
static void destruct(struct dc_stream_state *stream)
|
||||
static void dc_stream_destruct(struct dc_stream_state *stream)
|
||||
{
|
||||
dc_sink_release(stream->sink);
|
||||
if (stream->out_transfer_func != NULL) {
|
||||
|
@ -145,7 +145,7 @@ static void dc_stream_free(struct kref *kref)
|
|||
{
|
||||
struct dc_stream_state *stream = container_of(kref, struct dc_stream_state, refcount);
|
||||
|
||||
destruct(stream);
|
||||
dc_stream_destruct(stream);
|
||||
kfree(stream);
|
||||
}
|
||||
|
||||
|
@ -168,7 +168,7 @@ struct dc_stream_state *dc_create_stream_for_sink(
|
|||
if (stream == NULL)
|
||||
return NULL;
|
||||
|
||||
construct(stream, sink);
|
||||
dc_stream_construct(stream, sink);
|
||||
|
||||
kref_init(&stream->refcount);
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
/*******************************************************************************
|
||||
* Private functions
|
||||
******************************************************************************/
|
||||
static void construct(struct dc_context *ctx, struct dc_plane_state *plane_state)
|
||||
static void dc_plane_construct(struct dc_context *ctx, struct dc_plane_state *plane_state)
|
||||
{
|
||||
plane_state->ctx = ctx;
|
||||
|
||||
|
@ -68,7 +68,7 @@ static void construct(struct dc_context *ctx, struct dc_plane_state *plane_state
|
|||
|
||||
}
|
||||
|
||||
static void destruct(struct dc_plane_state *plane_state)
|
||||
static void dc_plane_destruct(struct dc_plane_state *plane_state)
|
||||
{
|
||||
if (plane_state->gamma_correction != NULL) {
|
||||
dc_gamma_release(&plane_state->gamma_correction);
|
||||
|
@ -117,7 +117,7 @@ struct dc_plane_state *dc_create_plane_state(struct dc *dc)
|
|||
return NULL;
|
||||
|
||||
kref_init(&plane_state->refcount);
|
||||
construct(core_dc->ctx, plane_state);
|
||||
dc_plane_construct(core_dc->ctx, plane_state);
|
||||
|
||||
return plane_state;
|
||||
}
|
||||
|
@ -187,7 +187,7 @@ void dc_plane_state_retain(struct dc_plane_state *plane_state)
|
|||
static void dc_plane_state_free(struct kref *kref)
|
||||
{
|
||||
struct dc_plane_state *plane_state = container_of(kref, struct dc_plane_state, refcount);
|
||||
destruct(plane_state);
|
||||
dc_plane_destruct(plane_state);
|
||||
kvfree(plane_state);
|
||||
}
|
||||
|
||||
|
|
|
@ -725,7 +725,7 @@ void dce100_clock_source_destroy(struct clock_source **clk_src)
|
|||
*clk_src = NULL;
|
||||
}
|
||||
|
||||
static void destruct(struct dce110_resource_pool *pool)
|
||||
static void dce100_resource_destruct(struct dce110_resource_pool *pool)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
|
@ -885,7 +885,7 @@ static void dce100_destroy_resource_pool(struct resource_pool **pool)
|
|||
{
|
||||
struct dce110_resource_pool *dce110_pool = TO_DCE110_RES_POOL(*pool);
|
||||
|
||||
destruct(dce110_pool);
|
||||
dce100_resource_destruct(dce110_pool);
|
||||
kfree(dce110_pool);
|
||||
*pool = NULL;
|
||||
}
|
||||
|
@ -950,7 +950,7 @@ static const struct resource_funcs dce100_res_pool_funcs = {
|
|||
.find_first_free_match_stream_enc_for_link = dce100_find_first_free_match_stream_enc_for_link
|
||||
};
|
||||
|
||||
static bool construct(
|
||||
static bool dce100_resource_construct(
|
||||
uint8_t num_virtual_links,
|
||||
struct dc *dc,
|
||||
struct dce110_resource_pool *pool)
|
||||
|
@ -1122,7 +1122,7 @@ static bool construct(
|
|||
return true;
|
||||
|
||||
res_create_fail:
|
||||
destruct(pool);
|
||||
dce100_resource_destruct(pool);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -1137,7 +1137,7 @@ struct resource_pool *dce100_create_resource_pool(
|
|||
if (!pool)
|
||||
return NULL;
|
||||
|
||||
if (construct(num_virtual_links, dc, pool))
|
||||
if (dce100_resource_construct(num_virtual_links, dc, pool))
|
||||
return &pool->base;
|
||||
|
||||
kfree(pool);
|
||||
|
|
|
@ -782,7 +782,7 @@ void dce110_clock_source_destroy(struct clock_source **clk_src)
|
|||
*clk_src = NULL;
|
||||
}
|
||||
|
||||
static void destruct(struct dce110_resource_pool *pool)
|
||||
static void dce110_resource_destruct(struct dce110_resource_pool *pool)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
|
@ -1161,7 +1161,7 @@ static void dce110_destroy_resource_pool(struct resource_pool **pool)
|
|||
{
|
||||
struct dce110_resource_pool *dce110_pool = TO_DCE110_RES_POOL(*pool);
|
||||
|
||||
destruct(dce110_pool);
|
||||
dce110_resource_destruct(dce110_pool);
|
||||
kfree(dce110_pool);
|
||||
*pool = NULL;
|
||||
}
|
||||
|
@ -1313,7 +1313,7 @@ const struct resource_caps *dce110_resource_cap(
|
|||
return &carrizo_resource_cap;
|
||||
}
|
||||
|
||||
static bool construct(
|
||||
static bool dce110_resource_construct(
|
||||
uint8_t num_virtual_links,
|
||||
struct dc *dc,
|
||||
struct dce110_resource_pool *pool,
|
||||
|
@ -1492,7 +1492,7 @@ static bool construct(
|
|||
return true;
|
||||
|
||||
res_create_fail:
|
||||
destruct(pool);
|
||||
dce110_resource_destruct(pool);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1507,7 +1507,7 @@ struct resource_pool *dce110_create_resource_pool(
|
|||
if (!pool)
|
||||
return NULL;
|
||||
|
||||
if (construct(num_virtual_links, dc, pool, asic_id))
|
||||
if (dce110_resource_construct(num_virtual_links, dc, pool, asic_id))
|
||||
return &pool->base;
|
||||
|
||||
kfree(pool);
|
||||
|
|
|
@ -744,7 +744,7 @@ void dce112_clock_source_destroy(struct clock_source **clk_src)
|
|||
*clk_src = NULL;
|
||||
}
|
||||
|
||||
static void destruct(struct dce110_resource_pool *pool)
|
||||
static void dce112_resource_destruct(struct dce110_resource_pool *pool)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
|
@ -1013,7 +1013,7 @@ static void dce112_destroy_resource_pool(struct resource_pool **pool)
|
|||
{
|
||||
struct dce110_resource_pool *dce110_pool = TO_DCE110_RES_POOL(*pool);
|
||||
|
||||
destruct(dce110_pool);
|
||||
dce112_resource_destruct(dce110_pool);
|
||||
kfree(dce110_pool);
|
||||
*pool = NULL;
|
||||
}
|
||||
|
@ -1186,7 +1186,7 @@ const struct resource_caps *dce112_resource_cap(
|
|||
return &polaris_10_resource_cap;
|
||||
}
|
||||
|
||||
static bool construct(
|
||||
static bool dce112_resource_construct(
|
||||
uint8_t num_virtual_links,
|
||||
struct dc *dc,
|
||||
struct dce110_resource_pool *pool)
|
||||
|
@ -1372,7 +1372,7 @@ static bool construct(
|
|||
return true;
|
||||
|
||||
res_create_fail:
|
||||
destruct(pool);
|
||||
dce112_resource_destruct(pool);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1386,7 +1386,7 @@ struct resource_pool *dce112_create_resource_pool(
|
|||
if (!pool)
|
||||
return NULL;
|
||||
|
||||
if (construct(num_virtual_links, dc, pool))
|
||||
if (dce112_resource_construct(num_virtual_links, dc, pool))
|
||||
return &pool->base;
|
||||
|
||||
kfree(pool);
|
||||
|
|
|
@ -587,7 +587,7 @@ static void dce120_transform_destroy(struct transform **xfm)
|
|||
*xfm = NULL;
|
||||
}
|
||||
|
||||
static void destruct(struct dce110_resource_pool *pool)
|
||||
static void dce120_resource_destruct(struct dce110_resource_pool *pool)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
|
@ -872,7 +872,7 @@ static void dce120_destroy_resource_pool(struct resource_pool **pool)
|
|||
{
|
||||
struct dce110_resource_pool *dce110_pool = TO_DCE110_RES_POOL(*pool);
|
||||
|
||||
destruct(dce110_pool);
|
||||
dce120_resource_destruct(dce110_pool);
|
||||
kfree(dce110_pool);
|
||||
*pool = NULL;
|
||||
}
|
||||
|
@ -1024,7 +1024,7 @@ static uint32_t read_pipe_fuses(struct dc_context *ctx)
|
|||
return value;
|
||||
}
|
||||
|
||||
static bool construct(
|
||||
static bool dce120_resource_construct(
|
||||
uint8_t num_virtual_links,
|
||||
struct dc *dc,
|
||||
struct dce110_resource_pool *pool)
|
||||
|
@ -1237,7 +1237,7 @@ controller_create_fail:
|
|||
clk_src_create_fail:
|
||||
res_create_fail:
|
||||
|
||||
destruct(pool);
|
||||
dce120_resource_destruct(pool);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -1252,7 +1252,7 @@ struct resource_pool *dce120_create_resource_pool(
|
|||
if (!pool)
|
||||
return NULL;
|
||||
|
||||
if (construct(num_virtual_links, dc, pool))
|
||||
if (dce120_resource_construct(num_virtual_links, dc, pool))
|
||||
return &pool->base;
|
||||
|
||||
kfree(pool);
|
||||
|
|
|
@ -773,7 +773,7 @@ static struct input_pixel_processor *dce80_ipp_create(
|
|||
return &ipp->base;
|
||||
}
|
||||
|
||||
static void destruct(struct dce110_resource_pool *pool)
|
||||
static void dce80_resource_destruct(struct dce110_resource_pool *pool)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
|
@ -901,7 +901,7 @@ static void dce80_destroy_resource_pool(struct resource_pool **pool)
|
|||
{
|
||||
struct dce110_resource_pool *dce110_pool = TO_DCE110_RES_POOL(*pool);
|
||||
|
||||
destruct(dce110_pool);
|
||||
dce80_resource_destruct(dce110_pool);
|
||||
kfree(dce110_pool);
|
||||
*pool = NULL;
|
||||
}
|
||||
|
@ -1093,7 +1093,7 @@ static bool dce80_construct(
|
|||
return true;
|
||||
|
||||
res_create_fail:
|
||||
destruct(pool);
|
||||
dce80_resource_destruct(pool);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1290,7 +1290,7 @@ static bool dce81_construct(
|
|||
return true;
|
||||
|
||||
res_create_fail:
|
||||
destruct(pool);
|
||||
dce80_resource_destruct(pool);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1483,7 +1483,7 @@ static bool dce83_construct(
|
|||
return true;
|
||||
|
||||
res_create_fail:
|
||||
destruct(pool);
|
||||
dce80_resource_destruct(pool);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -919,7 +919,7 @@ static struct pp_smu_funcs *dcn10_pp_smu_create(struct dc_context *ctx)
|
|||
return pp_smu;
|
||||
}
|
||||
|
||||
static void destruct(struct dcn10_resource_pool *pool)
|
||||
static void dcn10_resource_destruct(struct dcn10_resource_pool *pool)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
|
@ -1166,7 +1166,7 @@ static void dcn10_destroy_resource_pool(struct resource_pool **pool)
|
|||
{
|
||||
struct dcn10_resource_pool *dcn10_pool = TO_DCN10_RES_POOL(*pool);
|
||||
|
||||
destruct(dcn10_pool);
|
||||
dcn10_resource_destruct(dcn10_pool);
|
||||
kfree(dcn10_pool);
|
||||
*pool = NULL;
|
||||
}
|
||||
|
@ -1305,7 +1305,7 @@ static uint32_t read_pipe_fuses(struct dc_context *ctx)
|
|||
return value;
|
||||
}
|
||||
|
||||
static bool construct(
|
||||
static bool dcn10_resource_construct(
|
||||
uint8_t num_virtual_links,
|
||||
struct dc *dc,
|
||||
struct dcn10_resource_pool *pool)
|
||||
|
@ -1592,7 +1592,7 @@ static bool construct(
|
|||
|
||||
fail:
|
||||
|
||||
destruct(pool);
|
||||
dcn10_resource_destruct(pool);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -1607,7 +1607,7 @@ struct resource_pool *dcn10_create_resource_pool(
|
|||
if (!pool)
|
||||
return NULL;
|
||||
|
||||
if (construct(init_data->num_virtual_links, dc, pool))
|
||||
if (dcn10_resource_construct(init_data->num_virtual_links, dc, pool))
|
||||
return &pool->base;
|
||||
|
||||
kfree(pool);
|
||||
|
|
|
@ -1226,7 +1226,7 @@ void dcn20_dsc_destroy(struct display_stream_compressor **dsc)
|
|||
}
|
||||
|
||||
|
||||
static void destruct(struct dcn20_resource_pool *pool)
|
||||
static void dcn20_resource_destruct(struct dcn20_resource_pool *pool)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
|
@ -2886,7 +2886,7 @@ static void dcn20_destroy_resource_pool(struct resource_pool **pool)
|
|||
{
|
||||
struct dcn20_resource_pool *dcn20_pool = TO_DCN20_RES_POOL(*pool);
|
||||
|
||||
destruct(dcn20_pool);
|
||||
dcn20_resource_destruct(dcn20_pool);
|
||||
kfree(dcn20_pool);
|
||||
*pool = NULL;
|
||||
}
|
||||
|
@ -3342,7 +3342,7 @@ static bool init_soc_bounding_box(struct dc *dc,
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool construct(
|
||||
static bool dcn20_resource_construct(
|
||||
uint8_t num_virtual_links,
|
||||
struct dc *dc,
|
||||
struct dcn20_resource_pool *pool)
|
||||
|
@ -3659,7 +3659,7 @@ static bool construct(
|
|||
|
||||
create_fail:
|
||||
|
||||
destruct(pool);
|
||||
dcn20_resource_destruct(pool);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -3674,7 +3674,7 @@ struct resource_pool *dcn20_create_resource_pool(
|
|||
if (!pool)
|
||||
return NULL;
|
||||
|
||||
if (construct(init_data->num_virtual_links, dc, pool))
|
||||
if (dcn20_resource_construct(init_data->num_virtual_links, dc, pool))
|
||||
return &pool->base;
|
||||
|
||||
BREAK_TO_DEBUGGER();
|
||||
|
|
|
@ -844,7 +844,7 @@ enum dcn20_clk_src_array_id {
|
|||
DCN20_CLK_SRC_TOTAL_DCN21
|
||||
};
|
||||
|
||||
static void destruct(struct dcn21_resource_pool *pool)
|
||||
static void dcn21_resource_destruct(struct dcn21_resource_pool *pool)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
|
@ -1146,7 +1146,7 @@ static void dcn21_destroy_resource_pool(struct resource_pool **pool)
|
|||
{
|
||||
struct dcn21_resource_pool *dcn21_pool = TO_DCN21_RES_POOL(*pool);
|
||||
|
||||
destruct(dcn21_pool);
|
||||
dcn21_resource_destruct(dcn21_pool);
|
||||
kfree(dcn21_pool);
|
||||
*pool = NULL;
|
||||
}
|
||||
|
@ -1624,7 +1624,7 @@ static struct resource_funcs dcn21_res_pool_funcs = {
|
|||
.update_bw_bounding_box = update_bw_bounding_box
|
||||
};
|
||||
|
||||
static bool construct(
|
||||
static bool dcn21_resource_construct(
|
||||
uint8_t num_virtual_links,
|
||||
struct dc *dc,
|
||||
struct dcn21_resource_pool *pool)
|
||||
|
@ -1876,7 +1876,7 @@ static bool construct(
|
|||
|
||||
create_fail:
|
||||
|
||||
destruct(pool);
|
||||
dcn21_resource_destruct(pool);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -1891,7 +1891,7 @@ struct resource_pool *dcn21_create_resource_pool(
|
|||
if (!pool)
|
||||
return NULL;
|
||||
|
||||
if (construct(init_data->num_virtual_links, dc, pool))
|
||||
if (dcn21_resource_construct(init_data->num_virtual_links, dc, pool))
|
||||
return &pool->base;
|
||||
|
||||
BREAK_TO_DEBUGGER();
|
||||
|
|
|
@ -48,18 +48,18 @@
|
|||
|
||||
struct gpio;
|
||||
|
||||
static void destruct(
|
||||
static void dal_hw_ddc_destruct(
|
||||
struct hw_ddc *pin)
|
||||
{
|
||||
dal_hw_gpio_destruct(&pin->base);
|
||||
}
|
||||
|
||||
static void destroy(
|
||||
static void dal_hw_ddc_destroy(
|
||||
struct hw_gpio_pin **ptr)
|
||||
{
|
||||
struct hw_ddc *pin = HW_DDC_FROM_BASE(*ptr);
|
||||
|
||||
destruct(pin);
|
||||
dal_hw_ddc_destruct(pin);
|
||||
|
||||
kfree(pin);
|
||||
|
||||
|
@ -207,7 +207,7 @@ static enum gpio_result set_config(
|
|||
}
|
||||
|
||||
static const struct hw_gpio_pin_funcs funcs = {
|
||||
.destroy = destroy,
|
||||
.destroy = dal_hw_ddc_destroy,
|
||||
.open = dal_hw_gpio_open,
|
||||
.get_value = dal_hw_gpio_get_value,
|
||||
.set_value = dal_hw_gpio_set_value,
|
||||
|
@ -216,7 +216,7 @@ static const struct hw_gpio_pin_funcs funcs = {
|
|||
.close = dal_hw_gpio_close,
|
||||
};
|
||||
|
||||
static void construct(
|
||||
static void dal_hw_ddc_construct(
|
||||
struct hw_ddc *ddc,
|
||||
enum gpio_id id,
|
||||
uint32_t en,
|
||||
|
@ -243,7 +243,7 @@ void dal_hw_ddc_init(
|
|||
return;
|
||||
}
|
||||
|
||||
construct(*hw_ddc, id, en, ctx);
|
||||
dal_hw_ddc_construct(*hw_ddc, id, en, ctx);
|
||||
}
|
||||
|
||||
struct hw_gpio_pin *dal_hw_ddc_get_pin(struct gpio *gpio)
|
||||
|
|
|
@ -46,22 +46,13 @@
|
|||
|
||||
struct gpio;
|
||||
|
||||
static void dal_hw_generic_construct(
|
||||
struct hw_generic *pin,
|
||||
enum gpio_id id,
|
||||
uint32_t en,
|
||||
struct dc_context *ctx)
|
||||
{
|
||||
dal_hw_gpio_construct(&pin->base, id, en, ctx);
|
||||
}
|
||||
|
||||
static void dal_hw_generic_destruct(
|
||||
struct hw_generic *pin)
|
||||
{
|
||||
dal_hw_gpio_destruct(&pin->base);
|
||||
}
|
||||
|
||||
static void destroy(
|
||||
static void dal_hw_generic_destroy(
|
||||
struct hw_gpio_pin **ptr)
|
||||
{
|
||||
struct hw_generic *generic = HW_GENERIC_FROM_BASE(*ptr);
|
||||
|
@ -90,7 +81,7 @@ static enum gpio_result set_config(
|
|||
}
|
||||
|
||||
static const struct hw_gpio_pin_funcs funcs = {
|
||||
.destroy = destroy,
|
||||
.destroy = dal_hw_generic_destroy,
|
||||
.open = dal_hw_gpio_open,
|
||||
.get_value = dal_hw_gpio_get_value,
|
||||
.set_value = dal_hw_gpio_set_value,
|
||||
|
@ -99,14 +90,14 @@ static const struct hw_gpio_pin_funcs funcs = {
|
|||
.close = dal_hw_gpio_close,
|
||||
};
|
||||
|
||||
static void construct(
|
||||
struct hw_generic *generic,
|
||||
static void dal_hw_generic_construct(
|
||||
struct hw_generic *pin,
|
||||
enum gpio_id id,
|
||||
uint32_t en,
|
||||
struct dc_context *ctx)
|
||||
{
|
||||
dal_hw_generic_construct(generic, id, en, ctx);
|
||||
generic->base.base.funcs = &funcs;
|
||||
dal_hw_gpio_construct(&pin->base, id, en, ctx);
|
||||
pin->base.base.funcs = &funcs;
|
||||
}
|
||||
|
||||
void dal_hw_generic_init(
|
||||
|
@ -126,7 +117,7 @@ void dal_hw_generic_init(
|
|||
return;
|
||||
}
|
||||
|
||||
construct(*hw_generic, id, en, ctx);
|
||||
dal_hw_generic_construct(*hw_generic, id, en, ctx);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -46,34 +46,18 @@
|
|||
|
||||
struct gpio;
|
||||
|
||||
static void dal_hw_hpd_construct(
|
||||
struct hw_hpd *pin,
|
||||
enum gpio_id id,
|
||||
uint32_t en,
|
||||
struct dc_context *ctx)
|
||||
{
|
||||
dal_hw_gpio_construct(&pin->base, id, en, ctx);
|
||||
}
|
||||
|
||||
static void dal_hw_hpd_destruct(
|
||||
struct hw_hpd *pin)
|
||||
{
|
||||
dal_hw_gpio_destruct(&pin->base);
|
||||
}
|
||||
|
||||
|
||||
static void destruct(
|
||||
struct hw_hpd *hpd)
|
||||
{
|
||||
dal_hw_hpd_destruct(hpd);
|
||||
}
|
||||
|
||||
static void destroy(
|
||||
static void dal_hw_hpd_destroy(
|
||||
struct hw_gpio_pin **ptr)
|
||||
{
|
||||
struct hw_hpd *hpd = HW_HPD_FROM_BASE(*ptr);
|
||||
|
||||
destruct(hpd);
|
||||
dal_hw_hpd_destruct(hpd);
|
||||
|
||||
kfree(hpd);
|
||||
|
||||
|
@ -120,7 +104,7 @@ static enum gpio_result set_config(
|
|||
}
|
||||
|
||||
static const struct hw_gpio_pin_funcs funcs = {
|
||||
.destroy = destroy,
|
||||
.destroy = dal_hw_hpd_destroy,
|
||||
.open = dal_hw_gpio_open,
|
||||
.get_value = get_value,
|
||||
.set_value = dal_hw_gpio_set_value,
|
||||
|
@ -129,14 +113,14 @@ static const struct hw_gpio_pin_funcs funcs = {
|
|||
.close = dal_hw_gpio_close,
|
||||
};
|
||||
|
||||
static void construct(
|
||||
struct hw_hpd *hpd,
|
||||
static void dal_hw_hpd_construct(
|
||||
struct hw_hpd *pin,
|
||||
enum gpio_id id,
|
||||
uint32_t en,
|
||||
struct dc_context *ctx)
|
||||
{
|
||||
dal_hw_hpd_construct(hpd, id, en, ctx);
|
||||
hpd->base.base.funcs = &funcs;
|
||||
dal_hw_gpio_construct(&pin->base, id, en, ctx);
|
||||
pin->base.base.funcs = &funcs;
|
||||
}
|
||||
|
||||
void dal_hw_hpd_init(
|
||||
|
@ -156,7 +140,7 @@ void dal_hw_hpd_init(
|
|||
return;
|
||||
}
|
||||
|
||||
construct(*hw_hpd, id, en, ctx);
|
||||
dal_hw_hpd_construct(*hw_hpd, id, en, ctx);
|
||||
}
|
||||
|
||||
struct hw_gpio_pin *dal_hw_hpd_get_pin(struct gpio *gpio)
|
||||
|
|
|
@ -403,7 +403,7 @@ static const struct irq_service_funcs irq_service_funcs_dce110 = {
|
|||
.to_dal_irq_source = to_dal_irq_source_dce110
|
||||
};
|
||||
|
||||
static void construct(struct irq_service *irq_service,
|
||||
static void dce110_irq_construct(struct irq_service *irq_service,
|
||||
struct irq_service_init_data *init_data)
|
||||
{
|
||||
dal_irq_service_construct(irq_service, init_data);
|
||||
|
@ -421,6 +421,6 @@ dal_irq_service_dce110_create(struct irq_service_init_data *init_data)
|
|||
if (!irq_service)
|
||||
return NULL;
|
||||
|
||||
construct(irq_service, init_data);
|
||||
dce110_irq_construct(irq_service, init_data);
|
||||
return irq_service;
|
||||
}
|
||||
|
|
|
@ -273,7 +273,7 @@ static const struct irq_service_funcs irq_service_funcs_dce120 = {
|
|||
.to_dal_irq_source = to_dal_irq_source_dce110
|
||||
};
|
||||
|
||||
static void construct(
|
||||
static void dce120_irq_construct(
|
||||
struct irq_service *irq_service,
|
||||
struct irq_service_init_data *init_data)
|
||||
{
|
||||
|
@ -292,6 +292,6 @@ struct irq_service *dal_irq_service_dce120_create(
|
|||
if (!irq_service)
|
||||
return NULL;
|
||||
|
||||
construct(irq_service, init_data);
|
||||
dce120_irq_construct(irq_service, init_data);
|
||||
return irq_service;
|
||||
}
|
||||
|
|
|
@ -283,7 +283,7 @@ static const struct irq_service_funcs irq_service_funcs_dce80 = {
|
|||
.to_dal_irq_source = to_dal_irq_source_dce110
|
||||
};
|
||||
|
||||
static void construct(
|
||||
static void dce80_irq_construct(
|
||||
struct irq_service *irq_service,
|
||||
struct irq_service_init_data *init_data)
|
||||
{
|
||||
|
@ -302,7 +302,7 @@ struct irq_service *dal_irq_service_dce80_create(
|
|||
if (!irq_service)
|
||||
return NULL;
|
||||
|
||||
construct(irq_service, init_data);
|
||||
dce80_irq_construct(irq_service, init_data);
|
||||
return irq_service;
|
||||
}
|
||||
|
||||
|
|
|
@ -355,7 +355,7 @@ static const struct irq_service_funcs irq_service_funcs_dcn10 = {
|
|||
.to_dal_irq_source = to_dal_irq_source_dcn10
|
||||
};
|
||||
|
||||
static void construct(
|
||||
static void dcn10_irq_construct(
|
||||
struct irq_service *irq_service,
|
||||
struct irq_service_init_data *init_data)
|
||||
{
|
||||
|
@ -374,6 +374,6 @@ struct irq_service *dal_irq_service_dcn10_create(
|
|||
if (!irq_service)
|
||||
return NULL;
|
||||
|
||||
construct(irq_service, init_data);
|
||||
dcn10_irq_construct(irq_service, init_data);
|
||||
return irq_service;
|
||||
}
|
||||
|
|
|
@ -359,7 +359,7 @@ static const struct irq_service_funcs irq_service_funcs_dcn20 = {
|
|||
.to_dal_irq_source = to_dal_irq_source_dcn20
|
||||
};
|
||||
|
||||
static void construct(
|
||||
static void dcn20_irq_construct(
|
||||
struct irq_service *irq_service,
|
||||
struct irq_service_init_data *init_data)
|
||||
{
|
||||
|
@ -378,6 +378,6 @@ struct irq_service *dal_irq_service_dcn20_create(
|
|||
if (!irq_service)
|
||||
return NULL;
|
||||
|
||||
construct(irq_service, init_data);
|
||||
dcn20_irq_construct(irq_service, init_data);
|
||||
return irq_service;
|
||||
}
|
||||
|
|
|
@ -350,7 +350,7 @@ static const struct irq_service_funcs irq_service_funcs_dcn21 = {
|
|||
.to_dal_irq_source = to_dal_irq_source_dcn21
|
||||
};
|
||||
|
||||
static void construct(
|
||||
static void dcn21_irq_construct(
|
||||
struct irq_service *irq_service,
|
||||
struct irq_service_init_data *init_data)
|
||||
{
|
||||
|
@ -369,6 +369,6 @@ struct irq_service *dal_irq_service_dcn21_create(
|
|||
if (!irq_service)
|
||||
return NULL;
|
||||
|
||||
construct(irq_service, init_data);
|
||||
dcn21_irq_construct(irq_service, init_data);
|
||||
return irq_service;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue