From: "Ye, Tony" <tony.ye@intel.com>
To: "Michał Winiarski" <michal.winiarski@intel.com>,
"Tvrtko Ursulin" <tvrtko.ursulin@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org, Intel-gfx@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 3/4] tests/gem_media_vme: Simple test to exercise the VME block
Date: Fri, 11 Jan 2019 11:18:45 +0800 [thread overview]
Message-ID: <237905d9-0f36-2e4e-b592-ff43d65f3517@intel.com> (raw)
In-Reply-To: <20190110140235.cworapxav35nswom@mwiniars-main.ger.corp.intel.com>
On 1/10/2019 10:02 PM, Michał Winiarski wrote:
> On Tue, Jan 08, 2019 at 03:13:02PM +0000, Tvrtko Ursulin wrote:
>> From: Tony Ye <tony.ye@intel.com>
>>
>> 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>
>> ---
>> lib/gpu_cmds.c | 136 ++++++++++++++++++++
>> lib/gpu_cmds.h | 20 ++-
>> lib/i915/shaders/media/README_media_vme.txt | 65 ++++++++++
>> lib/i915/shaders/media/media_vme.gxa | 51 ++++++++
>> lib/intel_batchbuffer.c | 9 ++
>> lib/intel_batchbuffer.h | 7 +
>> lib/media_fill.c | 110 ++++++++++++++++
>> lib/media_fill.h | 6 +
>> lib/surfaceformat.h | 2 +
>> tests/Makefile.sources | 3 +
>> tests/i915/gem_media_vme.c | 117 +++++++++++++++++
>> tests/meson.build | 1 +
>> 12 files changed, 525 insertions(+), 2 deletions(-)
>> create mode 100755 lib/i915/shaders/media/README_media_vme.txt
>> create mode 100755 lib/i915/shaders/media/media_vme.gxa
>> create mode 100644 tests/i915/gem_media_vme.c
>>
>> 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 000000000000..2470fdd89825
>> --- /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
> Why we're padding it with 128B zeroes?
> We don't seem to do that for any other shaders.
>
> Could you modify this instruction to use lib/i915/shaders/converter.py and
> rather than adding yet another README, update lib/i915/shaders/README instead?
>
> -Michał
Padding 128 bytes of zeros are required by Gen HW. It is required for
all shaders unless your compiler did it quietly.
It makes sense to combine the instructions into lib/i915/shaders/README
and use existing python script to dump hex.
But the README seems to be outdated. I could not find intel-gen4asm when
I follow the instructions to build intel-graphics-compiler. Can you
update the README firstly to make it workable with latest
https://github.com/intel/intel-graphics-compiler?
Regards, --Tony
>
>> +
>> +3. Generate hexdump:
>> +
>> + hexdump -v -e '4/4 "0x%08x " "\n"' media_vme.krn > media_vme.hex
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-01-11 3:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-08 15:12 [PATCH i-g-t 0/4] Per context dynamic (sub)slice power-gating Tvrtko Ursulin
2019-01-08 15:13 ` [PATCH i-g-t 1/4] headers: bump Tvrtko Ursulin
2019-01-08 15:13 ` [PATCH i-g-t 2/4] tests/gem_ctx_sseu: Dynamic (sub)slice programming tests Tvrtko Ursulin
2019-01-08 15:13 ` [PATCH i-g-t 3/4] tests/gem_media_vme: Simple test to exercise the VME block Tvrtko Ursulin
2019-01-10 14:02 ` [igt-dev] " Michał Winiarski
2019-01-11 3:18 ` Ye, Tony [this message]
2019-01-08 15:13 ` [PATCH i-g-t 4/4] tests/gem_media_vme: Shut down half of subslices to avoid gpu hang on ICL Tvrtko Ursulin
-- strict thread matches above, loose matches on Subject: below --
2019-01-08 11:24 [PATCH i-g-t 0/4] Per context dynamic (sub)slice power-gating Tvrtko Ursulin
2019-01-08 11:24 ` [PATCH i-g-t 3/4] tests/gem_media_vme: Simple test to exercise the VME block Tvrtko Ursulin
2019-01-08 14:23 ` [igt-dev] " Chris Wilson
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=237905d9-0f36-2e4e-b592-ff43d65f3517@intel.com \
--to=tony.ye@intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=igt-dev@lists.freedesktop.org \
--cc=michal.winiarski@intel.com \
--cc=tvrtko.ursulin@linux.intel.com \
/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