提交 f29f918f 编写于 作者: D Dave Airlie 提交者: Alex Deucher

amdgpu/dc: make stream encoder constructor return void.

The checks weren't useful here really.
Signed-off-by: NDave Airlie <airlied@redhat.com>
Reviewed-by: NHarry Wentland <harry.wentland@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 ca19d1a6
......@@ -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;
}
......@@ -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,
......
......@@ -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)\
......
......@@ -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)\
......
......@@ -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)\
......
......@@ -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)\
......
......@@ -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)\
......
......@@ -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 = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册