Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
agp.h File Reference
#include <asm/agp.h>

Go to the source code of this file.

Data Structures

struct  gatt_mask
 
struct  aper_size_info_8
 
struct  aper_size_info_16
 
struct  aper_size_info_32
 
struct  aper_size_info_lvl2
 
struct  aper_size_info_fixed
 
struct  agp_bridge_driver
 
struct  agp_bridge_data
 
struct  agp_device_ids
 

Macros

#define PFX   "agpgart: "
 
#define DBG(x, y...)   do { } while (0)
 
#define AGP_PAGE_DESTROY_UNMAP   1
 
#define AGP_PAGE_DESTROY_FREE   2
 
#define KB(x)   ((x) * 1024)
 
#define MB(x)   (KB (KB (x)))
 
#define GB(x)   (MB (KB (x)))
 
#define A_SIZE_8(x)   ((struct aper_size_info_8 *) x)
 
#define A_SIZE_16(x)   ((struct aper_size_info_16 *) x)
 
#define A_SIZE_32(x)   ((struct aper_size_info_32 *) x)
 
#define A_SIZE_LVL2(x)   ((struct aper_size_info_lvl2 *) x)
 
#define A_SIZE_FIX(x)   ((struct aper_size_info_fixed *) x)
 
#define A_IDX8(bridge)   (A_SIZE_8((bridge)->driver->aperture_sizes) + i)
 
#define A_IDX16(bridge)   (A_SIZE_16((bridge)->driver->aperture_sizes) + i)
 
#define A_IDX32(bridge)   (A_SIZE_32((bridge)->driver->aperture_sizes) + i)
 
#define MAXKEY   (4096 * 32)
 
#define PGE_EMPTY(b, p)   (!(p) || (p) == (unsigned long) (b)->scratch_page)
 
#define AGP_GENERIC_SIZES_ENTRIES   11
 
#define AGP_APBASE   0x10
 
#define AGPSTAT   0x4
 
#define AGPCMD   0x8
 
#define AGPNISTAT   0xc
 
#define AGPCTRL   0x10
 
#define AGPAPSIZE   0x14
 
#define AGPNEPG   0x16
 
#define AGPGARTLO   0x18
 
#define AGPGARTHI   0x1c
 
#define AGPNICMD   0x20
 
#define AGP_MAJOR_VERSION_SHIFT   (20)
 
#define AGP_MINOR_VERSION_SHIFT   (16)
 
#define AGPSTAT_RQ_DEPTH   (0xff000000)
 
#define AGPSTAT_RQ_DEPTH_SHIFT   24
 
#define AGPSTAT_CAL_MASK   (1<<12|1<<11|1<<10)
 
#define AGPSTAT_ARQSZ   (1<<15|1<<14|1<<13)
 
#define AGPSTAT_ARQSZ_SHIFT   13
 
#define AGPSTAT_SBA   (1<<9)
 
#define AGPSTAT_AGP_ENABLE   (1<<8)
 
#define AGPSTAT_FW   (1<<4)
 
#define AGPSTAT_MODE_3_0   (1<<3)
 
#define AGPSTAT2_1X   (1<<0)
 
#define AGPSTAT2_2X   (1<<1)
 
#define AGPSTAT2_4X   (1<<2)
 
#define AGPSTAT3_RSVD   (1<<2)
 
#define AGPSTAT3_8X   (1<<1)
 
#define AGPSTAT3_4X   (1)
 
#define AGPCTRL_APERENB   (1<<8)
 
#define AGPCTRL_GTLBEN   (1<<7)
 
#define AGP2_RESERVED_MASK   0x00fffcc8
 
#define AGP3_RESERVED_MASK   0x00ff00c4
 
#define AGP_ERRATA_FASTWRITES   1<<0
 
#define AGP_ERRATA_SBA   1<<1
 
#define AGP_ERRATA_1X   1<<2
 

Enumerations

enum  aper_size_type {
  U8_APER_SIZE, U16_APER_SIZE, U32_APER_SIZE, LVL2_APER_SIZE,
  FIXED_APER_SIZE
}
 

Functions

struct agp_bridge_dataagp_alloc_bridge (void)
 
void agp_put_bridge (struct agp_bridge_data *bridge)
 
int agp_add_bridge (struct agp_bridge_data *bridge)
 
void agp_remove_bridge (struct agp_bridge_data *bridge)
 
