Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
atom.h File Reference
#include <linux/types.h>
#include <drm/drmP.h>
#include "atom-types.h"
#include "atombios.h"
#include "ObjectID.h"

Go to the source code of this file.

Data Structures

struct  card_info
 
struct  atom_context
 

Macros

#define ATOM_BIOS_MAGIC   0xAA55
 
#define ATOM_ATI_MAGIC_PTR   0x30
 
#define ATOM_ATI_MAGIC   " 761295520"
 
#define ATOM_ROM_TABLE_PTR   0x48
 
#define ATOM_ROM_MAGIC   "ATOM"
 
#define ATOM_ROM_MAGIC_PTR   4
 
#define ATOM_ROM_MSG_PTR   0x10
 
#define ATOM_ROM_CMD_PTR   0x1E
 
#define ATOM_ROM_DATA_PTR   0x20
 
#define ATOM_CMD_INIT   0
 
#define ATOM_CMD_SETSCLK   0x0A
 
#define ATOM_CMD_SETMCLK   0x0B
 
#define ATOM_CMD_SETPCLK   0x0C
 
#define ATOM_CMD_SPDFANCNTL   0x39
 
#define ATOM_DATA_FWI_PTR   0xC
 
#define ATOM_DATA_IIO_PTR   0x32
 
#define ATOM_FWI_DEFSCLK_PTR   8
 
#define ATOM_FWI_DEFMCLK_PTR   0xC
 
#define ATOM_FWI_MAXSCLK_PTR   0x24
 
#define ATOM_FWI_MAXMCLK_PTR   0x28
 
#define ATOM_CT_SIZE_PTR   0
 
#define ATOM_CT_WS_PTR   4
 
#define ATOM_CT_PS_PTR   5
 
#define ATOM_CT_PS_MASK   0x7F
 
#define ATOM_CT_CODE_PTR   6
 
#define ATOM_OP_CNT   123
 
#define ATOM_OP_EOT   91
 
#define ATOM_CASE_MAGIC   0x63
 
#define ATOM_CASE_END   0x5A5A
 
#define ATOM_ARG_REG   0
 
#define ATOM_ARG_PS   1
 
#define ATOM_ARG_WS   2
 
#define ATOM_ARG_FB   3
 
#define ATOM_ARG_ID   4
 
#define ATOM_ARG_IMM   5
 
#define ATOM_ARG_PLL   6
 
#define ATOM_ARG_MC   7
 
#define ATOM_SRC_DWORD   0
 
#define ATOM_SRC_WORD0   1
 
#define ATOM_SRC_WORD8   2
 
#define ATOM_SRC_WORD16   3
 
#define ATOM_SRC_BYTE0   4
 
#define ATOM_SRC_BYTE8   5
 
#define ATOM_SRC_BYTE16   6
 
#define ATOM_SRC_BYTE24   7
 
#define ATOM_WS_QUOTIENT   0x40
 
#define ATOM_WS_REMAINDER   0x41
 
#define ATOM_WS_DATAPTR   0x42
 
#define ATOM_WS_SHIFT   0x43
 
#define ATOM_WS_OR_MASK   0x44
 
#define ATOM_WS_AND_MASK   0x45
 
#define ATOM_WS_FB_WINDOW   0x46
 
#define ATOM_WS_ATTRIBUTES   0x47
 
#define ATOM_WS_REGPTR   0x48
 
#define ATOM_IIO_NOP   0
 
#define ATOM_IIO_START   1
 
#define ATOM_IIO_READ   2
 
#define ATOM_IIO_WRITE   3
 
#define ATOM_IIO_CLEAR   4
 
#define ATOM_IIO_SET   5
 
#define ATOM_IIO_MOVE_INDEX   6
 
#define ATOM_IIO_MOVE_ATTR   7
 
#define ATOM_IIO_MOVE_DATA   8
 
#define ATOM_IIO_END   9
 
#define ATOM_IO_MM   0
 
#define ATOM_IO_PCI   1
 
