[PATCH 6/6] amdgpu/dc: make dce80 timing generator construct return void.
Harry Wentland
harry.wentland at amd.com
Fri Sep 29 14:13:13 UTC 2017
On 2017-09-28 11:16 PM, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
Series is
Reviewed-by: Harry Wentland <harry.wentland at amd.com>
Harry
> ---
> drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 8 ++------
> drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.c | 7 +------
> drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.h | 2 +-
> 3 files changed, 4 insertions(+), 13 deletions(-)
>
> 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 db8afb6..5e00ca6 100644
> --- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
> @@ -404,12 +404,8 @@ static struct timing_generator *dce80_timing_generator_create(
> if (!tg110)
> return NULL;
>
> - if (dce80_timing_generator_construct(tg110, ctx, instance, offsets))
> - return &tg110->base;
> -
> - BREAK_TO_DEBUGGER();
> - kfree(tg110);
> - return NULL;
> + dce80_timing_generator_construct(tg110, ctx, instance, offsets);
> + return &tg110->base;
> }
>
> static struct output_pixel_processor *dce80_opp_create(
> diff --git a/drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.c b/drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.c
> index 179a6d6..2658948 100644
> --- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.c
> +++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.c
> @@ -152,15 +152,12 @@ static const struct timing_generator_funcs dce80_tg_funcs = {
> dce80_timing_generator_enable_advanced_request,
> };
>
> -bool dce80_timing_generator_construct(
> +void dce80_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;
> tg110->offsets = *offsets;
> @@ -177,8 +174,6 @@ bool dce80_timing_generator_construct(
> tg110->min_h_blank = 56;
> tg110->min_h_front_porch = 4;
> tg110->min_h_back_porch = 4;
> -
> - return true;
> }
>
> void dce80_timing_generator_enable_advanced_request(
> diff --git a/drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.h b/drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.h
> index 6e4722a..9cebb24 100644
> --- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.h
> +++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.h
> @@ -30,7 +30,7 @@
> #include "../include/grph_object_id.h"
>
> /* DCE8.0 implementation inherits from DCE11.0 */
> -bool dce80_timing_generator_construct(
> +void dce80_timing_generator_construct(
> struct dce110_timing_generator *tg,
> struct dc_context *ctx,
> uint32_t instance,
>
More information about the amd-gfx
mailing list