Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
ctxnv50.c File Reference
#include <core/gpuobj.h>
#include "nv50.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_UNK01   ((0 * 32) + 1)
 
#define CP_FLAG_UNK01_CLEAR   0
 
#define CP_FLAG_UNK01_SET   1
 
#define CP_FLAG_UNK03   ((0 * 32) + 3)
 
#define CP_FLAG_UNK03_CLEAR   0
 
#define CP_FLAG_UNK03_SET   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_UNK0B   ((0 * 32) + 0xb)
 
#define CP_FLAG_UNK0B_CLEAR   0
 
#define CP_FLAG_UNK0B_SET   1
 
#define CP_FLAG_XFER_SWITCH   ((0 * 32) + 0xe)
 
#define CP_FLAG_XFER_SWITCH_DISABLE   0
 
#define CP_FLAG_XFER_SWITCH_ENABLE   1
 
#define CP_FLAG_STATE   ((0 * 32) + 0x1c)
 
#define CP_FLAG_STATE_STOPPED   0
 
#define CP_FLAG_STATE_RUNNING   1
 
#define CP_FLAG_UNK1D   ((0 * 32) + 0x1d)
 
#define CP_FLAG_UNK1D_CLEAR   0
 
#define CP_FLAG_UNK1D_SET   1
 
#define CP_FLAG_UNK20   ((1 * 32) + 0)
 
#define CP_FLAG_UNK20_CLEAR   0
 
#define CP_FLAG_UNK20_SET   1
 
#define CP_FLAG_STATUS   ((2 * 32) + 0)
 
#define CP_FLAG_STATUS_BUSY   0
 
#define CP_FLAG_STATUS_IDLE   1
 
#define CP_FLAG_AUTO_SAVE   ((2 * 32) + 4)
 
#define CP_FLAG_AUTO_SAVE_NOT_PENDING   0
 
#define CP_FLAG_AUTO_SAVE_PENDING   1
 
#define CP_FLAG_AUTO_LOAD   ((2 * 32) + 5)
 
#define CP_FLAG_AUTO_LOAD_NOT_PENDING   0
 
#define CP_FLAG_AUTO_LOAD_PENDING   1
 
#define CP_FLAG_NEWCTX   ((2 * 32) + 10)
 
#define CP_FLAG_NEWCTX_BUSY   0
 
#define CP_FLAG_NEWCTX_DONE   1
 
#define CP_FLAG_XFER   ((2 * 32) + 11)
 
#define CP_FLAG_XFER_IDLE   0
 
#define CP_FLAG_XFER_BUSY   1
 
#define CP_FLAG_ALWAYS   ((2 * 32) + 13)
 
#define CP_FLAG_ALWAYS_FALSE   0
 
#define CP_FLAG_ALWAYS_TRUE   1
 
#define CP_FLAG_INTR   ((2 * 32) + 15)
 
#define CP_FLAG_INTR_NOT_PENDING   0
 
#define CP_FLAG_INTR_PENDING   1
 
#define CP_CTX   0x00100000
 
#define CP_CTX_COUNT   0x000f0000
 
#define CP_CTX_COUNT_SHIFT   16
 
#define CP_CTX_REG   0x00003fff
 
#define CP_LOAD_SR   0x00200000
 
#define CP_LOAD_SR_VALUE   0x000fffff
 
#define CP_BRA   0x00400000
 
#define CP_BRA_IP   0x0001ff00
 
#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_NEWCTX   0x00600004
 
#define CP_NEXT_TO_SWAP   0x00600005
 
#define CP_SET_CONTEXT_POINTER   0x00600006
 
#define CP_SET_XFER_POINTER   0x00600007
 
#define CP_ENABLE   0x00600009
 
#define CP_END   0x0060000c
 
#define CP_NEXT_TO_CURRENT   0x0060000d
 
#define CP_DISABLE1   0x0090ffff
 
#define CP_DISABLE2   0x0091ffff
 
#define CP_XFER_1   0x008000ff
 
#define CP_XFER_2   0x008800ff
 
#define CP_SEEK_1   0x00c000ff
 
#define CP_SEEK_2   0x00c800ff
 
#define IS_NVA3F(x)   (((x) > 0xa0 && (x) < 0xaa) || (x) == 0xaf)
 
#define IS_NVAAF(x)   ((x) >= 0xaa && (x) <= 0xac)
 

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 nv50_grctx_fill (struct nouveau_device *device, struct nouveau_gpuobj *mem)
 
int nv50_grctx_init (struct nouveau_device *device, u32 *size)
 

Macro Definition Documentation

#define CP_BRA   0x00400000