int agp_frontend_initialize (void)
 
void agp_frontend_cleanup (void)
 
void agp_generic_enable (struct agp_bridge_data *bridge, u32 mode)
 
int agp_generic_create_gatt_table (struct agp_bridge_data *bridge)
 
int agp_generic_free_gatt_table (struct agp_bridge_data *bridge)
 
struct agp_memoryagp_create_memory (int scratch_pages)
 
int agp_generic_insert_memory (struct agp_memory *mem, off_t pg_start, int type)
 
int agp_generic_remove_memory (struct agp_memory *mem, off_t pg_start, int type)
 
struct agp_memoryagp_generic_alloc_by_type (size_t page_count, int type)
 
void agp_generic_free_by_type (struct agp_memory *curr)
 
struct pageagp_generic_alloc_page (struct agp_bridge_data *bridge)
 
int agp_generic_alloc_pages (struct agp_bridge_data *agp_bridge, struct agp_memory *memory, size_t page_count)
 
void agp_generic_destroy_page (struct page *page, int flags)
 
void agp_generic_destroy_pages (struct agp_memory *memory)
 
void agp_free_key (int key)
 
int agp_num_entries (void)
 
u32 agp_collect_device_status (struct agp_bridge_data *bridge, u32 mode, u32 command)
 
void agp_device_command (u32 command, bool agp_v3)
 
int agp_3_5_enable (struct agp_bridge_data *bridge)
 
void global_cache_flush (void)
 
void get_agp_version (struct agp_bridge_data *bridge)
 
unsigned long agp_generic_mask_memory (struct agp_bridge_data *bridge, dma_addr_t phys, int type)
 
int agp_generic_type_to_mask_type (struct agp_bridge_data *bridge, int type)
 
struct agp_bridge_dataagp_generic_find_bridge (struct pci_dev *pdev)
 
struct agp_memoryagp_generic_alloc_user (size_t page_count, int type)
 
void agp_alloc_page_array (size_t size, struct agp_memory *mem)
 
void agp_free_page_array (struct agp_memory *mem)
 
int agp3_generic_fetch_size (void)
 
void agp3_generic_tlbflush (struct agp_memory *mem)
 
int agp3_generic_configure (void)
 
void agp3_generic_cleanup (void)
 
long compat_agp_ioctl (struct file *file, unsigned int cmd, unsigned long arg)
 

Variables

struct agp_bridge_dataagp_bridge
 
struct aper_size_info_16 agp3_generic_sizes []
 
int agp_off
 
int agp_try_unsupported_boot
 

Macro Definition Documentation

#define A_IDX16 (   bridge)    (A_SIZE_16((bridge)->driver->aperture_sizes) + i)

Definition at line 168 of file agp.h.

#define A_IDX32 (   bridge)    (A_SIZE_32((bridge)->driver->aperture_sizes) + i)

Definition at line 169 of file agp.h.

#define A_IDX8 (   bridge)    (A_SIZE_8((bridge)->driver->aperture_sizes) + i)

Definition at line 167 of file agp.h.

#define A_SIZE_16 (   x)    ((struct aper_size_info_16 *) x)

Definition at line 163 of file agp.h.

#define A_SIZE_32 (   x)    ((struct aper_size_info_32 *) x)

Definition at line 164 of file agp.h.

#define A_SIZE_8 (   x)    ((struct aper_size_info_8 *) x)

Definition at line 162 of file agp.h.

#define A_SIZE_FIX (   x)    ((struct aper_size_info_fixed *) x)

Definition at line 166 of file agp.h.

#define A_SIZE_LVL2 (   x)    ((struct aper_size_info_lvl2 *) x)

Definition at line 165 of file agp.h.

#define AGP2_RESERVED_MASK   0x00fffcc8

Definition at line 279 of file agp.h.

#define AGP3_RESERVED_MASK   0x00ff00c4

Definition at line 280 of file agp.h.

#define AGP_APBASE   0x10

Definition at line 241 of file agp.h.

#define AGP_ERRATA_1X   1<<2

Definition at line 284 of file agp.h.

#define AGP_ERRATA_FASTWRITES   1<<0

Definition at line 282 of file agp.h.

#define AGP_ERRATA_SBA   1<<1

Definition at line 283 of file agp.h.

#define AGP_GENERIC_SIZES_ENTRIES   11

Definition at line 232 of file agp.h.

