[igt-dev] [Intel-gfx] [PATCH i-g-t 3/4] tests/gem_media_vme: Simple test to exercise the VME block

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Tue Nov 20 13:13:26 UTC 2018


+ Haihaho who's been involved with gem_media_fill test, if you could
provide review, too.

Quoting Tvrtko Ursulin (2018-11-13 16:36:28)
> From: Tony Ye <tony.ye at 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.
> 
> Signed-off-by: Tony Ye <tony.ye at intel.com>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

<SNIP>

> +++ b/lib/media_fill.c
> @@ -61,6 +61,53 @@ static const uint32_t gen8_media_kernel[][4] = {
>         { 0x07800031, 0x20000a40, 0x0e000e00, 0x82000010 },
>  };
>  
> +static const uint32_t gen11_media_vme_kernel[][4] = {
> +    { 0x00000001, 0x00000040, 0x00000000,0x00000000 },
> +    { 0x00000000, 0x00000000, 0x00000000,0x00000000 },
> +    { 0x00000000, 0x00000000, 0x00000000,0x00000000 },
> +    { 0x00000000, 0x00000000, 0x00000000,0x00000000 },
> +    { 0x00600001, 0x20302e68, 0x00000000,0x20000000 },
> +    { 0x00600001, 0x22802e68, 0x00000000,0x00000001 },
> +    { 0x00000001, 0x20284f2c, 0x00000000,0x3818000c },
> +    { 0x00600001, 0x22902e68, 0x00000000,0x00000010 },
> +    { 0x00600001, 0x22a02e68, 0x00000000,0x00010000 },
> +    { 0x00000001, 0x202c4f2c, 0x00000000,0x22222222 },
> +    { 0x00000040, 0x22000a20, 0x0e000020,0x10782000 },
> +    { 0x00600001, 0x20404f28, 0x00000000,0x00000000 },
> +    { 0x00600001, 0x20a04f28, 0x00000000,0x00000000 },
> +    { 0x00600001, 0x20c04f28, 0x00000000,0x00000000 },
> +    { 0x00600001, 0x21204f28, 0x00000000,0x00000000 },
> +    { 0x00600001, 0x20601a28, 0x008d0030,0x00000000 },
> +    { 0x00600041, 0x20800a28, 0x1a000028,0x008d0280 },
> +    { 0x00600041, 0x20e01a28, 0x1e8d0290,0x01000100 },
> +    { 0x00600041, 0x21000a28, 0x1a00002c,0x008d02a0 },
> +    { 0x00000001, 0x22284f2c, 0x00000000,0x00000000 },
> +    { 0x0d80c031, 0x21404a48, 0x00000040,0x00000200 },
> +    { 0x00000001, 0x215c4708, 0x00000000,0xbeefbeef },
> +    { 0x00000040, 0x22000204, 0x06000024,0x020a0400 },
> +    { 0x00000001, 0x215e4708, 0x00000000,0xdeaddead },
> +    { 0x00000001, 0x22484f2c, 0x00000000,0x00000008 },
> +    { 0x00000001, 0x22684f2c, 0x00000000,0x0000000c },
> +    { 0x00600001, 0x2fe04b2c, 0x008d0000,0x00000000 },
> +    { 0x0a800033, 0x0000a054, 0x00002224,0x00000000 },
> +    { 0x00000040, 0x22000204, 0x06000024,0x020a0300 },
> +    { 0x0a800033, 0x0000e054, 0x00002242,0x00000000 },
> +    { 0x00000040, 0x22000204, 0x06000024,0x020a0200 },
> +    { 0x0a600033, 0x00010014, 0x00002261,0x00000000 },
> +    { 0x07600031, 0x20004a04, 0x06000fe0,0x82000010 },
> +    { 0x00000000, 0x00000000, 0x00000000,0x00000000 },
> +    { 0x00000000, 0x00000000, 0x00000000,0x00000000 },
> +    { 0x00000000, 0x00000000, 0x00000000,0x00000000 },
> +    { 0x00000000, 0x00000000, 0x00000000,0x00000000 },
> +    { 0x00000000, 0x00000000, 0x00000000,0x00000000 },
> +    { 0x00000000, 0x00000000, 0x00000000,0x00000000 },
> +    { 0x00000000, 0x00000000, 0x00000000,0x00000000 },
> +    { 0x00000000, 0x00000000, 0x00000000,0x00000000 },
> +    { 0x00000000, 0x00000000, 0x00000000,0x00000000 },
> +    { 0x00000000, 0x00000000, 0x00000000,0x00000000 },
> +    { 0x00000000, 0x00000000, 0x00000000,0x00000000 },
> +};

We need source code and compiling instructions for this, similar
to we have shaders/media/media_fill.gxa

> +static void
> +__gen11_media_vme_func(struct intel_batchbuffer *batch,
> +                      const struct igt_buf *src,
> +                      unsigned int width, unsigned int height,
> +                      const struct igt_buf *dst,
> +                      const uint32_t kernel[][4],
> +                      size_t kernel_size)
> +{
> +       uint32_t curbe_buffer, interface_descriptor;
> +       uint32_t batch_end;
> +
> +       intel_batchbuffer_flush(batch);
> +
> +       /* setup states */
> +       batch->ptr = &batch->buffer[BATCH_STATE_SPLIT];
> +
> +       curbe_buffer = gen11_fill_curbe_buffer_data(batch);
> +       interface_descriptor = gen11_fill_interface_descriptor(batch, src, dst,
> +                                       kernel, kernel_size);

Indent is off here.

Other than these two things, seems reasonable to what I understand of
the test.

Regards, Joonas


More information about the igt-dev mailing list