All of lore.kernel.org
 help / color / mirror / Atom feed
From: Katarzyna Dec <katarzyna.dec@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 3/4] lib/gpgpu_fill: Create generic __gen9_gpgpu_fillfunc
Date: Wed,  9 May 2018 15:03:18 +0200	[thread overview]
Message-ID: <20180509130319.19710-4-katarzyna.dec@intel.com> (raw)
In-Reply-To: <20180509130319.19710-1-katarzyna.dec@intel.com>

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.

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 | 17 ++++++++++++++---
 lib/gpgpu_fill.h |  8 ++++++++
 2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/lib/gpgpu_fill.c b/lib/gpgpu_fill.c
index 010dde06..b4b6f05c 100644
--- a/lib/gpgpu_fill.c
+++ b/lib/gpgpu_fill.c
@@ -193,11 +193,12 @@ gen8_gpgpu_fillfunc(struct intel_batchbuffer *batch,
 }
 
 void
-gen9_gpgpu_fillfunc(struct intel_batchbuffer *batch,
+__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)
+		    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..3435dda7 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,
-- 
2.14.3

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2018-05-09 13:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09 13:03 [igt-dev] [PATCH i-g-t 0/4] *_fill libraries refactoring part2 Katarzyna Dec
2018-05-09 13:03 ` [igt-dev] [PATCH i-g-t 1/4] lib/media_fill: Create common media_fill library for all gens Katarzyna Dec
2018-05-09 13:03 ` [igt-dev] [PATCH i-g-t 2/4] lib/media_fill: Add media_fillfunc for Gen10 Katarzyna Dec
2018-05-09 13:37   ` [igt-dev] [PATCH i-g-t v2 " Katarzyna Dec
2018-05-09 13:03 ` Katarzyna Dec [this message]
2018-05-09 13:03 ` [igt-dev] [PATCH i-g-t 4/4] lib/gpgpu_fill: Add gpgpu_fillfunc " Katarzyna Dec
2018-05-09 13:15   ` Ewelina Musial
2018-05-09 13:36   ` [igt-dev] [PATCH i-g-t v2 " Katarzyna Dec
2018-05-09 13:45 ` [igt-dev] ✓ Fi.CI.BAT: success for *_fill libraries refactoring part2 Patchwork
2018-05-09 14:07 ` [igt-dev] ✓ Fi.CI.BAT: success for *_fill libraries refactoring part2 (rev3) Patchwork
2018-05-09 15:08 ` [igt-dev] ✓ Fi.CI.IGT: success for *_fill libraries refactoring part2 Patchwork
2018-05-09 15:49 ` [igt-dev] ✓ Fi.CI.IGT: success for *_fill libraries refactoring part2 (rev3) 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=20180509130319.19710-4-katarzyna.dec@intel.com \
    --to=katarzyna.dec@intel.com \
    --cc=igt-dev@lists.freedesktop.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.