From 99913a171d00b2d4c94127a9e38e5457bc45635d Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 29 Sep 2017 13:16:00 +1000 Subject: [PATCH] amdgpu/dc: make dce80 timing generator construct return void. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 8 ++------ .../gpu/drm/amd/display/dc/dce80/dce80_timing_generator.c | 7 +------ .../gpu/drm/amd/display/dc/dce80/dce80_timing_generator.h | 2 +- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c index db8afb6491cd..5e00ca6a1292 100644 --- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c @@ -404,12 +404,8 @@ static struct timing_generator *dce80_timing_generator_create( if (!tg110) return NULL; - if (dce80_timing_generator_construct(tg110, ctx, instance, offsets)) - return &tg110->base; - - BREAK_TO_DEBUGGER(); - kfree(tg110); - return NULL; + dce80_timing_generator_construct(tg110, ctx, instance, offsets); + return &tg110->base; } static struct output_pixel_processor *dce80_opp_create( diff --git a/drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.c b/drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.c index 179a6d604838..265894851493 100644 --- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.c +++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.c @@ -152,15 +152,12 @@ static const struct timing_generator_funcs dce80_tg_funcs = { dce80_timing_generator_enable_advanced_request, }; -bool dce80_timing_generator_construct( +void dce80_timing_generator_construct( struct dce110_timing_generator *tg110, struct dc_context *ctx, uint32_t instance, const struct dce110_timing_generator_offsets *offsets) { - if (!tg110) - return false; - tg110->controller_id = CONTROLLER_ID_D0 + instance; tg110->base.inst = instance; tg110->offsets = *offsets; @@ -177,8 +174,6 @@ bool dce80_timing_generator_construct( tg110->min_h_blank = 56; tg110->min_h_front_porch = 4; tg110->min_h_back_porch = 4; - - return true; } void dce80_timing_generator_enable_advanced_request( diff --git a/drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.h b/drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.h index 6e4722a970d7..9cebb24c94c8 100644 --- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.h +++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.h @@ -30,7 +30,7 @@ #include "../include/grph_object_id.h" /* DCE8.0 implementation inherits from DCE11.0 */ -bool dce80_timing_generator_construct( +void dce80_timing_generator_construct( struct dce110_timing_generator *tg, struct dc_context *ctx, uint32_t instance, -- 2.30.2