amdgpu/dc: another round of dce/dcn construct cleanups.

This removes any remaining pointless return codepaths from the
DCE code.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Dave Airlie
2017-09-29 14:34:39 +10:00
committed by Alex Deucher
parent 0e1c42fd18
commit c13b408b81
32 changed files with 47 additions and 108 deletions

View File

@@ -245,7 +245,7 @@ static void dce120_update_dchub(
bool dce120_hw_sequencer_construct(struct dc *dc)
void dce120_hw_sequencer_construct(struct dc *dc)
{
/* All registers used by dce11.2 match those in dce11 in offset and
* structure
@@ -253,7 +253,5 @@ bool dce120_hw_sequencer_construct(struct dc *dc)
dce110_hw_sequencer_construct(dc);
dc->hwss.enable_display_power_gating = dce120_enable_display_power_gating;
dc->hwss.update_dchub = dce120_update_dchub;
return true;
}

View File

@@ -30,7 +30,7 @@
struct dc;
bool dce120_hw_sequencer_construct(struct dc *dc);
void dce120_hw_sequencer_construct(struct dc *dc);
#endif /* __DC_HWSS_DCE112_H__ */

View File

@@ -429,12 +429,8 @@ static struct timing_generator *dce120_timing_generator_create(
if (!tg110)
return NULL;
if (dce120_timing_generator_construct(tg110, ctx, instance, offsets))
return &tg110->base;
BREAK_TO_DEBUGGER();
kfree(tg110);
return NULL;
dce120_timing_generator_construct(tg110, ctx, instance, offsets);
return &tg110->base;
}
static void dce120_transform_destroy(struct transform **xfm)

View File

@@ -1143,15 +1143,12 @@ static const struct timing_generator_funcs dce120_tg_funcs = {
};
bool dce120_timing_generator_construct(
void dce120_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;
@@ -1175,6 +1172,4 @@ bool dce120_timing_generator_construct(
tg110->min_h_sync_width = 8;
tg110->min_v_sync_width = 1;
tg110->min_v_blank = 3;
return true;
}

View File

@@ -32,7 +32,7 @@
#include "dce110/dce110_timing_generator.h"
bool dce120_timing_generator_construct(
void dce120_timing_generator_construct(
struct dce110_timing_generator *tg110,
struct dc_context *ctx,
uint32_t instance,