#define AGP_MAJOR_VERSION_SHIFT   (20)

Definition at line 253 of file agp.h.

#define AGP_MINOR_VERSION_SHIFT   (16)

Definition at line 254 of file agp.h.

#define AGP_PAGE_DESTROY_FREE   2

Definition at line 62 of file agp.h.

#define AGP_PAGE_DESTROY_UNMAP   1

Definition at line 61 of file agp.h.

#define AGPAPSIZE   0x14

Definition at line 247 of file agp.h.

#define AGPCMD   0x8

Definition at line 244 of file agp.h.

#define AGPCTRL   0x10

Definition at line 246 of file agp.h.

#define AGPCTRL_APERENB   (1<<8)

Definition at line 276 of file agp.h.

#define AGPCTRL_GTLBEN   (1<<7)

Definition at line 277 of file agp.h.

#define AGPGARTHI   0x1c

Definition at line 250 of file agp.h.

#define AGPGARTLO   0x18

Definition at line 249 of file agp.h.

#define AGPNEPG   0x16

Definition at line 248 of file agp.h.

#define AGPNICMD   0x20

Definition at line 251 of file agp.h.

#define AGPNISTAT   0xc

Definition at line 245 of file agp.h.

#define AGPSTAT   0x4

Definition at line 243 of file agp.h.

#define AGPSTAT2_1X   (1<<0)

Definition at line 268 of file agp.h.

#define AGPSTAT2_2X   (1<<1)

Definition at line 269 of file agp.h.

#define AGPSTAT2_4X   (1<<2)

Definition at line 270 of file agp.h.

#define AGPSTAT3_4X   (1)

Definition at line 274 of file agp.h.

#define AGPSTAT3_8X   (1<<1)

Definition at line 273 of file agp.h.

#define AGPSTAT3_RSVD   (1<<2)

Definition at line 272 of file agp.h.

#define AGPSTAT_AGP_ENABLE   (1<<8)

Definition at line 264 of file agp.h.

#define AGPSTAT_ARQSZ   (1<<15|1<<14|1<<13)

Definition at line 260 of file agp.h.

#define AGPSTAT_ARQSZ_SHIFT   13

Definition at line 261 of file agp.h.

#define AGPSTAT_CAL_MASK   (1<<12|1<<11|1<<10)

Definition at line 259 of file agp.h.

#define AGPSTAT_FW   (1<<4)

Definition at line 265 of file agp.h.

#define AGPSTAT_MODE_3_0   (1<<3)

Definition at line 266 of file agp.h.

#define AGPSTAT_RQ_DEPTH   (0xff000000)

Definition at line 256 of file agp.h.

#define AGPSTAT_RQ_DEPTH_SHIFT   24

Definition at line 257 of file agp.h.

#define AGPSTAT_SBA   (1<<9)

Definition at line 263 of file agp.h.

#define DBG (   x,
  y... 
)    do { } while (0)

Definition at line 40 of file agp.h.

#define GB (   x)    (MB (KB (x)))

Definition at line 160 of file agp.h.

#define KB (   x)    ((x) * 1024)

Definition at line 158 of file agp.h.

#define MAXKEY   (4096 * 32)

Definition at line 170 of file agp.h.

#define MB (   x)    (KB (KB (x)))

Definition at line 159 of file agp.h.

#define PFX   "agpgart: "

Definition at line 34 of file agp.h.

#define PGE_EMPTY (   b,
  p 
)    (!(p) || (p) == (unsigned long) (b)->scratch_page)

Definition at line 172 of file agp.h.

Enumeration Type Documentation

Enumerator:
U8_APER_SIZE 
U16_APER_SIZE 
U32_APER_SIZE 
LVL2_APER_SIZE 
FIXED_APER_SIZE 

Definition at line 45 of file agp.h.

Function Documentation

void agp3_generic_cleanup ( void  )

Definition at line 1413 of file generic.c.

int agp3_generic_configure ( void  )

Definition at line 1392 of file generic.c.

int agp3_generic_fetch_size ( void  )

Definition at line 1361 of file generic.c.

void agp3_generic_tlbflush ( struct agp_memory mem)

Definition at line 1383 of file generic.c.

int agp_3_5_enable ( struct agp_bridge_data bridge)

Definition at line 316 of file isoch.c.

int agp_add_bridge ( struct agp_bridge_data bridge)