#define ATOM_IO_SYSIO   2
 
#define ATOM_IO_IIO   0x80
 

Functions

struct atom_contextatom_parse (struct card_info *, void *)
 
int atom_execute_table (struct atom_context *, int, uint32_t *)
 
int atom_asic_init (struct atom_context *)
 
void atom_destroy (struct atom_context *)
 
bool atom_parse_data_header (struct atom_context *ctx, int index, uint16_t *size, uint8_t *frev, uint8_t *crev, uint16_t *data_start)
 
bool atom_parse_cmd_header (struct atom_context *ctx, int index, uint8_t *frev, uint8_t *crev)
 
int atom_allocate_fb_scratch (struct atom_context *ctx)
 

Variables

int atom_debug
 

Macro Definition Documentation

#define ATOM_ARG_FB   3

Definition at line 72 of file atom.h.

#define ATOM_ARG_ID   4

Definition at line 73 of file atom.h.

#define ATOM_ARG_IMM   5

Definition at line 74 of file atom.h.

#define ATOM_ARG_MC   7

Definition at line 76 of file atom.h.

#define ATOM_ARG_PLL   6

Definition at line 75 of file atom.h.

#define ATOM_ARG_PS   1

Definition at line 70 of file atom.h.

#define ATOM_ARG_REG   0

Definition at line 69 of file atom.h.

#define ATOM_ARG_WS   2

Definition at line 71 of file atom.h.

#define ATOM_ATI_MAGIC   " 761295520"

Definition at line 33 of file atom.h.

#define ATOM_ATI_MAGIC_PTR   0x30

Definition at line 32 of file atom.h.

#define ATOM_BIOS_MAGIC   0xAA55

Definition at line 31 of file atom.h.

#define ATOM_CASE_END   0x5A5A

Definition at line 67 of file atom.h.

#define ATOM_CASE_MAGIC   0x63

Definition at line 66 of file atom.h.

#define ATOM_CMD_INIT   0

Definition at line 43 of file atom.h.

#define ATOM_CMD_SETMCLK   0x0B

Definition at line 45 of file atom.h.

#define ATOM_CMD_SETPCLK   0x0C

Definition at line 46 of file atom.h.

#define ATOM_CMD_SETSCLK   0x0A

Definition at line 44 of file atom.h.

#define ATOM_CMD_SPDFANCNTL   0x39

Definition at line 47 of file atom.h.

#define ATOM_CT_CODE_PTR   6

Definition at line 61 of file atom.h.

#define ATOM_CT_PS_MASK   0x7F

Definition at line 60 of file atom.h.

#define ATOM_CT_PS_PTR   5

Definition at line 59 of file atom.h.

#define ATOM_CT_SIZE_PTR   0

Definition at line 57 of file atom.h.

#define ATOM_CT_WS_PTR   4

Definition at line 58 of file atom.h.

#define ATOM_DATA_FWI_PTR   0xC

Definition at line 49 of file atom.h.

#define ATOM_DATA_IIO_PTR   0x32

Definition at line 50 of file atom.h.

#define ATOM_FWI_DEFMCLK_PTR   0xC

Definition at line 53 of file atom.h.

#define ATOM_FWI_DEFSCLK_PTR   8

Definition at line 52 of file atom.h.

#define ATOM_FWI_MAXMCLK_PTR   0x28

Definition at line 55 of file atom.h.

#define ATOM_FWI_MAXSCLK_PTR   0x24

Definition at line 54 of file atom.h.

#define ATOM_IIO_CLEAR   4

Definition at line 101 of file atom.h.

#define ATOM_IIO_END   9

Definition at line 106 of file atom.h.

#define ATOM_IIO_MOVE_ATTR   7

Definition at line 104 of file atom.h.

#define ATOM_IIO_MOVE_DATA   8

Definition at line 105 of file atom.h.

#define ATOM_IIO_MOVE_INDEX   6

Definition at line 103 of file atom.h.

#define ATOM_IIO_NOP   0

