amdgpu/dc: remove pointless return from build_pipe_hw_param
authorDave Airlie <airlied@redhat.com>
Fri, 29 Sep 2017 04:34:40 +0000 (14:34 +1000)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 29 Sep 2017 17:02:41 +0000 (13:02 -0400)
This never returned anything else.

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/dce100/dce100_resource.c
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.h
drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c

index 0db987d504c0f3b4fb5d251dee8f3fc78b78e40c..b1cf591b34083d9807e534f1fd71484754aa19a7 100644 (file)
@@ -631,16 +631,12 @@ static enum dc_status build_mapped_resource(
                struct dc_state *context,
                struct dc_stream_state *stream)
 {
-       enum dc_status status = DC_OK;
        struct pipe_ctx *pipe_ctx = resource_get_head_pipe_for_stream(&context->res_ctx, stream);
 
        if (!pipe_ctx)
                return DC_ERROR_UNEXPECTED;
 
-       status = dce110_resource_build_pipe_hw_param(pipe_ctx);
-
-       if (status != DC_OK)
-               return status;
+       dce110_resource_build_pipe_hw_param(pipe_ctx);
 
        resource_build_info_frame(pipe_ctx);
 
index 017a1fd1f659f7c6a2d36f2f68b456e011c9cb05..89036aff9021fdbd8de81a49ed2aea934ca4ecd8 100644 (file)
@@ -724,7 +724,7 @@ static void get_pixel_clock_parameters(
        }
 }
 
-enum dc_status dce110_resource_build_pipe_hw_param(struct pipe_ctx *pipe_ctx)
+void dce110_resource_build_pipe_hw_param(struct pipe_ctx *pipe_ctx)
 {
        get_pixel_clock_parameters(pipe_ctx, &pipe_ctx->stream_res.pix_clk_params);
        pipe_ctx->clock_source->funcs->get_pix_clk_dividers(
@@ -734,8 +734,6 @@ enum dc_status dce110_resource_build_pipe_hw_param(struct pipe_ctx *pipe_ctx)
        resource_build_bit_depth_reduction_params(pipe_ctx->stream,
                        &pipe_ctx->stream->bit_depth_params);
        pipe_ctx->stream->clamping.pixel_encoding = pipe_ctx->stream->timing.pixel_encoding;
-
-       return DC_OK;
 }
 
 static bool is_surface_pixel_format_supported(struct pipe_ctx *pipe_ctx, unsigned int underlay_idx)
@@ -754,7 +752,6 @@ static enum dc_status build_mapped_resource(
                struct dc_state *context,
                struct dc_stream_state *stream)
 {
-       enum dc_status status = DC_OK;
        struct pipe_ctx *pipe_ctx = resource_get_head_pipe_for_stream(&context->res_ctx, stream);
 
        if (!pipe_ctx)
@@ -764,10 +761,7 @@ static enum dc_status build_mapped_resource(
                        dc->res_pool->underlay_pipe_index))
                return DC_SURFACE_PIXEL_FORMAT_UNSUPPORTED;
 
-       status = dce110_resource_build_pipe_hw_param(pipe_ctx);
-
-       if (status != DC_OK)
-               return status;
+       dce110_resource_build_pipe_hw_param(pipe_ctx);
 
        /* TODO: validate audio ASIC caps, encoder */
 
index 5bb692d037d987fc50471bec14efe7af1fba44c1..e5f168c1f8c81637abf36f71b815a41a47efdb33 100644 (file)
@@ -38,7 +38,7 @@ struct dce110_resource_pool {
        struct resource_pool base;
 };
 
-enum dc_status dce110_resource_build_pipe_hw_param(struct pipe_ctx *pipe_ctx);
+void dce110_resource_build_pipe_hw_param(struct pipe_ctx *pipe_ctx);
 
 struct resource_pool *dce110_create_resource_pool(
        uint8_t num_virtual_links,
index 11902a2fdaa4fb14562a2735227161da4d7e48b1..663e0a047a4becc5bae59b672ad951df24cedcfc 100644 (file)
@@ -704,16 +704,12 @@ static enum dc_status build_mapped_resource(
                struct dc_state *context,
                struct dc_stream_state *stream)
 {
-       enum dc_status status = DC_OK;
        struct pipe_ctx *pipe_ctx = resource_get_head_pipe_for_stream(&context->res_ctx, stream);
 
        if (!pipe_ctx)
                return DC_ERROR_UNEXPECTED;
 
-       status = dce110_resource_build_pipe_hw_param(pipe_ctx);
-
-       if (status != DC_OK)
-               return status;
+       dce110_resource_build_pipe_hw_param(pipe_ctx);
 
        resource_build_info_frame(pipe_ctx);
 
index c6571a908786d11cfc6bdbd021fc744641acb081..9c18efd3446f502b1669a3f8fd69346cbf44c31b 100644 (file)
@@ -665,16 +665,12 @@ static enum dc_status build_mapped_resource(
                struct dc_state *context,
                struct dc_stream_state *stream)
 {
-       enum dc_status status = DC_OK;
        struct pipe_ctx *pipe_ctx = resource_get_head_pipe_for_stream(&context->res_ctx, stream);
 
        if (!pipe_ctx)
                return DC_ERROR_UNEXPECTED;
 
-       status = dce110_resource_build_pipe_hw_param(pipe_ctx);
-
-       if (status != DC_OK)
-               return status;
+       dce110_resource_build_pipe_hw_param(pipe_ctx);
 
        resource_build_info_frame(pipe_ctx);
 
index fb3ef134ea12759d43475bdba21f0d6fe1c8214c..dc878f77837befa2bcb2913ffef96f4705748634 100644 (file)
@@ -805,7 +805,7 @@ static void build_clamping_params(struct dc_stream_state *stream)
        stream->clamping.pixel_encoding = stream->timing.pixel_encoding;
 }
 
-static enum dc_status build_pipe_hw_param(struct pipe_ctx *pipe_ctx)
+static void build_pipe_hw_param(struct pipe_ctx *pipe_ctx)
 {
 
        get_pixel_clock_parameters(pipe_ctx, &pipe_ctx->stream_res.pix_clk_params);
@@ -820,8 +820,6 @@ static enum dc_status build_pipe_hw_param(struct pipe_ctx *pipe_ctx)
        resource_build_bit_depth_reduction_params(pipe_ctx->stream,
                                        &pipe_ctx->stream->bit_depth_params);
        build_clamping_params(pipe_ctx->stream);
-
-       return DC_OK;
 }
 
 static enum dc_status build_mapped_resource(
@@ -829,7 +827,6 @@ static enum dc_status build_mapped_resource(
                struct dc_state *context,
                struct dc_stream_state *stream)
 {
-       enum dc_status status = DC_OK;
        struct pipe_ctx *pipe_ctx = resource_get_head_pipe_for_stream(&context->res_ctx, stream);
 
        /*TODO Seems unneeded anymore */
@@ -853,11 +850,7 @@ static enum dc_status build_mapped_resource(
        if (!pipe_ctx)
                return DC_ERROR_UNEXPECTED;
 
-       status = build_pipe_hw_param(pipe_ctx);
-
-       if (status != DC_OK)
-               return status;
-
+       build_pipe_hw_param(pipe_ctx);
        return DC_OK;
 }