summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-09-29 13:15:55 +1000
committerAlex Deucher <alexander.deucher@amd.com>2017-09-29 13:01:21 -0400
commitca19d1a68b7e0f1d0717bd3f2d9d75cb3c568ddb (patch)
tree39c4cec2a5c7c9031e274af64c41b972159a396b /drivers/gpu/drm
parent395f669eb69b8b37ed2ffe0c5f67e942e9d00dc8 (diff)
amdgpu/dc: make timing generator constructor return void.
This can't fail as is. 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')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c9
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c8
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.c7
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.h2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c8
5 files changed, 8 insertions, 26 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
index 9a75bde32611..6765162a0d78 100644
--- a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
@@ -375,13 +375,8 @@ static struct timing_generator *dce100_timing_generator_create(
if (!tg110)
return NULL;
- if (dce110_timing_generator_construct(tg110, ctx, instance,
- offsets))
- return &tg110->base;
-
- BREAK_TO_DEBUGGER();
- kfree(tg110);
- return NULL;
+ dce110_timing_generator_construct(tg110, ctx, instance, offsets);
+ return &tg110->base;
}
static struct stream_encoder *dce100_stream_encoder_create(
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 787e20e15221..3d91f2a49d1d 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
@@ -410,12 +410,8 @@ static struct timing_generator *dce110_timing_generator_create(
if (!tg110)
return NULL;
- if (dce110_timing_generator_construct(tg110, ctx, instance, offsets))
- return &tg110->base;
-
- BREAK_TO_DEBUGGER();
- kfree(tg110);
- return NULL;
+ dce110_timing_generator_construct(tg110, ctx, instance, offsets);
+ return &tg110->base;
}
static struct stream_encoder *dce110_stream_encoder_create(
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.c
index 7f93d6d83cfd..bcd544d85621 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.c
@@ -1941,15 +1941,12 @@ static const struct timing_generator_funcs dce110_tg_funcs = {
.arm_vert_intr = dce110_arm_vert_intr,
};
-bool dce110_timing_generator_construct(
+void dce110_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;
@@ -1966,6 +1963,4 @@ bool dce110_timing_generator_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.h b/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.h
index a5d63c626ada..bd8d0ab668b7 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.h
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.h
@@ -118,7 +118,7 @@ struct dce110_timing_generator {
#define DCE110TG_FROM_TG(tg)\
container_of(tg, struct dce110_timing_generator, base)
-bool dce110_timing_generator_construct(
+void dce110_timing_generator_construct(
struct dce110_timing_generator *tg,
struct dc_context *ctx,
uint32_t instance,
diff --git a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
index 4e2ed3429a90..a06a68521c59 100644
--- a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
@@ -415,12 +415,8 @@ static struct timing_generator *dce112_timing_generator_create(
if (!tg110)
return NULL;
- if (dce110_timing_generator_construct(tg110, ctx, instance, offsets))
- return &tg110->base;
-
- BREAK_TO_DEBUGGER();
- kfree(tg110);
- return NULL;
+ dce110_timing_generator_construct(tg110, ctx, instance, offsets);
+ return &tg110->base;
}
static struct stream_encoder *dce112_stream_encoder_create(