AMD-GFX Archive on 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 6/6] amdgpu/dc: make dce80 timing generator construct return void.
Date: Fri, 29 Sep 2017 13:16:00 +1000	[thread overview]
Message-ID: <20170929031600.9312-6-airlied@gmail.com> (raw)
In-Reply-To: <20170929031600.9312-1-airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

From: Dave Airlie <airlied@redhat.com>

Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 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,
-- 
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  3:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-29  3:15 [PATCH 1/6] amdgpu/dc: make timing generator constructor return void Dave Airlie
     [not found] ` <20170929031600.9312-1-airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-29  3:15   ` [PATCH 2/6] amdgpu/dc: make stream encoder " Dave Airlie
2017-09-29  3:15   ` [PATCH 3/6] amdgpu/dc: make link encoder construct void Dave Airlie
2017-09-29  3:15   ` [PATCH 4/6] amdgpu/dc: make opp " Dave Airlie
2017-09-29  3:15   ` [PATCH 5/6] amdgpu/dc: make dce transform constructor void Dave Airlie
2017-09-29  3:16   ` Dave Airlie [this message]
     [not found]     ` <20170929031600.9312-6-airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-29 14:13       ` [PATCH 6/6] amdgpu/dc: make dce80 timing generator construct return void 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=20170929031600.9312-6-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox