public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Subject: [igt-dev] [PATCH i-g-t 1/5] lib/gpu_cmds: Add media pipeline functions based on intel_bb
Date: Thu, 21 May 2020 09:48:19 +0200	[thread overview]
Message-ID: <20200521074823.18632-2-zbigniew.kempczynski@intel.com> (raw)
In-Reply-To: <20200521074823.18632-1-zbigniew.kempczynski@intel.com>

Add "_v2" versions of media pipeline creation functions.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/gpu_cmds.c | 43 +++++++++++++++++++++++++++++++++++++++++++
 lib/gpu_cmds.h | 11 +++++++++++
 2 files changed, 54 insertions(+)

diff --git a/lib/gpu_cmds.c b/lib/gpu_cmds.c
index 788f2eb6..2eb09cd4 100644
--- a/lib/gpu_cmds.c
+++ b/lib/gpu_cmds.c
@@ -1331,3 +1331,46 @@ gen8_emit_gpgpu_walk_v2(struct intel_bb *ibb,
 	/* bottom mask, height 1, always 0xffffffff */
 	intel_bb_out(ibb, 0xffffffff);
 }
+
+void
+gen8_emit_media_state_flush_v2(struct intel_bb *ibb)
+{
+	intel_bb_out(ibb, GEN8_MEDIA_STATE_FLUSH | (2 - 2));
+	intel_bb_out(ibb, 0);
+}
+
+void
+gen_emit_media_object_v2(struct intel_bb *ibb,
+			 unsigned int xoffset, unsigned int yoffset)
+{
+	intel_bb_out(ibb, GEN7_MEDIA_OBJECT | (8 - 2));
+
+	/* interface descriptor offset */
+	intel_bb_out(ibb, 0);
+
+	/* without indirect data */
+	intel_bb_out(ibb, 0);
+	intel_bb_out(ibb, 0);
+
+	/* scoreboard */
+	intel_bb_out(ibb, 0);
+	intel_bb_out(ibb, 0);
+
+	/* inline data (xoffset, yoffset) */
+	intel_bb_out(ibb, xoffset);
+	intel_bb_out(ibb, yoffset);
+	if (AT_LEAST_GEN(ibb->devid, 8) && !IS_CHERRYVIEW(ibb->devid))
+		gen8_emit_media_state_flush_v2(ibb);
+}
+
+void
+gen7_emit_media_objects_v2(struct intel_bb *ibb,
+			   unsigned int x, unsigned int y,
+			   unsigned int width, unsigned int height)
+{
+	int i, j;
+
+	for (i = 0; i < width / 16; i++)
+		for (j = 0; j < height / 16; j++)
+			gen_emit_media_object_v2(ibb, x + i * 16, y + j * 16);
+}
diff --git a/lib/gpu_cmds.h b/lib/gpu_cmds.h
index 61aff153..ab5fe74b 100644
--- a/lib/gpu_cmds.h
+++ b/lib/gpu_cmds.h
@@ -202,4 +202,15 @@ gen8_emit_gpgpu_walk_v2(struct intel_bb *ibb,
 			unsigned int x, unsigned int y,
 			unsigned int width, unsigned int height);
 
+void
+gen8_emit_media_state_flush_v2(struct intel_bb *ibb);
+
+void
+gen_emit_media_object_v2(struct intel_bb *ibb,
+			 unsigned int xoffset, unsigned int yoffset);
+
+void
+gen7_emit_media_objects_v2(struct intel_bb *ibb,
+			   unsigned int x, unsigned int y,
+			   unsigned int width, unsigned int height);
 #endif /* GPU_CMDS_H */
-- 
2.26.0

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

  reply	other threads:[~2020-05-21  7:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-21  7:48 [igt-dev] [PATCH i-g-t 0/5] Change media fill to be libdrm-free Zbigniew Kempczyński
2020-05-21  7:48 ` Zbigniew Kempczyński [this message]
2020-05-21  7:48 ` [igt-dev] [PATCH i-g-t 2/5] lib/media_fill: libdrm-free media pipeline creation Zbigniew Kempczyński
2020-05-21  7:48 ` [igt-dev] [PATCH i-g-t 3/5] lib/intel_batchbuffer: Add new media fillfunc v2 Zbigniew Kempczyński
2020-05-21  8:02   ` Chris Wilson
2020-05-21  7:48 ` [igt-dev] [PATCH i-g-t 4/5] i915/gem_media_fill: Remove libdrm dependency Zbigniew Kempczyński
2020-05-21  7:48 ` [igt-dev] [PATCH i-g-t 5/5] HAX: run media_fill in BAT only Zbigniew Kempczyński
2020-05-21  8:03 ` [igt-dev] ✓ Fi.CI.BAT: success for Change media fill to be libdrm-free Patchwork
2020-05-21 22:25 ` [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=20200521074823.18632-2-zbigniew.kempczynski@intel.com \
    --to=zbigniew.kempczynski@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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