Linux Samsung SOC development
 help / color / mirror / Atom feed
From: Emil Velikov <emil.l.velikov@gmail.com>
To: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>,
	linux-samsung-soc@vger.kernel.org
Cc: emil.l.velikov@gmail.com, dri-devel@lists.freedesktop.org,
	robclark@freedesktop.org, m.szyprowski@samsung.com
Subject: Re: [PATCH v2 08/15] exynos: introduce g2d_add_base_addr helper function
Date: Mon, 23 Feb 2015 11:22:25 +0000	[thread overview]
Message-ID: <54EB0D71.2000803@gmail.com> (raw)
In-Reply-To: <1424094405-6314-9-git-send-email-tjakobi@math.uni-bielefeld.de>

On 16/02/15 13:46, Tobias Jakobi wrote:
> In almost all functions the base address register is written, so it
> makes sense to have a helper function for this.
> 
> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
> ---
>  exynos/exynos_fimg2d.c | 87 +++++++++++++++++++-------------------------------
>  1 file changed, 33 insertions(+), 54 deletions(-)
> 
> diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
> index b79081e..c08974a 100644
> --- a/exynos/exynos_fimg2d.c
> +++ b/exynos/exynos_fimg2d.c
> @@ -41,6 +41,11 @@
>  
>  #define MIN(a, b)	((a) < (b) ? (a) : (b))
>  
> +enum g2d_base_addr_reg {
> +	g2d_dst = 0,
> +	g2d_src
> +};
> +
>  static unsigned int g2d_get_scaling(unsigned int src, unsigned int dst)
>  {
>  	/* The G2D hw scaling factor is a normalized inverse of the scaling factor. *
> @@ -132,6 +137,25 @@ static int g2d_add_cmd(struct g2d_context *ctx, unsigned long cmd,
>  }
>  
>  /*
> + * g2d_add_base_addr - helper function to set dst/src base address register.
> + *
> + * @ctx: a pointer to g2d_context structure.
> + * @img: a pointer to the dst/src g2d_image structure.
> + * @reg: the register that should be set.
> + */
> +static void g2d_add_base_addr(struct g2d_context *ctx, struct g2d_image *img,
> +			enum g2d_base_addr_reg reg)
> +{
> +	const unsigned long cmd = (reg == g2d_dst) ? DST_BASE_ADDR_REG : SRC_BASE_ADDR_REG;
> +
Can we wrap this to 80 columns please ?

-Emil

  reply	other threads:[~2015-02-23 11:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-16 13:46 [v2] libdrm: improvements to userspace exynos component Tobias Jakobi
2015-02-16 13:46 ` [PATCH v2 01/15] tests/exynos: fimg2d: add a checkerboard test Tobias Jakobi
2015-02-16 13:46 ` [PATCH v2 02/15] exynos: replace G2D_DOUBLE_TO_FIXED macro with function Tobias Jakobi
2015-02-16 13:46 ` [PATCH v2 03/15] tests/exynos: fix typos and change wording Tobias Jakobi
2015-02-16 13:46 ` [PATCH v2 04/15] tests/exynos: disable the G2D userptr/blend test Tobias Jakobi
2015-02-23 11:21   ` Emil Velikov
2015-02-16 13:46 ` [PATCH v2 05/15] exynos: add g2d_scale_and_blend Tobias Jakobi
2015-02-16 13:46 ` [PATCH v2 06/15] tests/exynos: introduce wait_for_user_input Tobias Jakobi
2015-02-23 11:22   ` Emil Velikov
2015-02-23 11:28     ` Daniel Vetter
2015-02-16 13:46 ` [PATCH v2 07/15] exynos: honor the repeat mode in g2d_copy_with_scale Tobias Jakobi
2015-02-16 13:46 ` [PATCH v2 08/15] exynos: introduce g2d_add_base_addr helper function Tobias Jakobi
2015-02-23 11:22   ` Emil Velikov [this message]
2015-02-16 13:46 ` [PATCH v2 09/15] exynos: use structure initialization instead of memset Tobias Jakobi
2015-02-16 13:46 ` [PATCH v2 10/15] tests/exynos: improve error handling Tobias Jakobi
2015-02-16 13:46 ` [PATCH v2 11/15] exynos: add exynos prefix to fimg2d header Tobias Jakobi
2015-02-16 13:46 ` [PATCH v2 12/15] exynos: add fimg2d header to common includes Tobias Jakobi
2015-02-23 11:19   ` Emil Velikov
2015-02-16 13:46 ` [PATCH v2 13/15] exynos: fimg2d: fix comment for G2D_COEFF_MODE_GB_COLOR Tobias Jakobi
2015-02-23 11:28 ` [v2] libdrm: improvements to userspace exynos component Emil Velikov

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=54EB0D71.2000803@gmail.com \
    --to=emil.l.velikov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=robclark@freedesktop.org \
    --cc=tjakobi@math.uni-bielefeld.de \
    /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