summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/dce120
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-09-29 07:34:39 +0300
committerAlex Deucher <alexander.deucher@amd.com>2017-09-29 20:02:34 +0300
commitc13b408b81f8a101501d78ca499afee98e0f0ab9 (patch)
tree48612c10946d477ae7f7ae12242f3ee7ea5a4683 /drivers/gpu/drm/amd/display/dc/dce120
parent0e1c42fd181e7359be5c97655198551b6660f028 (diff)
downloadlinux-c13b408b81f8a101501d78ca499afee98e0f0ab9.tar.xz
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/dce120')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce120/dce120_hw_sequencer.c4
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce120/dce120_hw_sequencer.h2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c8
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce120/dce120_timing_generator.c7
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce120/dce120_timing_generator.h2
5 files changed, 6 insertions, 17 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce120/dce120_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce120/dce120_hw_sequencer.c
index 56e3b124f19c..1a0b54d6034e 100644
--- a/drivers/gpu/drm/amd/display/dc/dce120/dce120_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dce120/dce120_hw_sequencer.c
@@ -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;
}
diff --git a/drivers/gpu/drm/amd/display/dc/dce120/dce120_hw_sequencer.h b/drivers/gpu/drm/amd/display/dc/dce120/dce120_hw_sequencer.h
index 6448a17c2fde..77a6b86d7606 100644
--- a/drivers/gpu/drm/amd/display/dc/dce120/dce120_hw_sequencer.h
+++ b/drivers/gpu/drm/amd/display/dc/dce120/dce120_hw_sequencer.h
@@ -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__ */
diff --git a/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c b/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c
index 13d75df71396..3ed28a870e20 100644
--- a/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c
@@ -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)
diff --git a/drivers/gpu/drm/amd/display/dc/dce120/dce120_timing_generator.c b/drivers/gpu/drm/amd/display/dc/dce120/dce120_timing_generator.c
index 791c9b084941..95d871be3a0b 100644
--- a/drivers/gpu/drm/amd/display/dc/dce120/dce120_timing_generator.c
+++ b/drivers/gpu/drm/amd/display/dc/dce120/dce120_timing_generator.c
@@ -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;
}
diff --git a/drivers/gpu/drm/amd/display/dc/dce120/dce120_timing_generator.h b/drivers/gpu/drm/amd/display/dc/dce120/dce120_timing_generator.h
index 243c0a3493da..d69871ec0dde 100644
--- a/drivers/gpu/drm/amd/display/dc/dce120/dce120_timing_generator.h
+++ b/drivers/gpu/drm/amd/display/dc/dce120/dce120_timing_generator.h
@@ -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,