Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
ctxnv40.c File Reference
#include <core/gpuobj.h>
#include "nv40.h"
#include "ctx.h"

Go to the source code of this file.

Macros

#define CP_FLAG_CLEAR   0
 
#define CP_FLAG_SET   1
 
#define CP_FLAG_SWAP_DIRECTION   ((0 * 32) + 0)
 
#define CP_FLAG_SWAP_DIRECTION_LOAD   0
 
#define CP_FLAG_SWAP_DIRECTION_SAVE   1
 
#define CP_FLAG_USER_SAVE   ((0 * 32) + 5)
 
#define CP_FLAG_USER_SAVE_NOT_PENDING   0
 
#define CP_FLAG_USER_SAVE_PENDING   1
 
#define CP_FLAG_USER_LOAD   ((0 * 32) + 6)
 
#define CP_FLAG_USER_LOAD_NOT_PENDING   0
 
#define CP_FLAG_USER_LOAD_PENDING   1
 
#define CP_FLAG_STATUS   ((3 * 32) + 0)
 
#define CP_FLAG_STATUS_IDLE   0
 
#define CP_FLAG_STATUS_BUSY   1
 
#define CP_FLAG_AUTO_SAVE   ((3 * 32) + 4)
 
#define CP_FLAG_AUTO_SAVE_NOT_PENDING   0
 
#define CP_FLAG_AUTO_SAVE_PENDING   1
 
#define CP_FLAG_AUTO_LOAD   ((3 * 32) + 5)
 
#define CP_FLAG_AUTO_LOAD_NOT_PENDING   0
 
#define CP_FLAG_AUTO_LOAD_PENDING   1
 
#define CP_FLAG_UNK54   ((3 * 32) + 6)
 
#define CP_FLAG_UNK54_CLEAR   0
 
#define CP_FLAG_UNK54_SET   1
 
#define CP_FLAG_ALWAYS   ((3 * 32) + 8)
 
#define CP_FLAG_ALWAYS_FALSE   0
 
#define CP_FLAG_ALWAYS_TRUE   1
 
#define CP_FLAG_UNK57   ((3 * 32) + 9)
 
#define CP_FLAG_UNK57_CLEAR   0
 
#define CP_FLAG_UNK57_SET   1
 
#define CP_CTX   0x00100000
 
#define CP_CTX_COUNT   0x000fc000
 
#define CP_CTX_COUNT_SHIFT   14
 
#define CP_CTX_REG   0x00003fff
 
#define CP_LOAD_SR   0x00200000
 
#define CP_LOAD_SR_VALUE   0x000fffff
 
#define CP_BRA   0x00400000
 
#define CP_BRA_IP   0x0000ff00
 
#define CP_BRA_IP_SHIFT   8
 
#define CP_BRA_IF_CLEAR   0x00000080
 
#define CP_BRA_FLAG   0x0000007f
 
#define CP_WAIT   0x00500000
 
#define CP_WAIT_SET   0x00000080
 
#define CP_WAIT_FLAG   0x0000007f
 
#define CP_SET   0x00700000
 
#define CP_SET_1   0x00000080
 
#define CP_SET_FLAG   0x0000007f
 
#define CP_NEXT_TO_SWAP   0x00600007
 
#define CP_NEXT_TO_CURRENT   0x00600009
 
#define CP_SET_CONTEXT_POINTER   0x0060000a
 
#define CP_END   0x0060000e
 
#define CP_LOAD_MAGIC_UNK01   0x00800001 /* unknown */
 
#define CP_LOAD_MAGIC_NV44TCL   0x00800029 /* per-vs state (0x4497) */
 
#define CP_LOAD_MAGIC_NV40TCL   0x00800041 /* per-vs state (0x4097) */
 

Enumerations

enum  cp_label {
  cp_check_load = 1, cp_setup_auto_load, cp_setup_load, cp_setup_save,
  cp_swap_state, cp_swap_state3d_3_is_save, cp_prepare_exit, cp_exit,
  cp_check_load = 1, cp_setup_auto_load, cp_setup_load, cp_setup_save,
  cp_swap_state, cp_prepare_exit, cp_exit
}
 

Functions

void nv40_grctx_fill (struct nouveau_device *device, struct nouveau_gpuobj *mem)
 
int nv40_grctx_init (struct nouveau_device *device, u32 *size)
 

Macro Definition Documentation

#define CP_BRA   0x00400000

Definition at line 95 of file ctxnv40.c.

#define CP_BRA_FLAG   0x0000007f

Definition at line 99 of file ctxnv40.c.

#define CP_BRA_IF_CLEAR   0x00000080

Definition at line 98 of file ctxnv40.c.

#define CP_BRA_IP   0x0000ff00

Definition at line 96 of file ctxnv40.c.

#define CP_BRA_IP_SHIFT   8

Definition at line 97 of file ctxnv40.c.

#define CP_CTX   0x00100000

Definition at line 89 of file ctxnv40.c.

#define CP_CTX_COUNT   0x000fc000

Definition at line 90 of file ctxnv40.c.

#define CP_CTX_COUNT_SHIFT   14

Definition at line 91 of file ctxnv40.c.

#define CP_CTX_REG   0x00003fff

Definition at line 92 of file ctxnv40.c.

#define CP_END   0x0060000e

Definition at line 109 of file ctxnv40.c.

#define CP_FLAG_ALWAYS   ((3 * 32) + 8)

Definition at line 82 of file ctxnv40.c.

#define CP_FLAG_ALWAYS_FALSE   0

