OSDN Git Service

i965_drv_video: add support for H264 on Clarkdale/Arrandale
[android-x86/hardware-intel-common-libva.git] / i965_drv_video / shaders / h264 / ildb / AVC_ILDB_ForwardMsg.asm
1 /*\r
2  * Copyright © <2010>, Intel Corporation.\r
3  *\r
4  * This program is licensed under the terms and conditions of the\r
5  * Eclipse Public License (EPL), version 1.0.  The full text of the EPL is at\r
6  * http://www.opensource.org/licenses/eclipse-1.0.php.\r
7  *\r
8  */\r
9 //========== Forward message to root thread through gateway ==========\r
10 // Each child thread write a byte into the root GRF r50 defiend in open Gataway.\r
11 \r
12 #if defined(_DEBUG) \r
13 mov             (1)             EntrySignatureC:w                       0x7777:w\r
14 #endif\r
15 \r
16 // Init payload to r0\r
17 mov (8)         GatewayPayload<1>:ud    0:w                                                             //{ NoDDClr } \r
18 \r
19 // Forward a message:\r
20 // Offset = x relative to r50 (defiend in open gataway), x = ORIX >> 4 [bit 28:16]\r
21 // Need to shift left 16\r
22 \r
23 // shift 2 more bits for byte to word offset\r
24 \r
25 //shl   (1)             Offset_Length:ud                GateWayOffsetC:w                16:w            { NoDDClr, NoDDChk }\r
26 shl     (1)             Offset_Length:ud                GateWayOffsetC:w                18:w            \r
27 \r
28 // 2 bytes offset\r
29 add     (1)             Offset_Length:ud                        Offset_Length:ud                0x00020000:d    { NoDDClr }\r
30         \r
31 // Length = 1 byte,     [bit 10:8 = 000]\r
32 //000 xxxxxxxxxxxxx 00000 000 00000000 ==> 000x xxxx xxxx xxxx 0000 0000 0000 0000\r
33 \r
34 //mov (1)       DispatchID:ub                   r0.20:ub                // Dispatch ID\r
35 \r
36 //Move in EUid and Thread ID that we received from the PARENT thread\r
37 mov (1)         EUID_TID:uw                     r0.6:uw                                                         { NoDDClr, NoDDChk }\r
38 \r
39 mov (1)         GatewayPayloadKey:uw    0x1212:uw                                                       { NoDDClr, NoDDChk }    // Key\r
40 \r
41 //mov   (4)             GatewayPayload<1>:ud    0:ud                                                            { NoDDClr, NoDDChk }    // Init payload low 4 dword\r
42 \r
43 // Write back one byte (value = 0xFF) to root thread GRF to indicate this child thread is finished\r
44 // All lower 4 bytes must be assigned to the same byte value.\r
45 mov     (4)             GatewayPayload<1>:ub    0xFFFF:uw                                                       { NoDDChk }\r
46 \r
47 // msg descriptor bit 15 set to '1' for notification\r
48 #ifdef GW_DCN\r
49 // For ILK, EOT bit should also be set to terminate the thread. This is to fix a timing related HW issue.\r
50 //\r
51 send (8)        null:ud                 m0                      GatewayPayload<8;8,1>:ud    MSG_GW_EOT  FWDMSGDSC+NOTIFYMSG\r
52 #else\r
53 send (8)        null:ud                 m0                      GatewayPayload<8;8,1>:ud    MSG_GW      FWDMSGDSC+NOTIFYMSG\r
54 #endif  // GW_DCN\r
55 \r
56 //========== Forward Msg Done ========================================\r
57 \r