Definition at line 85 of file ctxnv50.c.

#define CP_BRA_FLAG   0x0000007f

Definition at line 89 of file ctxnv50.c.

#define CP_BRA_IF_CLEAR   0x00000080

Definition at line 88 of file ctxnv50.c.

#define CP_BRA_IP   0x0001ff00

Definition at line 86 of file ctxnv50.c.

#define CP_BRA_IP_SHIFT   8

Definition at line 87 of file ctxnv50.c.

#define CP_CTX   0x00100000

Definition at line 79 of file ctxnv50.c.

#define CP_CTX_COUNT   0x000f0000

Definition at line 80 of file ctxnv50.c.

#define CP_CTX_COUNT_SHIFT   16

Definition at line 81 of file ctxnv50.c.

#define CP_CTX_REG   0x00003fff

Definition at line 82 of file ctxnv50.c.

#define CP_DISABLE1   0x0090ffff

Definition at line 103 of file ctxnv50.c.

#define CP_DISABLE2   0x0091ffff

Definition at line 104 of file ctxnv50.c.

#define CP_ENABLE   0x00600009

Definition at line 100 of file ctxnv50.c.

#define CP_END   0x0060000c

Definition at line 101 of file ctxnv50.c.

#define CP_FLAG_ALWAYS   ((2 * 32) + 13)

Definition at line 72 of file ctxnv50.c.

#define CP_FLAG_ALWAYS_FALSE   0

Definition at line 73 of file ctxnv50.c.

#define CP_FLAG_ALWAYS_TRUE   1

Definition at line 74 of file ctxnv50.c.

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

Definition at line 63 of file ctxnv50.c.

#define CP_FLAG_AUTO_LOAD_NOT_PENDING   0

Definition at line 64 of file ctxnv50.c.

#define CP_FLAG_AUTO_LOAD_PENDING   1

Definition at line 65 of file ctxnv50.c.

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

Definition at line 60 of file ctxnv50.c.

#define CP_FLAG_AUTO_SAVE_NOT_PENDING   0

Definition at line 61 of file ctxnv50.c.

#define CP_FLAG_AUTO_SAVE_PENDING   1

Definition at line 62 of file ctxnv50.c.

#define CP_FLAG_CLEAR   0

Definition at line 25 of file ctxnv50.c.

#define CP_FLAG_INTR   ((2 * 32) + 15)

Definition at line 75 of file ctxnv50.c.

#define CP_FLAG_INTR_NOT_PENDING   0

Definition at line 76 of file ctxnv50.c.

#define CP_FLAG_INTR_PENDING   1

Definition at line 77 of file ctxnv50.c.

#define CP_FLAG_NEWCTX   ((2 * 32) + 10)

Definition at line 66 of file ctxnv50.c.

#define CP_FLAG_NEWCTX_BUSY   0

Definition at line 67 of file ctxnv50.c.

#define CP_FLAG_NEWCTX_DONE   1

Definition at line 68 of file ctxnv50.c.

#define CP_FLAG_SET   1

Definition at line 26 of file ctxnv50.c.

#define CP_FLAG_STATE   ((0 * 32) + 0x1c)

Definition at line 48 of file ctxnv50.c.

#define CP_FLAG_STATE_RUNNING   1

Definition at line 50 of file ctxnv50.c.

#define CP_FLAG_STATE_STOPPED   0

Definition at line 49 of file ctxnv50.c.

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

Definition at line 57 of file ctxnv50.c.

#define CP_FLAG_STATUS_BUSY   0

Definition at line 58 of file ctxnv50.c.

#define CP_FLAG_STATUS_IDLE   1

Definition at line 59 of file ctxnv50.c.

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

Definition at line 27 of file ctxnv50.c.

#define CP_FLAG_SWAP_DIRECTION_LOAD   0

Definition at line 28 of file ctxnv50.c.

#define CP_FLAG_SWAP_DIRECTION_SAVE   1

Definition at line 29 of file ctxnv50.c.

#define CP_FLAG_UNK01   ((0 * 32) + 1)

Definition at line 30 of file ctxnv50.c.

#define CP_FLAG_UNK01_CLEAR   0

Definition at line 31 of file ctxnv50.c.

#define CP_FLAG_UNK01_SET   1

Definition at line 32 of file ctxnv50.c.

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

Definition at line 33 of file ctxnv50.c.

#define CP_FLAG_UNK03_CLEAR   0

Definition at line 34 of file ctxnv50.c.

#define CP_FLAG_UNK03_SET   1

Definition at line 35 of file ctxnv50.c.

#define CP_FLAG_UNK0B   ((0 * 32) + 0xb)

