summaryrefslogtreecommitdiff
path: root/lib/i915
diff options
context:
space:
mode:
authorTony Ye <tony.ye@intel.com>2018-11-13 14:36:28 +0000
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>2019-02-05 12:23:09 +0000
commitc4b2b2f07fe8231afb8514fab19218dec95d562d (patch)
treed3f9c878c0041baff61b2aa57506a029a4b0bfd7 /lib/i915
parent5b31f04ae8cc4b922a7a8a6f5da639865a4cacd3 (diff)
tests/gem_media_vme: Simple test to exercise the VME block
Simple test which exercises the VME fixed function block. v2: (Tvrtko Ursulin) * Small cleanups like copyright date, tabs, remove unused bits. v3: (Tony Ye) * Added curbe data entry for dst surface. * Read the dst surface after the VME kernel being executed. v4: (Tony Ye) * Added the media_vme.gxa kernel source code and compile instructions. v5: (Tvrtko Ursulin) * Added hang detector. v6: (Tvrtko Ursulin) * Replace gem_read with gem_sync. (Chris Wilson) Signed-off-by: Tony Ye <tony.ye@intel.com> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Tony Ye <tony.ye@intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Diffstat (limited to 'lib/i915')
-rwxr-xr-xlib/i915/shaders/media/README_media_vme.txt65
-rwxr-xr-xlib/i915/shaders/media/media_vme.gxa51
2 files changed, 116 insertions, 0 deletions
diff --git a/lib/i915/shaders/media/README_media_vme.txt b/lib/i915/shaders/media/README_media_vme.txt
new file mode 100755
index 00000000..2470fdd8
--- /dev/null
+++ b/lib/i915/shaders/media/README_media_vme.txt
@@ -0,0 +1,65 @@
+Step1: Building IGA (Intel Graphics Assembler)
+========================================================================
+
+1. Download or clone IGC (Intel Graphics Compiler)
+
+ https://github.com/intel/intel-graphics-compiler.git
+
+2. Chdir into 'intel-graphics-compiler' (or any other workspace folder of choice)
+
+ It should read the following folder strucutre:
+
+ workspace
+ |- visa
+ |- IGC
+ |- inc
+ |- 3d
+ |- skuwa
+
+3. Chdir into IGA sub-component
+
+ cd visa/iga
+
+4. Create build directory
+
+ mkdir build
+
+5. Change into build directory
+
+ cd build
+
+6. Run cmake
+
+ cmake ../
+
+7. Run make to build IGA project
+
+ make
+
+8. Get the output executable "iga64" in IGAExe folder
+
+ usage: ./iga64 OPTIONS ARGS
+ where OPTIONS:
+ -h --help shows help on an option
+ -d --disassemble disassembles the input file
+ -a --assemble assembles the input file
+ -n --numeric-labels use numeric labels
+ -p --platform DEVICE specifies the platform (e.g. "GEN9")
+ -o --output FILE specifies the output file
+
+ EXAMPLES:
+ ./iga64 file.gxa -p=11 -a -o file.krn
+
+Step2: Building ASM code
+========================================================================
+1. Command line to convert asm code to binary:
+
+ iga64 media_vme.gxa -p=11 -a -o media_vme.krn
+
+2. Pad 128 bytes zeros to the kernel:
+
+ dd if=/dev/zero bs=1 count=128 >> media_vme.krn
+
+3. Generate hexdump:
+
+ hexdump -v -e '4/4 "0x%08x " "\n"' media_vme.krn > media_vme.hex
diff --git a/lib/i915/shaders/media/media_vme.gxa b/lib/i915/shaders/media/media_vme.gxa
new file mode 100755
index 00000000..93a0ed2f
--- /dev/null
+++ b/lib/i915/shaders/media/media_vme.gxa
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2018, Intel Corporation
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included
+* in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+* OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+ mov (8|M0) r1.8<1>:w 0x20000000:v
+ mov (8|M0) r20.0<1>:w 0x1:v
+(W) mov (1|M0) r1.2<1>:f 0x3818000C:f
+ mov (8|M0) r20.8<1>:w 0x10:v
+ mov (8|M0) r21.0<1>:w 0x10000:v
+(W) mov (1|M0) r1.3<1>:f 0x22222222:f
+ add (1|M0) a0.0<1>:d r1.0<0;1,0>:d 276307968:d
+ mov (8|M0) r2.0<1>:f 0x0:f
+ mov (8|M0) r5.0<1>:f 0x0:f
+ mov (8|M0) r6.0<1>:f 0x0:f
+ mov (8|M0) r9.0<1>:f 0x0:f
+ mov (8|M0) r3.0<1>:d r1.8<8;8,1>:w
+ mul (8|M0) r4.0<1>:d r1.2<0;1,0>:d r20.0<8;8,1>:w
+ mul (8|M0) r7.0<1>:d r20.8<8;8,1>:w 256:w
+ mul (8|M0) r8.0<1>:d r1.3<0;1,0>:d r21.0<8;8,1>:w
+(W) mov (1|M0) r17.2<1>:f 0x0:f
+ send (16|M0) r10:uw r2:f 0xD a0.0{NoPreempt}
+ mov (1|M0) r10.14<1>:hf 0xBEEF:hf
+(W) add (1|M0) a0.0<1>:ud r1.1<0;1,0>:ud 0x20A0400:ud
+ mov (1|M0) r10.15<1>:hf 0xDEAD:hf
+(W) mov (1|M0) r18.2<1>:f 0x8:f
+(W) mov (1|M0) r19.2<1>:f 0xC:f
+(W) mov (8|M0) r127.0<1>:f r0.0<8;8,1>:f
+(W) sends (16|M0) null:uw r17 r10 0x10A a0.0
+(W) add (1|M0) a0.0<1>:ud r1.1<0;1,0>:ud 0x20A0300:ud
+(W) sends (16|M0) null:uw r18 r14 0x8A a0.0
+(W) add (1|M0) a0.0<1>:ud r1.1<0;1,0>:ud 0x20A0200:ud
+(W) sends (8|M0) null:ud r19 r16 0x4A a0.0
+(W) send (8|M0) null r127:f 0x27 0x2000010 {EOT}