Igt-dev Archive on 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 v5 2/2] lib/gpgpu_fill: Create generic __gen9_gpgpu_fillfunc
Date: Tue, 15 May 2018 11:09:41 +0200	[thread overview]
Message-ID: <20180515090941.27670-2-katarzyna.dec@intel.com> (raw)
In-Reply-To: <20180515090941.27670-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.

v2: fixed indentations
v3: Made __gen9_gpgpu_fillfunc static
v4: rebase

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>
Cc: Ewelina Musial <ewelina.musial@intel.com>
---
 lib/gpgpu_fill.c | 25 ++++++++++++++++++-------
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/lib/gpgpu_fill.c b/lib/gpgpu_fill.c
index 56cab27f..26212842 100644
--- a/lib/gpgpu_fill.c
+++ b/lib/gpgpu_fill.c
@@ -200,12 +200,13 @@ gen8_gpgpu_fillfunc(struct intel_batchbuffer *batch,
 	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)
+static 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)
 {
 	uint32_t curbe_buffer, interface_descriptor;
 	uint32_t batch_end;
@@ -223,7 +224,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]);
 
@@ -248,3 +249,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));
+}
-- 
2.14.3

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

  reply	other threads:[~2018-05-15  9:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-15  9:09 [igt-dev] [PATCH i-g-t v5 1/2] lib/media_fill: Create common media_fill library for all gens Katarzyna Dec
2018-05-15  9:09 ` Katarzyna Dec [this message]
2018-05-16  7:57   ` [igt-dev] [PATCH i-g-t v5 2/2] lib/gpgpu_fill: Create generic __gen9_gpgpu_fillfunc Kalamarz, Lukasz
2018-05-15 11:35 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v5,1/2] lib/media_fill: Create common media_fill library for all gens Patchwork
2018-05-15 18:52 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-05-16  7:57 ` [igt-dev] [PATCH i-g-t v5 1/2] " Kalamarz, Lukasz

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=20180515090941.27670-2-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox