summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/dce80
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-09-29 14:34:39 +1000
committerAlex Deucher <alexander.deucher@amd.com>2017-09-29 13:02:34 -0400
commitc13b408b81f8a101501d78ca499afee98e0f0ab9 (patch)
tree48612c10946d477ae7f7ae12242f3ee7ea5a4683 /drivers/gpu/drm/amd/display/dc/dce80
parent0e1c42fd181e7359be5c97655198551b6660f028 (diff)
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>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dce80')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce80/dce80_compressor.c11
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce80/dce80_compressor.h2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce80/dce80_hw_sequencer.c4
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce80/dce80_hw_sequencer.h2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c9
5 files changed, 9 insertions, 19 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce80/dce80_compressor.c b/drivers/gpu/drm/amd/display/dc/dce80/dce80_compressor.c
index cc1c0d390945..951f2caba9b3 100644
--- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_compressor.c
+++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_compressor.c
@@ -771,7 +771,7 @@ void dce80_compressor_set_fbc_invalidation_triggers(
dm_write_reg(compressor->ctx, addr, value);
}
-bool dce80_compressor_construct(struct dce80_compressor *compressor,
+void dce80_compressor_construct(struct dce80_compressor *compressor,
struct dc_context *ctx)
{
struct dc_bios *bp = ctx->dc_bios;
@@ -813,7 +813,6 @@ bool dce80_compressor_construct(struct dce80_compressor *compressor,
compressor->base.embedded_panel_v_size =
panel_info.lcd_timing.vertical_addressable;
}
- return true;
}
struct compressor *dce80_compressor_create(struct dc_context *ctx)
@@ -824,12 +823,8 @@ struct compressor *dce80_compressor_create(struct dc_context *ctx)
if (!cp80)
return NULL;
- if (dce80_compressor_construct(cp80, ctx))
- return &cp80->base;
-
- BREAK_TO_DEBUGGER();
- kfree(cp80);
- return NULL;
+ dce80_compressor_construct(cp80, ctx);
+ return &cp80->base;
}
void dce80_compressor_destroy(struct compressor **compressor)
diff --git a/drivers/gpu/drm/amd/display/dc/dce80/dce80_compressor.h b/drivers/gpu/drm/amd/display/dc/dce80/dce80_compressor.h
index 01290969ff92..cca58b044402 100644
--- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_compressor.h
+++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_compressor.h
@@ -42,7 +42,7 @@ struct dce80_compressor {
struct compressor *dce80_compressor_create(struct dc_context *ctx);
-bool dce80_compressor_construct(struct dce80_compressor *cp80,
+void dce80_compressor_construct(struct dce80_compressor *cp80,
struct dc_context *ctx);
void dce80_compressor_destroy(struct compressor **cp);
diff --git a/drivers/gpu/drm/amd/display/dc/dce80/dce80_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce80/dce80_hw_sequencer.c
index 28fe3824441f..ccfcf1c0eeb3 100644
--- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_hw_sequencer.c
@@ -106,14 +106,12 @@ static bool dce80_enable_display_power_gating(
return false;
}
-bool dce80_hw_sequencer_construct(struct dc *dc)
+void dce80_hw_sequencer_construct(struct dc *dc)
{
dce110_hw_sequencer_construct(dc);
dc->hwss.enable_display_power_gating = dce80_enable_display_power_gating;
dc->hwss.pipe_control_lock = dce_pipe_control_lock;
dc->hwss.set_bandwidth = dce100_set_bandwidth;
-
- return true;
}
diff --git a/drivers/gpu/drm/amd/display/dc/dce80/dce80_hw_sequencer.h b/drivers/gpu/drm/amd/display/dc/dce80/dce80_hw_sequencer.h
index 9d6dd05bd596..7a1b31def66f 100644
--- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_hw_sequencer.h
+++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_hw_sequencer.h
@@ -30,7 +30,7 @@
struct dc;
-bool dce80_hw_sequencer_construct(struct dc *dc);
+void dce80_hw_sequencer_construct(struct dc *dc);
#endif /* __DC_HWSS_DCE80_H__ */
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 5e00ca6a1292..c6571a908786 100644
--- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
@@ -910,8 +910,7 @@ static bool dce80_construct(
goto res_create_fail;
/* Create hardware sequencer */
- if (!dce80_hw_sequencer_construct(dc))
- goto res_create_fail;
+ dce80_hw_sequencer_construct(dc);
return true;
@@ -1075,8 +1074,7 @@ static bool dce81_construct(
goto res_create_fail;
/* Create hardware sequencer */
- if (!dce80_hw_sequencer_construct(dc))
- goto res_create_fail;
+ dce80_hw_sequencer_construct(dc);
return true;
@@ -1236,8 +1234,7 @@ static bool dce83_construct(
goto res_create_fail;
/* Create hardware sequencer */
- if (!dce80_hw_sequencer_construct(dc))
- goto res_create_fail;
+ dce80_hw_sequencer_construct(dc);
return true;