All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Airlie <airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH 7/9] amdgpu/dc: remove pointless return from build_pipe_hw_param
Date: Fri, 29 Sep 2017 14:34:40 +1000	[thread overview]
Message-ID: <20170929043442.7984-7-airlied@gmail.com> (raw)
In-Reply-To: <20170929043442.7984-1-airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

From: Dave Airlie <airlied@redhat.com>

This never returned anything else.

Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c |  6 +-----
 drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 10 ++--------
 drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.h |  2 +-
 drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c |  6 +-----
 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c   |  6 +-----
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c   | 11 ++---------
 6 files changed, 8 insertions(+), 33 deletions(-)

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 0db987d..b1cf591 100644
--- a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
@@ -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);
 
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 017a1fd..89036af 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
@@ -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 */
 
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.h b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.h
index 5bb692d..e5f168c 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.h
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.h
@@ -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,
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 11902a2..663e0a0 100644
--- a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
@@ -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);
 
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 c6571a9..9c18efd 100644
--- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
@@ -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);
 
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 fb3ef13..dc878f7 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
@@ -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;
 }
 
-- 
2.9.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2017-09-29  4:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-29  4:34 [PATCH 1/9] amdgpu/dc: make get_audio_clock_info return void Dave Airlie
     [not found] ` <20170929043442.7984-1-airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-29  4:34   ` [PATCH 2/9] amdgpu/dc: make program_regamma_pwl " Dave Airlie
2017-09-29  4:34   ` [PATCH 3/9] amdgpu/dc: make some audio functions " Dave Airlie
2017-09-29  4:34   ` [PATCH 4/9] amdgpu/dc: remove pointless returns in the i2caux constructor paths Dave Airlie
2017-09-29  4:34   ` [PATCH 5/9] amdgpu/dc: cleanup construct returns in gpio Dave Airlie
2017-09-29  4:34   ` [PATCH 6/9] amdgpu/dc: another round of dce/dcn construct cleanups Dave Airlie
2017-09-29  4:34   ` Dave Airlie [this message]
2017-09-29  4:34   ` [PATCH 8/9] amdgpu: fixup construct to void paths on some more dc objects Dave Airlie
2017-09-29  4:34   ` [PATCH 9/9] amdgpu/dc: fix construct return values on irq service Dave Airlie
     [not found]     ` <20170929043442.7984-9-airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-29 14:27       ` Harry Wentland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170929043442.7984-7-airlied@gmail.com \
    --to=airlied-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.