summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/dce110
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/dce110
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/dce110')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c11
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.h2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c4
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.h2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_v.c4
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_v.h2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c6
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c7
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.h2
9 files changed, 12 insertions, 28 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c
index 90770cb2ffcd..3872febb4f6b 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c
@@ -393,12 +393,8 @@ struct compressor *dce110_compressor_create(struct dc_context *ctx)
if (!cp110)
return NULL;
- if (dce110_compressor_construct(cp110, ctx))
- return &cp110->base;
-
- BREAK_TO_DEBUGGER();
- kfree(cp110);
- return NULL;
+ dce110_compressor_construct(cp110, ctx);
+ return &cp110->base;
}
void dce110_compressor_destroy(struct compressor **compressor)
@@ -485,7 +481,7 @@ static const struct compressor_funcs dce110_compressor_funcs = {
};
-bool dce110_compressor_construct(struct dce110_compressor *compressor,
+void dce110_compressor_construct(struct dce110_compressor *compressor,
struct dc_context *ctx)
{
@@ -522,6 +518,5 @@ bool dce110_compressor_construct(struct dce110_compressor *compressor,
compressor->base.funcs = &dce110_compressor_funcs;
#endif
- return true;
}
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.h b/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.h
index 460cb77b8d75..26c7335a1cbf 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.h
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.h
@@ -42,7 +42,7 @@ struct dce110_compressor {
struct compressor *dce110_compressor_create(struct dc_context *ctx);
-bool dce110_compressor_construct(struct dce110_compressor *cp110,
+void dce110_compressor_construct(struct dce110_compressor *cp110,
struct dc_context *ctx);
void dce110_compressor_destroy(struct compressor **cp);
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
index 5bbfc34d6f01..de154329b049 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
@@ -2723,10 +2723,8 @@ static const struct hw_sequencer_funcs dce110_funcs = {
};
-bool dce110_hw_sequencer_construct(struct dc *dc)
+void dce110_hw_sequencer_construct(struct dc *dc)
{
dc->hwss = dce110_funcs;
-
- return true;
}
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.h b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.h
index baa20c1f17ad..db6c19cd15eb 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.h
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.h
@@ -33,7 +33,7 @@ struct dc;
struct dc_state;
struct dm_pp_display_configuration;
-bool dce110_hw_sequencer_construct(struct dc *dc);
+void dce110_hw_sequencer_construct(struct dc *dc);
enum dc_status dce110_apply_ctx_to_hw(
struct dc *dc,
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_v.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_v.c
index 69d6a110dbc3..3545e43a4b77 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_v.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_v.c
@@ -44,13 +44,11 @@ static const struct opp_funcs funcs = {
dce110_opp_program_bit_depth_reduction
};
-bool dce110_opp_v_construct(struct dce110_opp *opp110,
+void dce110_opp_v_construct(struct dce110_opp *opp110,
struct dc_context *ctx)
{
opp110->base.funcs = &funcs;
opp110->base.ctx = ctx;
-
- return true;
}
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_v.h b/drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_v.h
index 269c1a88d5bb..152af4c418cb 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_v.h
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_v.h
@@ -29,7 +29,7 @@
#include "opp.h"
#include "core_types.h"
-bool dce110_opp_v_construct(struct dce110_opp *opp110,
+void dce110_opp_v_construct(struct dce110_opp *opp110,
struct dc_context *ctx);
/* underlay callbacks */
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
index 45c5facf79b1..017a1fd1f659 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
@@ -1041,8 +1041,7 @@ static bool underlay_create(struct dc_context *ctx, struct resource_pool *pool)
(dce110_oppv == NULL))
return false;
- if (!dce110_opp_v_construct(dce110_oppv, ctx))
- return false;
+ dce110_opp_v_construct(dce110_oppv, ctx);
dce110_timing_generator_v_construct(dce110_tgv, ctx);
dce110_mem_input_v_construct(dce110_miv, ctx);
@@ -1292,8 +1291,7 @@ static bool construct(
goto res_create_fail;
/* Create hardware sequencer */
- if (!dce110_hw_sequencer_construct(dc))
- goto res_create_fail;
+ dce110_hw_sequencer_construct(dc);
dc->caps.max_planes = pool->base.pipe_count;
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
index 93ca6ae48cb9..07d9303d5477 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
@@ -668,13 +668,10 @@ static const struct timing_generator_funcs dce110_tg_v_funcs = {
dce110_timing_generator_v_enable_advanced_request
};
-bool dce110_timing_generator_v_construct(
+void dce110_timing_generator_v_construct(
struct dce110_timing_generator *tg110,
struct dc_context *ctx)
{
- if (!tg110)
- return false;
-
tg110->controller_id = CONTROLLER_ID_UNDERLAY0;
tg110->base.funcs = &dce110_tg_v_funcs;
@@ -688,6 +685,4 @@ bool dce110_timing_generator_v_construct(
tg110->min_h_blank = 56;
tg110->min_h_front_porch = 4;
tg110->min_h_back_porch = 4;
-
- return true;
}
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.h b/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.h
index 7e49ca8e26ad..d2623a5994e8 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.h
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.h
@@ -26,7 +26,7 @@
#ifndef __DC_TIMING_GENERATOR_V_DCE110_H__
#define __DC_TIMING_GENERATOR_V_DCE110_H__
-bool dce110_timing_generator_v_construct(
+void dce110_timing_generator_v_construct(
struct dce110_timing_generator *tg110,
struct dc_context *ctx);