Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: Katarzyna Dec <katarzyna.dec@intel.com>, igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v3 3/4] lib/gpgpu_fill: Create generic __gen9_gpgpu_fillfunc
Date: Wed, 9 May 2018 14:21:30 -0700	[thread overview]
Message-ID: <f9b150bd-0819-467d-17c2-2c6441b05e44@intel.com> (raw)
In-Reply-To: <20180509142130.7434-4-katarzyna.dec@intel.com>



On 09/05/18 07:21, Katarzyna Dec wrote:
> Starting from gen9 main gpgpu_fillfunc differs only with
> kernel parameter. Let's prepare generic __gen9 function to
> avoid duplicating all _fillfunc for future gens.
> 
> v2: fixed indentations
> 
> Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com>
> Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Antonio Argenziano <antonio.argenziano@intel.com>
> Reviewed-by: Ewelina Musial <ewelina.musial@intel.com>
> ---
>   lib/gpgpu_fill.c | 23 +++++++++++++++++------
>   lib/gpgpu_fill.h |  8 ++++++++
>   2 files changed, 25 insertions(+), 6 deletions(-)
> 
> diff --git a/lib/gpgpu_fill.c b/lib/gpgpu_fill.c
> index 010dde06..c44acb1f 100644
> --- a/lib/gpgpu_fill.c
> +++ b/lib/gpgpu_fill.c
> @@ -193,11 +193,12 @@ gen8_gpgpu_fillfunc(struct intel_batchbuffer *batch,
>   }
>   
>   void

As with the media_fill one, this function should be static and not 
exposed in the header.

Daniele

> -gen9_gpgpu_fillfunc(struct intel_batchbuffer *batch,
> -		    struct igt_buf *dst,
> -		    unsigned int x, unsigned int y,
> -		    unsigned int width, unsigned int height,
> -		    uint8_t color)
> +__gen9_gpgpu_fillfunc(struct intel_batchbuffer *batch,
> +		      struct igt_buf *dst,
> +		      unsigned int x, unsigned int y,
> +		      unsigned int width, unsigned int height,
> +		      uint8_t color, const uint32_t kernel[][4],
> +		      size_t kernel_size)
>   {
>   	uint32_t curbe_buffer, interface_descriptor;
>   	uint32_t batch_end;
> @@ -216,7 +217,7 @@ gen9_gpgpu_fillfunc(struct intel_batchbuffer *batch,
>   	curbe_buffer = gen7_fill_curbe_buffer_data(batch, color);
>   
>   	interface_descriptor = gen8_fill_interface_descriptor(batch, dst,
> -				gen9_gpgpu_kernel, sizeof(gen9_gpgpu_kernel));
> +				kernel, kernel_size);
>   
>   	igt_assert(batch->ptr < &batch->buffer[4095]);
>   
> @@ -240,3 +241,13 @@ gen9_gpgpu_fillfunc(struct intel_batchbuffer *batch,
>   	gen7_render_flush(batch, batch_end);
>   	intel_batchbuffer_reset(batch);
>   }
> +
> +void gen9_gpgpu_fillfunc(struct intel_batchbuffer *batch,
> +			 struct igt_buf *dst,
> +			 unsigned int x, unsigned int y,
> +			 unsigned int width, unsigned int height,
> +			 uint8_t color)
> +{
> +	__gen9_gpgpu_fillfunc(batch, dst, x, y, width, height, color,
> +			      gen9_gpgpu_kernel, sizeof(gen9_gpgpu_kernel));
> +}
> diff --git a/lib/gpgpu_fill.h b/lib/gpgpu_fill.h
> index 0190bfc1..7260c4fa 100644
> --- a/lib/gpgpu_fill.h
> +++ b/lib/gpgpu_fill.h
> @@ -43,6 +43,14 @@ gen8_gpgpu_fillfunc(struct intel_batchbuffer *batch,
>   		    unsigned int width, unsigned int height,
>   		    uint8_t color);
>   
> +void
> +__gen9_gpgpu_fillfunc(struct intel_batchbuffer *batch,
> +		      struct igt_buf *dst,
> +		      unsigned int x, unsigned int y,
> +		      unsigned int width, unsigned int height,
> +		      uint8_t color, const uint32_t kernel[][4],
> +		      size_t kernel_size);
> +
>   void
>   gen9_gpgpu_fillfunc(struct intel_batchbuffer *batch,
>   		    struct igt_buf *dst,
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2018-05-09 21:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09 14:21 [igt-dev] [PATCH i-g-t v3 0/4] *_fill libraries refactoring part2 Katarzyna Dec
2018-05-09 14:21 ` [igt-dev] [PATCH i-g-t v3 1/4] lib/media_fill: Create common media_fill library for all gens Katarzyna Dec
2018-05-09 21:16   ` Daniele Ceraolo Spurio
2018-05-10 12:45     ` Katarzyna Dec
2018-05-09 14:21 ` [igt-dev] [PATCH i-g-t v3 2/4] lib/media_fill: Add media_fillfunc for Gen10 Katarzyna Dec
2018-05-09 21:20   ` Daniele Ceraolo Spurio
2018-05-10 12:57     ` Katarzyna Dec
2018-05-09 14:21 ` [igt-dev] [PATCH i-g-t v3 3/4] lib/gpgpu_fill: Create generic __gen9_gpgpu_fillfunc Katarzyna Dec
2018-05-09 21:21   ` Daniele Ceraolo Spurio [this message]
2018-05-10 12:43     ` Katarzyna Dec
2018-05-09 14:21 ` [igt-dev] [PATCH i-g-t v3 4/4] lib/gpgpu_fill: Add gpgpu_fillfunc for Gen10 Katarzyna Dec
2018-05-09 15:37 ` [igt-dev] ✓ Fi.CI.BAT: success for *_fill libraries refactoring part2 (rev4) Patchwork
2018-05-09 18:33 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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=f9b150bd-0819-467d-17c2-2c6441b05e44@intel.com \
    --to=daniele.ceraolospurio@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=katarzyna.dec@intel.com \
    /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