summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-09-29 13:15:56 +1000
committerAlex Deucher <alexander.deucher@amd.com>2017-09-29 13:01:29 -0400
commitf29f918f2868ece27c8aff0edc84c7d7fbdc5598 (patch)
tree36135c15216fa0ee943b160c00098aae3c1e440d /drivers/gpu/drm
parentca19d1a68b7e0f1d0717bd3f2d9d75cb3c568ddb (diff)
amdgpu/dc: make stream encoder constructor return void.
The checks weren't useful here really. 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/dce/dce_stream_encoder.c9
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.h2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c11
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c12
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c14
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c12
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c12
-rw-r--r--drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c12
8 files changed, 26 insertions, 58 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c b/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c
index 532c6e638943..b2add58ef889 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c
@@ -1605,7 +1605,7 @@ static const struct stream_encoder_funcs dce110_str_enc_funcs = {
};
-bool dce110_stream_encoder_construct(
+void dce110_stream_encoder_construct(
struct dce110_stream_encoder *enc110,
struct dc_context *ctx,
struct dc_bios *bp,
@@ -1614,11 +1614,6 @@ bool dce110_stream_encoder_construct(
const struct dce_stream_encoder_shift *se_shift,
const struct dce_stream_encoder_mask *se_mask)
{
- if (!enc110)
- return false;
- if (!bp)
- return false;
-
enc110->base.funcs = &dce110_str_enc_funcs;
enc110->base.ctx = ctx;
enc110->base.id = eng_id;
@@ -1626,6 +1621,4 @@ bool dce110_stream_encoder_construct(
enc110->regs = regs;
enc110->se_shift = se_shift;
enc110->se_mask = se_mask;
-
- return true;
}
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.h b/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.h
index ff8ca1246650..6c28229c76eb 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.h
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.h
@@ -697,7 +697,7 @@ struct dce110_stream_encoder {
const struct dce_stream_encoder_mask *se_mask;
};
-bool dce110_stream_encoder_construct(
+void dce110_stream_encoder_construct(
struct dce110_stream_encoder *enc110,
struct dc_context *ctx,
struct dc_bios *bp,
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 6765162a0d78..75961338a8e4 100644
--- a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
@@ -389,14 +389,9 @@ static struct stream_encoder *dce100_stream_encoder_create(
if (!enc110)
return NULL;
- if (dce110_stream_encoder_construct(
- enc110, ctx, ctx->dc_bios, eng_id,
- &stream_enc_regs[eng_id], &se_shift, &se_mask))
- return &enc110->base;
-
- BREAK_TO_DEBUGGER();
- kfree(enc110);
- return NULL;
+ dce110_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id,
+ &stream_enc_regs[eng_id], &se_shift, &se_mask);
+ return &enc110->base;
}
#define SRII(reg_name, block, id)\
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 3d91f2a49d1d..9faf2feabdf1 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
@@ -424,14 +424,10 @@ static struct stream_encoder *dce110_stream_encoder_create(
if (!enc110)
return NULL;
- if (dce110_stream_encoder_construct(
- enc110, ctx, ctx->dc_bios, eng_id,
- &stream_enc_regs[eng_id], &se_shift, &se_mask))
- return &enc110->base;
-
- BREAK_TO_DEBUGGER();
- kfree(enc110);
- return NULL;
+ dce110_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id,
+ &stream_enc_regs[eng_id],
+ &se_shift, &se_mask);
+ return &enc110->base;
}
#define SRII(reg_name, block, id)\
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 a06a68521c59..0011dd704af0 100644
--- a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
@@ -428,15 +428,11 @@ static struct stream_encoder *dce112_stream_encoder_create(
if (!enc110)
return NULL;
-
- if (dce110_stream_encoder_construct(
- enc110, ctx, ctx->dc_bios, eng_id,
- &stream_enc_regs[eng_id], &se_shift, &se_mask))
- return &enc110->base;
-
- BREAK_TO_DEBUGGER();
- kfree(enc110);
- return NULL;
+
+ dce110_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id,
+ &stream_enc_regs[eng_id],
+ &se_shift, &se_mask);
+ return &enc110->base;
}
#define SRII(reg_name, block, id)\
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 a6f93a42c2ec..a63193913496 100644
--- a/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c
@@ -585,14 +585,10 @@ static struct stream_encoder *dce120_stream_encoder_create(
if (!enc110)
return NULL;
- if (dce110_stream_encoder_construct(
- enc110, ctx, ctx->dc_bios, eng_id,
- &stream_enc_regs[eng_id], &se_shift, &se_mask))
- return &enc110->base;
-
- BREAK_TO_DEBUGGER();
- kfree(enc110);
- return NULL;
+ dce110_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id,
+ &stream_enc_regs[eng_id],
+ &se_shift, &se_mask);
+ return &enc110->base;
}
#define SRII(reg_name, block, id)\
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 170509a4a221..0b309acab6b1 100644
--- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
@@ -441,14 +441,10 @@ static struct stream_encoder *dce80_stream_encoder_create(
if (!enc110)
return NULL;
- if (dce110_stream_encoder_construct(
- enc110, ctx, ctx->dc_bios, eng_id,
- &stream_enc_regs[eng_id], &se_shift, &se_mask))
- return &enc110->base;
-
- BREAK_TO_DEBUGGER();
- kfree(enc110);
- return NULL;
+ dce110_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id,
+ &stream_enc_regs[eng_id],
+ &se_shift, &se_mask);
+ return &enc110->base;
}
#define SRII(reg_name, block, id)\
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
index e21ba8c2f8d4..5d6dd7f30253 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
@@ -627,14 +627,10 @@ static struct stream_encoder *dcn10_stream_encoder_create(
if (!enc110)
return NULL;
- if (dce110_stream_encoder_construct(
- enc110, ctx, ctx->dc_bios, eng_id,
- &stream_enc_regs[eng_id], &se_shift, &se_mask))
- return &enc110->base;
-
- BREAK_TO_DEBUGGER();
- kfree(enc110);
- return NULL;
+ dce110_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id,
+ &stream_enc_regs[eng_id],
+ &se_shift, &se_mask);
+ return &enc110->base;
}
static const struct dce_hwseq_registers hwseq_reg = {