[Libva] [Libva-intel-driver][PATCH] Set the right transform 8x8 flag for Intra macroblock in VME output on BDW+

Sean V Kelley seanvk at posteo.de
Fri Aug 19 23:26:30 UTC 2016


On Wed, 2016-08-17 at 09:59 +0800, Xiang, Haihao wrote:
> VME message doesn't output the transform 8x8 flag, the shader
> set the right flag accordingly.
> 
> Signed-off-by: Xiang, Haihao <haihao.xiang at intel.com>
> Tested-by: Meng, Jia <jia.meng at intel.com>

lgtm, applied.

thanks,

Sean

> ---
>  src/shaders/vme/inter_frame_gen8.asm | 13 +++++++++++++
>  src/shaders/vme/inter_frame_gen8.g8b |  9 +++++++--
>  src/shaders/vme/inter_frame_gen9.g9b |  9 +++++++--
>  src/shaders/vme/intra_frame_gen8.asm | 13 +++++++++++++
>  src/shaders/vme/intra_frame_gen8.g8b |  5 +++++
>  src/shaders/vme/intra_frame_gen9.g9b |  5 +++++
>  src/shaders/vme/vme8.inc             |  5 +++++
>  7 files changed, 55 insertions(+), 4 deletions(-)
> 
> diff --git a/src/shaders/vme/inter_frame_gen8.asm
> b/src/shaders/vme/inter_frame_gen8.asm
> index 17bc412..6296aa1 100644
> --- a/src/shaders/vme/inter_frame_gen8.asm
> +++ b/src/shaders/vme/inter_frame_gen8.asm
> @@ -458,6 +458,19 @@ send (8)
>          mlen sic_vme_msg_length
>          rlen vme_wb_length
>          {align1};
> +
> +/* Check whether mb type is 0 */
> +and.z.f0.0 (1) null<1>:UD vme_wb.0<0,1,0>:UD W0_INTRA_MB_TYPE_MASK
> {align1};
> +(-f0.0) jmpi (1) __write_intra_output;
> +
> +/* Check whether intra mb mode is INTRA_8x8 */
> +and (1) tmp_reg2<1>:UD vme_wb.0<0,1,0>:UD W0_INTRA_MB_MODE_MASK
> {align1};
> +cmp.z.f0.0 (1) null<1>:UD tmp_reg2<0,1,0>:UD W0_INTRA_8x8 {align1};
> +
> +/* Set transform 8x8 flag */
> +(f0.0) or (1) vme_wb.0<1>:UD vme_wb.0<0,1,0>:UD
> W0_TRANSFORM_8x8_FLAG {align1};
> +
> +__write_intra_output:
>  /*
>   * Oword Block Write message
>   */
> diff --git a/src/shaders/vme/inter_frame_gen8.g8b
> b/src/shaders/vme/inter_frame_gen8.g8b
> index d0cc25d..ddc96fc 100644
> --- a/src/shaders/vme/inter_frame_gen8.g8b
> +++ b/src/shaders/vme/inter_frame_gen8.g8b
> @@ -146,13 +146,13 @@
>     { 0x00000001, 0x2fa41a68, 0x00000b04, 0x00000000 },
>     { 0x00000001, 0x2fa81a68, 0x00000b24, 0x00000000 },
>     { 0x00000040, 0x2fe00008, 0x06001400, 0x00000020 },
> -   { 0x00000020, 0x34000000, 0x0e001400, 0x00000a20 },
> +   { 0x00000020, 0x34000000, 0x0e001400, 0x00000a70 },
>     { 0x00000001, 0x2ac01a68, 0x00000fe4, 0x00000000 },
>     { 0x00000001, 0x2fa01a68, 0x00000ae6, 0x00000000 },
>     { 0x00000001, 0x2fa41a68, 0x00000b06, 0x00000000 },
>     { 0x00000001, 0x2fa81a68, 0x00000b26, 0x00000000 },
>     { 0x00000040, 0x2fe00008, 0x06001400, 0x00000020 },
> -   { 0x00000020, 0x34000000, 0x0e001400, 0x000009c0 },
> +   { 0x00000020, 0x34000000, 0x0e001400, 0x00000a10 },
>     { 0x00000001, 0x2ac21a68, 0x00000fe4, 0x00000000 },
>     { 0x0020000c, 0x2a801a68, 0x1e450ac0, 0x00020002 },
>     { 0x00200040, 0x2a881a68, 0x1e450a80, 0x00030003 },
> @@ -183,6 +183,11 @@
>     { 0x00000001, 0x244c0608, 0x00000000, 0x00800000 },
>     { 0x00600001, 0x28000208, 0x008d0440, 0x00000000 },
>     { 0x0d600031, 0x21800a08, 0x0e000800, 0x10782000 },
> +   { 0x01000005, 0x20000200, 0x06000180, 0x001f0000 },
> +   { 0x00110020, 0x34000000, 0x0e001400, 0x00000030 },
> +   { 0x00000005, 0x24400208, 0x06000180, 0x00000030 },
> +   { 0x01000010, 0x20000200, 0x06000440, 0x00000010 },
> +   { 0x00010006, 0x21800208, 0x06000180, 0x00008000 },
>     { 0x00600001, 0x28000208, 0x008d0480, 0x00000000 },
>     { 0x00000001, 0x28200208, 0x00000180, 0x00000000 },
>     { 0x00000001, 0x28240208, 0x00000190, 0x00000000 },
> diff --git a/src/shaders/vme/inter_frame_gen9.g9b
> b/src/shaders/vme/inter_frame_gen9.g9b
> index b79042c..1a7376c 100644
> --- a/src/shaders/vme/inter_frame_gen9.g9b
> +++ b/src/shaders/vme/inter_frame_gen9.g9b
> @@ -146,13 +146,13 @@
>     { 0x00000001, 0x2fa41a68, 0x00000b04, 0x00000000 },
>     { 0x00000001, 0x2fa81a68, 0x00000b24, 0x00000000 },
>     { 0x00000040, 0x2fe00008, 0x06001400, 0x00000020 },
> -   { 0x00000020, 0x34000000, 0x0e001400, 0x00000a20 },
> +   { 0x00000020, 0x34000000, 0x0e001400, 0x00000a70 },
>     { 0x00000001, 0x2ac01a68, 0x00000fe4, 0x00000000 },
>     { 0x00000001, 0x2fa01a68, 0x00000ae6, 0x00000000 },
>     { 0x00000001, 0x2fa41a68, 0x00000b06, 0x00000000 },
>     { 0x00000001, 0x2fa81a68, 0x00000b26, 0x00000000 },
>     { 0x00000040, 0x2fe00008, 0x06001400, 0x00000020 },
> -   { 0x00000020, 0x34000000, 0x0e001400, 0x000009c0 },
> +   { 0x00000020, 0x34000000, 0x0e001400, 0x00000a10 },
>     { 0x00000001, 0x2ac21a68, 0x00000fe4, 0x00000000 },
>     { 0x0020000c, 0x2a801a68, 0x1e450ac0, 0x00020002 },
>     { 0x00200040, 0x2a881a68, 0x1e450a80, 0x00030003 },
> @@ -183,6 +183,11 @@
>     { 0x00000001, 0x244c0608, 0x00000000, 0x00800000 },
>     { 0x00600001, 0x28000208, 0x008d0440, 0x00000000 },
>     { 0x0d600031, 0x21800a08, 0x06000800, 0x10782000 },
> +   { 0x01000005, 0x20000200, 0x06000180, 0x001f0000 },
> +   { 0x00110020, 0x34000000, 0x0e001400, 0x00000030 },
> +   { 0x00000005, 0x24400208, 0x06000180, 0x00000030 },
> +   { 0x01000010, 0x20000200, 0x06000440, 0x00000010 },
> +   { 0x00010006, 0x21800208, 0x06000180, 0x00008000 },
>     { 0x00600001, 0x28000208, 0x008d0480, 0x00000000 },
>     { 0x00000001, 0x28200208, 0x00000180, 0x00000000 },
>     { 0x00000001, 0x28240208, 0x00000190, 0x00000000 },
> diff --git a/src/shaders/vme/intra_frame_gen8.asm
> b/src/shaders/vme/intra_frame_gen8.asm
> index 15b260e..d43ec92 100644
> --- a/src/shaders/vme/intra_frame_gen8.asm
> +++ b/src/shaders/vme/intra_frame_gen8.asm
> @@ -157,6 +157,19 @@ send (8)
>          mlen sic_vme_msg_length
>          rlen vme_wb_length
>          {align1};
> +
> +/* Check whether mb type is 0 */
> +and.z.f0.0 (1) null<1>:UD vme_wb.0<0,1,0>:UD W0_INTRA_MB_TYPE_MASK
> {align1};
> +(-f0.0) jmpi (1) __write_intra_output;
> +
> +/* Check whether intra mb mode is INTRA_8x8 */
> +and (1) tmp_reg2<1>:UD vme_wb.0<0,1,0>:UD W0_INTRA_MB_MODE_MASK
> {align1};
> +cmp.z.f0.0 (1) null<1>:UD tmp_reg2<0,1,0>:UD W0_INTRA_8x8 {align1};
> +
> +/* Set transform 8x8 flag */
> +(f0.0) or (1) vme_wb.0<1>:UD vme_wb.0<0,1,0>:UD
> W0_TRANSFORM_8x8_FLAG {align1};
> +
> +__write_intra_output:
>  /*
>   * Oword Block Write message
>   */
> diff --git a/src/shaders/vme/intra_frame_gen8.g8b
> b/src/shaders/vme/intra_frame_gen8.g8b
> index 56c7283..a4ddf29 100644
> --- a/src/shaders/vme/intra_frame_gen8.g8b
> +++ b/src/shaders/vme/intra_frame_gen8.g8b
> @@ -58,6 +58,11 @@
>     { 0x00000040, 0x244c0208, 0x0600044c, 0x00800000 },
>     { 0x00600001, 0x28000208, 0x008d0440, 0x00000000 },
>     { 0x0d600031, 0x21800a08, 0x0e000800, 0x10782000 },
> +   { 0x01000005, 0x20000200, 0x06000180, 0x001f0000 },
> +   { 0x00110020, 0x34000000, 0x0e001400, 0x00000030 },
> +   { 0x00000005, 0x24400208, 0x06000180, 0x00000030 },
> +   { 0x01000010, 0x20000200, 0x06000440, 0x00000010 },
> +   { 0x00010006, 0x21800208, 0x06000180, 0x00008000 },
>     { 0x00600001, 0x28000208, 0x008d0480, 0x00000000 },
>     { 0x00000001, 0x28200208, 0x00000180, 0x00000000 },
>     { 0x00000001, 0x28240208, 0x00000190, 0x00000000 },
> diff --git a/src/shaders/vme/intra_frame_gen9.g9b
> b/src/shaders/vme/intra_frame_gen9.g9b
> index 63d7455..2d92cf4 100644
> --- a/src/shaders/vme/intra_frame_gen9.g9b
> +++ b/src/shaders/vme/intra_frame_gen9.g9b
> @@ -58,6 +58,11 @@
>     { 0x00000040, 0x244c0208, 0x0600044c, 0x00800000 },
>     { 0x00600001, 0x28000208, 0x008d0440, 0x00000000 },
>     { 0x0d600031, 0x21800a08, 0x06000800, 0x10782000 },
> +   { 0x01000005, 0x20000200, 0x06000180, 0x001f0000 },
> +   { 0x00110020, 0x34000000, 0x0e001400, 0x00000030 },
> +   { 0x00000005, 0x24400208, 0x06000180, 0x00000030 },
> +   { 0x01000010, 0x20000200, 0x06000440, 0x00000010 },
> +   { 0x00010006, 0x21800208, 0x06000180, 0x00008000 },
>     { 0x00600001, 0x28000208, 0x008d0480, 0x00000000 },
>     { 0x00000001, 0x28200208, 0x00000180, 0x00000000 },
>     { 0x00000001, 0x28240208, 0x00000190, 0x00000000 },
> diff --git a/src/shaders/vme/vme8.inc b/src/shaders/vme/vme8.inc
> index 5f05ef2..c2bdaab 100644
> --- a/src/shaders/vme/vme8.inc
> +++ b/src/shaders/vme/vme8.inc
> @@ -129,6 +129,11 @@
> define(`OBW_WRITE_COMMIT_CATEGORY',     `0')    /* category on
> Ivybridge */
>  
>  define(`OBW_HEADER_PRESENT',            `1')
>  
> +define(`W0_INTRA_MB_TYPE_MASK',         `0x1F0000:UD')
> +define(`W0_INTRA_MB_MODE_MASK',         `0x30:UD')
> +define(`W0_INTRA_8x8',                  `0x10:UD')
> +define(`W0_TRANSFORM_8x8_FLAG',         `0x8000:UD')
> +
>  /* GRF registers
>   * r0 header
>   * r1~r4 constant buffer (reserved)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/libva/attachments/20160819/ff014bcb/attachment.sig>


More information about the Libva mailing list