[Intel-gfx] [PATCH 3/8] tests: storedw on VEBOX
Ben Widawsky
benjamin.widawsky at intel.com
Thu Apr 25 03:57:46 CEST 2013
On Tue, Apr 23, 2013 at 03:06:43PM +0800, Zhong Li wrote:
> From: "Xiang, Haihao" <haihao.xiang at intel.com>
>
> Signed-off-by: Xiang, Haihao <haihao.xiang at intel.com>
> Signed-off-by: Zhong Li <zhong.li at intel.com>
I've pushed up to here.
With a couple of corrections to gem_ring_sync_loop: test the new ring:
diff --git a/tests/gem_ring_sync_loop.c b/tests/gem_ring_sync_loop.c
index 955bf34..3607fca 100644
--- a/tests/gem_ring_sync_loop.c
+++ b/tests/gem_ring_sync_loop.c
@@ -55,6 +55,7 @@ static drm_intel_bo *target_buffer;
#define MI_COND_BATCH_BUFFER_END (0x36<<23 | 1)
#define MI_DO_COMPARE (1<<21)
+#define LOCAL_I915_PARAM_HAS_VEBOX 22
static int
get_num_rings(int fd)
{
@@ -67,12 +68,12 @@ get_num_rings(int fd)
gp.param = I915_PARAM_HAS_BSD;
ret = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp);
-
+
if ((ret == 0) & (*gp.value > 0))
num_rings++;
else
goto skip;
-
+
gp.param = I915_PARAM_HAS_BLT;
ret = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp);
@@ -81,9 +82,7 @@ get_num_rings(int fd)
else
goto skip;
-#ifdef I915_PARAM_HAS_VEBOX /* remove it once the upstream libdrm support VEBOX */
-
- gp.param = I915_PARAM_HAS_VEBOX;
+ gp.param = LOCAL_I915_PARAM_HAS_VEBOX;
ret = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp);
if ((ret == 0) & (*gp.value > 0))
@@ -91,9 +90,8 @@ get_num_rings(int fd)
else
goto skip;
-#endif
-skip:
+skip:
return num_rings;
}
And with a couple of corrections to this file:
diff --git a/tests/gem_storedw_loop_vebox.c b/tests/gem_storedw_loop_vebox.c
index 3f06102..4593c3f 100644
--- a/tests/gem_storedw_loop_vebox.c
+++ b/tests/gem_storedw_loop_vebox.c
@@ -1,5 +1,5 @@
/*
- * Copyright � 2009 Intel Corporation
+ * Copyright � 2012 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -21,9 +21,7 @@
* IN THE SOFTWARE.
*
* Authors:
- * Xiang, Haihao <haihao.xiang at intel.com>
- * Eric Anholt <eric at anholt.net>
- * Jesse Barnes <jbarnes at virtuousgeek.org> (based on gem_bad_blit.c)
+ * Xiang, Haihao <haihao.xiang at intel.com> (based on gem_store_dw_loop_*)
*
*/
@@ -48,6 +46,8 @@ struct intel_batchbuffer *batch;
static drm_intel_bo *target_buffer;
static int has_ppgtt = 0;
+#define LOCAL_I915_EXEC_VEBOX (4<<0)
+
/*
* Testcase: Basic vebox MI check using MI_STORE_DATA_IMM
*/
@@ -71,7 +71,7 @@ store_dword_loop(void)
OUT_BATCH(val);
ADVANCE_BATCH();
- intel_batchbuffer_flush_on_ring(batch, I915_EXEC_VEBOX);
+ intel_batchbuffer_flush_on_ring(batch, LOCAL_I915_EXEC_VEBOX);
On top of this, I've pushed updates to make the test look more like
modern tests.
[snip]
--
Ben Widawsky, Intel Open Source Technology Center
More information about the Intel-gfx
mailing list