Definition at line 264 of file backend.c.

struct agp_bridge_data* agp_alloc_bridge ( void  )
read

Definition at line 235 of file backend.c.

void agp_alloc_page_array ( size_t  size,
struct agp_memory mem 
)

Definition at line 90 of file generic.c.

u32 agp_collect_device_status ( struct agp_bridge_data bridge,
u32  requested_mode,
u32  bridge_agpstat 
)

agp_collect_device_status - determine correct agp_cmd from various agp_stat's : an agp_bridge_data struct allocated for the AGP host bridge. : requested agp_stat from userspace (Typically from X) : current agp_stat from AGP bridge.

This function will hunt for an AGP graphics card, and try to match the requested mode to the capabilities of both the bridge and the card.

Definition at line 736 of file generic.c.

struct agp_memory* agp_create_memory ( int  scratch_pages)
read

Definition at line 143 of file generic.c.

void agp_device_command ( u32  command,
bool  agp_v3 
)

Definition at line 782 of file generic.c.

void agp_free_key ( int  key)

Definition at line 61 of file generic.c.

void agp_free_page_array ( struct agp_memory mem)

Definition at line 102 of file generic.c.

void agp_frontend_cleanup ( void  )

Definition at line 1078 of file frontend.c.

int agp_frontend_initialize ( void  )

Definition at line 1066 of file frontend.c.

struct agp_memory* agp_generic_alloc_by_type ( size_t  page_count,
int  type 
)
read

Definition at line 1165 of file generic.c.

struct page* agp_generic_alloc_page ( struct agp_bridge_data bridge)
read

Definition at line 1237 of file generic.c.

int agp_generic_alloc_pages ( struct agp_bridge_data agp_bridge,
struct agp_memory memory,
size_t  page_count 
)

Definition at line 1207 of file generic.c.

struct agp_memory* agp_generic_alloc_user ( size_t  page_count,
int  type 
)
read

Definition at line 1179 of file generic.c.

int agp_generic_create_gatt_table ( struct agp_bridge_data bridge)

Definition at line 865 of file generic.c.

void agp_generic_destroy_page ( struct page page,
int  flags 
)

Definition at line 1279 of file generic.c.

void agp_generic_destroy_pages ( struct agp_memory memory)

Definition at line 1253 of file generic.c.

void agp_generic_enable ( struct agp_bridge_data bridge,
u32  mode 
)

Definition at line 819 of file generic.c.

struct agp_bridge_data* agp_generic_find_bridge ( struct pci_dev pdev)
read

Definition at line 1315 of file generic.c.

void agp_generic_free_by_type ( struct agp_memory curr)

Definition at line 1171 of file generic.c.

int agp_generic_free_gatt_table ( struct agp_bridge_data bridge)

Definition at line 988 of file generic.c.

int agp_generic_insert_memory ( struct agp_memory mem,
off_t  pg_start,
int  type 
)

Definition at line 1045 of file generic.c.

unsigned long agp_generic_mask_memory ( struct agp_bridge_data bridge,
dma_addr_t  phys,
int  type 
)

Definition at line 1335 of file generic.c.

int agp_generic_remove_memory ( struct agp_memory mem,
off_t  pg_start,
int  type 
)

Definition at line 1127 of file generic.c.

int agp_generic_type_to_mask_type ( struct agp_bridge_data bridge,
int  type 
)

Definition at line 1346 of file generic.c.

int agp_num_entries ( void  )

Definition at line 335 of file generic.c.

void agp_put_bridge ( struct agp_bridge_data bridge)

Definition at line 254 of file backend.c.

void agp_remove_bridge ( struct agp_bridge_data bridge)

Definition at line 320 of file backend.c.

long compat_agp_ioctl ( struct file file,
unsigned int  cmd,
unsigned long  arg 
)

Definition at line 206 of file compat_ioctl.c.

void get_agp_version ( struct agp_bridge_data bridge)

Definition at line 804 of file generic.c.

void global_cache_flush ( void  )

Definition at line 1328 of file generic.c.

Variable Documentation

struct aper_size_info_16 agp3_generic_sizes[]

Definition at line 1421 of file generic.c.

struct agp_bridge_data* agp_bridge

Definition at line 57 of file backend.c.

int agp_off

Definition at line 330 of file backend.c.

int agp_try_unsupported_boot

Definition at line 331 of file backend.c.