Definition at line 42 of file ctxnv50.c.

#define CP_FLAG_UNK0B_CLEAR   0

Definition at line 43 of file ctxnv50.c.

#define CP_FLAG_UNK0B_SET   1

Definition at line 44 of file ctxnv50.c.

#define CP_FLAG_UNK1D   ((0 * 32) + 0x1d)

Definition at line 51 of file ctxnv50.c.

#define CP_FLAG_UNK1D_CLEAR   0

Definition at line 52 of file ctxnv50.c.

#define CP_FLAG_UNK1D_SET   1

Definition at line 53 of file ctxnv50.c.

#define CP_FLAG_UNK20   ((1 * 32) + 0)

Definition at line 54 of file ctxnv50.c.

#define CP_FLAG_UNK20_CLEAR   0

Definition at line 55 of file ctxnv50.c.

#define CP_FLAG_UNK20_SET   1

Definition at line 56 of file ctxnv50.c.

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

Definition at line 39 of file ctxnv50.c.

#define CP_FLAG_USER_LOAD_NOT_PENDING   0

Definition at line 40 of file ctxnv50.c.

#define CP_FLAG_USER_LOAD_PENDING   1

Definition at line 41 of file ctxnv50.c.

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

Definition at line 36 of file ctxnv50.c.

#define CP_FLAG_USER_SAVE_NOT_PENDING   0

Definition at line 37 of file ctxnv50.c.

#define CP_FLAG_USER_SAVE_PENDING   1

Definition at line 38 of file ctxnv50.c.

#define CP_FLAG_XFER   ((2 * 32) + 11)

Definition at line 69 of file ctxnv50.c.

#define CP_FLAG_XFER_BUSY   1

Definition at line 71 of file ctxnv50.c.

#define CP_FLAG_XFER_IDLE   0

Definition at line 70 of file ctxnv50.c.

#define CP_FLAG_XFER_SWITCH   ((0 * 32) + 0xe)

Definition at line 45 of file ctxnv50.c.

#define CP_FLAG_XFER_SWITCH_DISABLE   0

Definition at line 46 of file ctxnv50.c.

#define CP_FLAG_XFER_SWITCH_ENABLE   1

Definition at line 47 of file ctxnv50.c.

#define CP_LOAD_SR   0x00200000

Definition at line 83 of file ctxnv50.c.

#define CP_LOAD_SR_VALUE   0x000fffff

Definition at line 84 of file ctxnv50.c.

#define CP_NEWCTX   0x00600004

Definition at line 96 of file ctxnv50.c.

#define CP_NEXT_TO_CURRENT   0x0060000d

Definition at line 102 of file ctxnv50.c.

#define CP_NEXT_TO_SWAP   0x00600005

Definition at line 97 of file ctxnv50.c.

#define CP_SEEK_1   0x00c000ff

Definition at line 107 of file ctxnv50.c.

#define CP_SEEK_2   0x00c800ff

Definition at line 108 of file ctxnv50.c.

#define CP_SET   0x00700000

Definition at line 93 of file ctxnv50.c.

#define CP_SET_1   0x00000080

Definition at line 94 of file ctxnv50.c.

#define CP_SET_CONTEXT_POINTER   0x00600006

Definition at line 98 of file ctxnv50.c.

#define CP_SET_FLAG   0x0000007f

Definition at line 95 of file ctxnv50.c.

#define CP_SET_XFER_POINTER   0x00600007

Definition at line 99 of file ctxnv50.c.

#define CP_WAIT   0x00500000

Definition at line 90 of file ctxnv50.c.

#define CP_WAIT_FLAG   0x0000007f

Definition at line 92 of file ctxnv50.c.

#define CP_WAIT_SET   0x00000080

Definition at line 91 of file ctxnv50.c.

#define CP_XFER_1   0x008000ff

Definition at line 105 of file ctxnv50.c.

#define CP_XFER_2   0x008800ff

Definition at line 106 of file ctxnv50.c.

#define IS_NVA3F (   x)    (((x) > 0xa0 && (x) < 0xaa) || (x) == 0xaf)

Definition at line 113 of file ctxnv50.c.

#define IS_NVAAF (   x)    ((x) >= 0xaa && (x) <= 0xac)

Definition at line 114 of file ctxnv50.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 160 of file ctxnv50.c.

Function Documentation

void nv50_grctx_fill ( struct nouveau_device device,
struct nouveau_gpuobj mem 
)

Definition at line 256 of file ctxnv50.c.

int nv50_grctx_init ( struct nouveau_device device,
u32 size 
)

Definition at line 266 of file ctxnv50.c.