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 v3 2/4] lib/media_fill: Add media_fillfunc for Gen10
Date: Wed,  9 May 2018 16:21:28 +0200	[thread overview]
Message-ID: <20180509142130.7434-3-katarzyna.dec@intel.com> (raw)
In-Reply-To: <20180509142130.7434-1-katarzyna.dec@intel.com>

Gen10 media_fillfunc so far was the same as for gen9.
Let's add proper gen10 function to make this code more
clear. There are no changes in gen10 code.

v2: fixed indentations in few functions
v3: fixed few more indentations

Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Ewelina Musial <ewelina.musial@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
---
 lib/intel_batchbuffer.c |  4 +++-
 lib/media_fill.c        | 12 ++++++++++++
 lib/media_fill.h        |  7 +++++++
 3 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index f87e6bed..42ec4f35 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -858,7 +858,9 @@ igt_fillfunc_t igt_get_media_fillfunc(int devid)
 {
 	igt_fillfunc_t fill = NULL;
 
-	if (IS_GEN9(devid) || IS_GEN10(devid))
+	if (IS_GEN10(devid))
+		fill = gen10_media_fillfunc;
+	else if (IS_GEN9(devid))
 		fill = gen9_media_fillfunc;
 	else if (IS_GEN8(devid))
 		fill = gen8_media_fillfunc;
diff --git a/lib/media_fill.c b/lib/media_fill.c
index 872faf5a..fbcb9b28 100644
--- a/lib/media_fill.c
+++ b/lib/media_fill.c
@@ -225,3 +225,15 @@ gen9_media_fillfunc(struct intel_batchbuffer *batch,
 	__gen9_media_fillfunc(batch, dst, x, y, width, height, color,
 			      gen9_media_kernel, sizeof(gen9_media_kernel));
 }
+
+void
+gen10_media_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_media_fillfunc(batch, dst, x, y, width, height, color,
+			      gen9_media_kernel, sizeof(gen9_media_kernel));
+}
diff --git a/lib/media_fill.h b/lib/media_fill.h
index 42f8cb6a..ba352443 100644
--- a/lib/media_fill.h
+++ b/lib/media_fill.h
@@ -33,4 +33,11 @@ gen9_media_fillfunc(struct intel_batchbuffer *batch,
 		    unsigned int width, unsigned int height,
 		    uint8_t color);
 
+void
+gen10_media_fillfunc(struct intel_batchbuffer *batch,
+		     struct igt_buf *dst,
+		     unsigned int x, unsigned int y,
+		     unsigned int width, unsigned int height,
+		     uint8_t color);
+
 #endif /* RENDE_MEDIA_FILL_H */
-- 
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 14: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 ` Katarzyna Dec [this message]
2018-05-09 21:20   ` [igt-dev] [PATCH i-g-t v3 2/4] lib/media_fill: Add media_fillfunc for Gen10 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
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=20180509142130.7434-3-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