Definition at line 83 of file ctxnv40.c.

#define CP_FLAG_ALWAYS_TRUE   1

Definition at line 84 of file ctxnv40.c.

#define CP_FLAG_AUTO_LOAD   ((3 * 32) + 5)

Definition at line 76 of file ctxnv40.c.

#define CP_FLAG_AUTO_LOAD_NOT_PENDING   0

Definition at line 77 of file ctxnv40.c.

#define CP_FLAG_AUTO_LOAD_PENDING   1

Definition at line 78 of file ctxnv40.c.

#define CP_FLAG_AUTO_SAVE   ((3 * 32) + 4)

Definition at line 73 of file ctxnv40.c.

#define CP_FLAG_AUTO_SAVE_NOT_PENDING   0

Definition at line 74 of file ctxnv40.c.

#define CP_FLAG_AUTO_SAVE_PENDING   1

Definition at line 75 of file ctxnv40.c.

#define CP_FLAG_CLEAR   0

Definition at line 59 of file ctxnv40.c.

#define CP_FLAG_SET   1

Definition at line 60 of file ctxnv40.c.

#define CP_FLAG_STATUS   ((3 * 32) + 0)

Definition at line 70 of file ctxnv40.c.

#define CP_FLAG_STATUS_BUSY   1

Definition at line 72 of file ctxnv40.c.

#define CP_FLAG_STATUS_IDLE   0

Definition at line 71 of file ctxnv40.c.

#define CP_FLAG_SWAP_DIRECTION   ((0 * 32) + 0)

Definition at line 61 of file ctxnv40.c.

#define CP_FLAG_SWAP_DIRECTION_LOAD   0

Definition at line 62 of file ctxnv40.c.

#define CP_FLAG_SWAP_DIRECTION_SAVE   1

Definition at line 63 of file ctxnv40.c.

#define CP_FLAG_UNK54   ((3 * 32) + 6)

Definition at line 79 of file ctxnv40.c.

#define CP_FLAG_UNK54_CLEAR   0

Definition at line 80 of file ctxnv40.c.

#define CP_FLAG_UNK54_SET   1

Definition at line 81 of file ctxnv40.c.

#define CP_FLAG_UNK57   ((3 * 32) + 9)

Definition at line 85 of file ctxnv40.c.

#define CP_FLAG_UNK57_CLEAR   0

Definition at line 86 of file ctxnv40.c.

#define CP_FLAG_UNK57_SET   1

Definition at line 87 of file ctxnv40.c.

#define CP_FLAG_USER_LOAD   ((0 * 32) + 6)

Definition at line 67 of file ctxnv40.c.

#define CP_FLAG_USER_LOAD_NOT_PENDING   0

Definition at line 68 of file ctxnv40.c.

#define CP_FLAG_USER_LOAD_PENDING   1

Definition at line 69 of file ctxnv40.c.

#define CP_FLAG_USER_SAVE   ((0 * 32) + 5)

Definition at line 64 of file ctxnv40.c.

#define CP_FLAG_USER_SAVE_NOT_PENDING   0

Definition at line 65 of file ctxnv40.c.

#define CP_FLAG_USER_SAVE_PENDING   1

Definition at line 66 of file ctxnv40.c.

#define CP_LOAD_MAGIC_NV40TCL   0x00800041 /* per-vs state (0x4097) */

Definition at line 112 of file ctxnv40.c.

#define CP_LOAD_MAGIC_NV44TCL   0x00800029 /* per-vs state (0x4497) */

Definition at line 111 of file ctxnv40.c.

#define CP_LOAD_MAGIC_UNK01   0x00800001 /* unknown */

Definition at line 110 of file ctxnv40.c.

#define CP_LOAD_SR   0x00200000

Definition at line 93 of file ctxnv40.c.

#define CP_LOAD_SR_VALUE   0x000fffff

Definition at line 94 of file ctxnv40.c.

#define CP_NEXT_TO_CURRENT   0x00600009

Definition at line 107 of file ctxnv40.c.

#define CP_NEXT_TO_SWAP   0x00600007

Definition at line 106 of file ctxnv40.c.

#define CP_SET   0x00700000

Definition at line 103 of file ctxnv40.c.

#define CP_SET_1   0x00000080

Definition at line 104 of file ctxnv40.c.

#define CP_SET_CONTEXT_POINTER   0x0060000a

Definition at line 108 of file ctxnv40.c.

#define CP_SET_FLAG   0x0000007f

Definition at line 105 of file ctxnv40.c.

#define CP_WAIT   0x00500000

Definition at line 100 of file ctxnv40.c.

#define CP_WAIT_FLAG   0x0000007f

Definition at line 102 of file ctxnv40.c.

#define CP_WAIT_SET   0x00000080

Definition at line 101 of file ctxnv40.c.

Enumeration Type Documentation

enum cp_label
Enumerator:
cp_check_load 
cp_setup_auto_load 
cp_setup_load 
cp_setup_save 
cp_swap_state 
cp_swap_state3d_3_is_save 
cp_prepare_exit 
cp_exit 
cp_check_load 
cp_setup_auto_load 
cp_setup_load 
cp_setup_save 
cp_swap_state 
cp_prepare_exit 
cp_exit 

Definition at line 149 of file ctxnv40.c.

Function Documentation

void nv40_grctx_fill ( struct nouveau_device device,
struct nouveau_gpuobj mem 
)

Definition at line 663 of file ctxnv40.c.

int nv40_grctx_init ( struct nouveau_device device,
u32 size 
)

Definition at line 673 of file ctxnv40.c.