All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
To: linux-samsung-soc@vger.kernel.org
Cc: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>,
	emil.l.velikov@gmail.com, dri-devel@lists.freedesktop.org
Subject: [PATCH v2 2/9] exynos/fimg2d: simplify base address submission in g2d_scale_and_blend()
Date: Tue,  8 Sep 2015 17:22:27 +0200	[thread overview]
Message-ID: <1441725754-27555-3-git-send-email-tjakobi@math.uni-bielefeld.de> (raw)
In-Reply-To: <1441725754-27555-1-git-send-email-tjakobi@math.uni-bielefeld.de>

Use g2d_add_base_addr() for source and destination base
address just like all other calls.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
---
 exynos/exynos_fimg2d.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
index 4a88e0c..85b2317 100644
--- a/exynos/exynos_fimg2d.c
+++ b/exynos/exynos_fimg2d.c
@@ -672,12 +672,7 @@ g2d_scale_and_blend(struct g2d_context *ctx, struct g2d_image *src,
 		g2d_add_cmd(ctx, DST_SELECT_REG, G2D_SELECT_MODE_NORMAL);
 
 	g2d_add_cmd(ctx, DST_COLOR_MODE_REG, dst->color_mode);
-	if (dst->buf_type == G2D_IMGBUF_USERPTR)
-		g2d_add_cmd(ctx, DST_BASE_ADDR_REG | G2D_BUF_USERPTR,
-				(unsigned long)&dst->user_ptr[0]);
-	else
-		g2d_add_cmd(ctx, DST_BASE_ADDR_REG, dst->bo[0]);
-
+	g2d_add_base_addr(ctx, dst, g2d_dst);
 	g2d_add_cmd(ctx, DST_STRIDE_REG, dst->stride);
 
 	g2d_add_cmd(ctx, SRC_SELECT_REG, src->select_mode);
@@ -685,12 +680,7 @@ g2d_scale_and_blend(struct g2d_context *ctx, struct g2d_image *src,
 
 	switch (src->select_mode) {
 	case G2D_SELECT_MODE_NORMAL:
-		if (src->buf_type == G2D_IMGBUF_USERPTR)
-			g2d_add_cmd(ctx, SRC_BASE_ADDR_REG | G2D_BUF_USERPTR,
-					(unsigned long)&src->user_ptr[0]);
-		else
-			g2d_add_cmd(ctx, SRC_BASE_ADDR_REG, src->bo[0]);
-
+		g2d_add_base_addr(ctx, src, g2d_src);
 		g2d_add_cmd(ctx, SRC_STRIDE_REG, src->stride);
 		break;
 	case G2D_SELECT_MODE_FGCOLOR:
-- 
2.0.5

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2015-09-08 15:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-08 15:22 [PATCH v2 0/9] drm/exynos: rewrite fimg2d error handling Tobias Jakobi
2015-09-08 15:22 ` [PATCH v2 1/9] exynos/fimg2d: fix empty buffer handling in g2d_flush() Tobias Jakobi
2015-09-08 15:22 ` Tobias Jakobi [this message]
2015-09-08 15:22 ` [PATCH v2 3/9] exynos/fimg2d: add g2d_check_space() Tobias Jakobi
2015-09-08 15:22 ` [PATCH v2 4/9] exynos/fimg2d: add g2d_validate_xyz() functions Tobias Jakobi
2015-09-08 15:22 ` [PATCH v2 5/9] exynos/fimg2d: remove default case from g2d_get_blend_op() Tobias Jakobi
2015-09-08 15:22 ` [PATCH v2 6/9] exynos/fimg2d: remove superfluous initialization of g2d_point_val Tobias Jakobi
2015-09-08 15:22 ` [PATCH v2 7/9] exynos/fimg2d: make g2d_add_cmd() less heavy Tobias Jakobi
2015-09-08 15:22 ` [PATCH v2 8/9] exynos/fimg2d: add message prefix Tobias Jakobi
2015-09-08 15:22 ` [PATCH v2 9/9] exynos/fimg2d: remove g2d_context from public header Tobias Jakobi
2015-09-21 16:36 ` [PATCH v2 0/9] drm/exynos: rewrite fimg2d error handling Emil Velikov
2015-09-21 17:46   ` Tobias Jakobi

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=1441725754-27555-3-git-send-email-tjakobi@math.uni-bielefeld.de \
    --to=tjakobi@math.uni-bielefeld.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=linux-samsung-soc@vger.kernel.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.