From: Katarzyna Dec <katarzyna.dec@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 3/4] lib/media_spin: Remove gen8lp_media_spin function
Date: Wed, 25 Apr 2018 15:26:49 +0200 [thread overview]
Message-ID: <20180425132650.26247-3-katarzyna.dec@intel.com> (raw)
In-Reply-To: <20180425132650.26247-1-katarzyna.dec@intel.com>
Gen8lp function are duplicates of Gen8 with difference in
emit_media_objects - we cannot perform media_state_flush on CHT.
Similar changes were done previously for gpgpu_fill and media_fill.
Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
---
lib/gpu_fill.c | 24 ++----------------------
lib/intel_batchbuffer.c | 4 +---
lib/media_spin.c | 38 --------------------------------------
lib/media_spin.h | 3 ---
4 files changed, 3 insertions(+), 66 deletions(-)
diff --git a/lib/gpu_fill.c b/lib/gpu_fill.c
index f5fc61bb..8dab39df 100644
--- a/lib/gpu_fill.c
+++ b/lib/gpu_fill.c
@@ -642,28 +642,8 @@ gen8_emit_media_objects_spin(struct intel_batchbuffer *batch)
/* inline data (xoffset, yoffset) */
OUT_BATCH(0);
OUT_BATCH(0);
- gen8_emit_media_state_flush(batch);
-}
-
-void
-gen8lp_emit_media_objects_spin(struct intel_batchbuffer *batch)
-{
- OUT_BATCH(GEN8_MEDIA_OBJECT | (8 - 2));
-
- /* interface descriptor offset */
- OUT_BATCH(0);
-
- /* without indirect data */
- OUT_BATCH(0);
- OUT_BATCH(0);
-
- /* scoreboard */
- OUT_BATCH(0);
- OUT_BATCH(0);
-
- /* inline data (xoffset, yoffset) */
- OUT_BATCH(0);
- OUT_BATCH(0);
+ if (AT_LEAST_GEN(batch->devid, 8) && !IS_CHERRYVIEW(batch->devid))
+ gen8_emit_media_state_flush(batch);
}
void
diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index f87e6bed..ef070d1a 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -906,10 +906,8 @@ igt_media_spinfunc_t igt_get_media_spinfunc(int devid)
if (IS_GEN9(devid))
spin = gen9_media_spinfunc;
- else if (IS_BROADWELL(devid))
+ else if (IS_BROADWELL(devid) || IS_CHERRYVIEW(devid))
spin = gen8_media_spinfunc;
- else if (IS_CHERRYVIEW(devid))
- spin = gen8lp_media_spinfunc;
return spin;
}
diff --git a/lib/media_spin.c b/lib/media_spin.c
index 16ea8483..b4414bee 100644
--- a/lib/media_spin.c
+++ b/lib/media_spin.c
@@ -106,44 +106,6 @@ gen8_media_spinfunc(struct intel_batchbuffer *batch,
intel_batchbuffer_reset(batch);
}
-void
-gen8lp_media_spinfunc(struct intel_batchbuffer *batch,
- struct igt_buf *dst, uint32_t spins)
-{
- uint32_t curbe_buffer, interface_descriptor;
- uint32_t batch_end;
-
- intel_batchbuffer_flush_with_context(batch, NULL);
-
- /* setup states */
- batch->ptr = &batch->buffer[BATCH_STATE_SPLIT];
-
- curbe_buffer = gen8_spin_curbe_buffer_data(batch, spins);
- interface_descriptor = gen8_fill_interface_descriptor(batch, dst, spin_kernel, sizeof(spin_kernel));
- igt_assert(batch->ptr < &batch->buffer[4095]);
-
- /* media pipeline */
- batch->ptr = batch->buffer;
- OUT_BATCH(GEN8_PIPELINE_SELECT | PIPELINE_SELECT_MEDIA);
- gen8_emit_state_base_address(batch);
-
- gen8_emit_vfe_state_spin(batch);
-
- gen7_emit_curbe_load(batch, curbe_buffer);
-
- gen7_emit_interface_descriptor_load(batch, interface_descriptor);
-
- gen8lp_emit_media_objects_spin(batch);
-
- OUT_BATCH(MI_BATCH_BUFFER_END);
-
- batch_end = intel_batchbuffer_align(batch, 8);
- igt_assert(batch_end < BATCH_STATE_SPLIT);
-
- gen7_render_flush(batch, batch_end);
- intel_batchbuffer_reset(batch);
-}
-
void
gen9_media_spinfunc(struct intel_batchbuffer *batch,
struct igt_buf *dst, uint32_t spins)
diff --git a/lib/media_spin.h b/lib/media_spin.h
index 8bc48291..57d8c2e2 100644
--- a/lib/media_spin.h
+++ b/lib/media_spin.h
@@ -30,9 +30,6 @@
void gen8_media_spinfunc(struct intel_batchbuffer *batch,
struct igt_buf *dst, uint32_t spins);
-void gen8lp_media_spinfunc(struct intel_batchbuffer *batch,
- struct igt_buf *dst, uint32_t spins);
-
void gen9_media_spinfunc(struct intel_batchbuffer *batch,
struct igt_buf *dst, uint32_t spins);
--
2.14.3
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2018-04-25 13:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-25 13:26 [igt-dev] [PATCH i-g-t 1/4] lib/media_spin: Move helper functions to gpu_fill library Katarzyna Dec
2018-04-25 13:26 ` [igt-dev] [PATCH i-g-t 2/4] lib: Remove duplications in gpu_fill used by media_spin Katarzyna Dec
2018-04-25 21:49 ` Daniele Ceraolo Spurio
2018-04-26 11:11 ` Katarzyna Dec
2018-04-26 13:32 ` Katarzyna Dec
2018-04-25 13:26 ` Katarzyna Dec [this message]
2018-04-26 16:35 ` [igt-dev] [PATCH i-g-t 3/4] lib/media_spin: Remove gen8lp_media_spin function Daniele Ceraolo Spurio
2018-04-25 13:26 ` [igt-dev] [PATCH i-g-t 4/4] lib: Adjust media_spin and gpu_fill to our code style Katarzyna Dec
2018-04-26 22:25 ` Antonio Argenziano
2018-04-25 13:50 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/4] lib/media_spin: Move helper functions to gpu_fill library Patchwork
2018-04-25 20:01 ` [igt-dev] [PATCH i-g-t 1/4] " Daniele Ceraolo Spurio
2018-04-26 11:08 ` Katarzyna Dec
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=20180425132650.26247-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