Definition at line 97 of file atom.h.

#define ATOM_IIO_READ   2

Definition at line 99 of file atom.h.

#define ATOM_IIO_SET   5

Definition at line 102 of file atom.h.

#define ATOM_IIO_START   1

Definition at line 98 of file atom.h.

#define ATOM_IIO_WRITE   3

Definition at line 100 of file atom.h.

#define ATOM_IO_IIO   0x80

Definition at line 111 of file atom.h.

#define ATOM_IO_MM   0

Definition at line 108 of file atom.h.

#define ATOM_IO_PCI   1

Definition at line 109 of file atom.h.

#define ATOM_IO_SYSIO   2

Definition at line 110 of file atom.h.

#define ATOM_OP_CNT   123

Definition at line 63 of file atom.h.

#define ATOM_OP_EOT   91

Definition at line 64 of file atom.h.

#define ATOM_ROM_CMD_PTR   0x1E

Definition at line 40 of file atom.h.

#define ATOM_ROM_DATA_PTR   0x20

Definition at line 41 of file atom.h.

#define ATOM_ROM_MAGIC   "ATOM"

Definition at line 36 of file atom.h.

#define ATOM_ROM_MAGIC_PTR   4

Definition at line 37 of file atom.h.

#define ATOM_ROM_MSG_PTR   0x10

Definition at line 39 of file atom.h.

#define ATOM_ROM_TABLE_PTR   0x48

Definition at line 34 of file atom.h.

#define ATOM_SRC_BYTE0   4

Definition at line 82 of file atom.h.

#define ATOM_SRC_BYTE16   6

Definition at line 84 of file atom.h.

#define ATOM_SRC_BYTE24   7

Definition at line 85 of file atom.h.

#define ATOM_SRC_BYTE8   5

Definition at line 83 of file atom.h.

#define ATOM_SRC_DWORD   0

Definition at line 78 of file atom.h.

#define ATOM_SRC_WORD0   1

Definition at line 79 of file atom.h.

#define ATOM_SRC_WORD16   3

Definition at line 81 of file atom.h.

#define ATOM_SRC_WORD8   2

Definition at line 80 of file atom.h.

#define ATOM_WS_AND_MASK   0x45

Definition at line 92 of file atom.h.

#define ATOM_WS_ATTRIBUTES   0x47

Definition at line 94 of file atom.h.

#define ATOM_WS_DATAPTR   0x42

Definition at line 89 of file atom.h.

#define ATOM_WS_FB_WINDOW   0x46

Definition at line 93 of file atom.h.

#define ATOM_WS_OR_MASK   0x44

Definition at line 91 of file atom.h.

#define ATOM_WS_QUOTIENT   0x40

Definition at line 87 of file atom.h.

#define ATOM_WS_REGPTR   0x48

Definition at line 95 of file atom.h.

#define ATOM_WS_REMAINDER   0x41

Definition at line 88 of file atom.h.

#define ATOM_WS_SHIFT   0x43

Definition at line 90 of file atom.h.

Function Documentation

int atom_allocate_fb_scratch ( struct atom_context ctx)

Definition at line 1381 of file atom.c.

int atom_asic_init ( struct atom_context )

Definition at line 1307 of file atom.c.

void atom_destroy ( struct atom_context )

Definition at line 1336 of file atom.c.

int atom_execute_table ( struct atom_context ,
int  ,
uint32_t  
)

Definition at line 1220 of file atom.c.

struct atom_context* atom_parse ( struct card_info ,
void  
)
read

Definition at line 1250 of file atom.c.

bool atom_parse_cmd_header ( struct atom_context ctx,
int  index,
uint8_t frev,
uint8_t crev 
)

Definition at line 1364 of file atom.c.

bool atom_parse_data_header ( struct atom_context ctx,
int  index,
uint16_t size,
uint8_t frev,
uint8_t crev,
uint16_t data_start 
)

Definition at line 1343 of file atom.c.

Variable Documentation

int atom_debug

Definition at line 65 of file atom.c.