amdgpu/dc: make dce80 timing generator construct return void.
authorDave Airlie <airlied@redhat.com>
Fri, 29 Sep 2017 03:16:00 +0000 (13:16 +1000)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 29 Sep 2017 17:01:55 +0000 (13:01 -0400)
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>
drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.c
drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.h

index db8afb6491cd28ac9fcbc55a3b328c86349b0bcb..5e00ca6a1292cd656ddac2c7a89503ddfe96d8ea 100644 (file)
@@ -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(
index 179a6d604838ed4724d867c5494fcbb2be429d6c..265894851493a545a9e62cc8cb4f6f08c21b4a40 100644 (file)
@@ -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(
index 6e4722a970d73f35d92e80b1d7883cec09d9efaf..9cebb24c94c853f97a4b01c5c20a996e826b8155 100644 (file)
@@ -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,