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_backend.h File Reference
#include <linux/list.h>

Go to the source code of this file.

Data Structures

struct  agp_version
 
struct  agp_kern_info
 
struct  agp_memory
 

Macros

#define AGP_NORMAL_MEMORY   0
 
#define AGP_USER_TYPES   (1 << 16)
 
#define AGP_USER_MEMORY   (AGP_USER_TYPES)
 
#define AGP_USER_CACHED_MEMORY   (AGP_USER_TYPES + 1)
 

Enumerations

enum  chipset_type { NOT_SUPPORTED, SUPPORTED }
 

Functions

void agp_free_memory (struct agp_memory *)
 
struct agp_memoryagp_allocate_memory (struct agp_bridge_data *, size_t, u32)
 
int agp_copy_info (struct agp_bridge_data *, struct agp_kern_info *)
 
int agp_bind_memory (struct agp_memory *, off_t)
 
int agp_unbind_memory (struct agp_memory *)
 
void agp_enable (struct agp_bridge_data *, u32)
 
struct agp_bridge_dataagp_backend_acquire (struct pci_dev *)
 
void agp_backend_release (struct agp_bridge_data *)
 

Variables

struct agp_bridge_dataagp_bridge
 
struct list_head agp_bridges
 
struct agp_bridge_data *(* agp_find_bridge )(struct pci_dev *)
 

Macro Definition Documentation

#define AGP_NORMAL_MEMORY   0

Definition at line 89 of file agp_backend.h.

#define AGP_USER_CACHED_MEMORY   (AGP_USER_TYPES + 1)

Definition at line 93 of file agp_backend.h.

#define AGP_USER_MEMORY   (AGP_USER_TYPES)

Definition at line 92 of file agp_backend.h.

#define AGP_USER_TYPES   (1 << 16)

Definition at line 91 of file agp_backend.h.

Enumeration Type Documentation

Enumerator:
NOT_SUPPORTED 
SUPPORTED 

Definition at line 35 of file agp_backend.h.

Function Documentation

struct agp_memory* agp_allocate_memory ( struct agp_bridge_data bridge,
size_t  page_count,
u32  type 
)
read

agp_allocate_memory - allocate a group of pages of a certain type.

: size_t argument of the number of pages : u32 argument of the type of memory to be allocated.

Every agp bridge device will allow you to allocate AGP_NORMAL_MEMORY which maps to physical ram. Any other type is device dependent.

It returns NULL whenever memory is unavailable.

Definition at line 234 of file generic.c.

struct agp_bridge_data* agp_backend_acquire ( struct pci_dev pdev)
read

agp_backend_acquire - attempt to acquire an agp backend.

Definition at line 67 of file backend.c.

void agp_backend_release ( struct agp_bridge_data bridge)

agp_backend_release - release the lock on the agp backend.

The caller must insure that the graphics aperture translation table is read for use by another entity.

(Ensure that all memory it bound is unbound.)

Definition at line 92 of file backend.c.

int agp_bind_memory ( struct agp_memory curr,
off_t  pg_start 
)

agp_bind_memory - Bind an agp_memory structure into the GATT.

: agp_memory pointer : an offset into the graphics aperture translation table

It returns -EINVAL if the pointer == NULL. It returns -EBUSY if the area of the table requested is already in use.

Definition at line 423 of file generic.c.

int agp_copy_info ( struct agp_bridge_data bridge,
struct agp_kern_info info 
)

agp_copy_info - copy bridge state information

: agp_kern_info pointer. The caller should insure that this pointer is valid.

This function copies information about the agp bridge device and the state of the agp backend into an agp_kern_info pointer.

Definition at line 379 of file generic.c.

void agp_enable ( struct agp_bridge_data bridge,
u32  mode 
)

agp_enable - initialise the agp point-to-point connection.

: agp mode register value to configure with.

Definition at line 1303 of file generic.c.

void agp_free_memory ( struct agp_memory curr)

agp_free_memory - free memory associated with an agp_memory pointer.

: agp_memory pointer to be freed.

It is the only function that can be called when the backend is not owned by the caller. (So it can free memory on client death.)

Definition at line 179 of file generic.c.

int agp_unbind_memory ( struct agp_memory curr)

agp_unbind_memory - Removes an agp_memory structure from the GATT

: agp_memory pointer to be removed from the GATT.

It returns -EINVAL if this piece of agp_memory is not currently bound to the graphics aperture translation table or if the agp_memory pointer == NULL

Definition at line 463 of file generic.c.

Variable Documentation

struct agp_bridge_data* agp_bridge

Definition at line 57 of file backend.c.

struct list_head agp_bridges
struct agp_bridge_data*(* agp_find_bridge)(struct pci_dev *)
read

Definition at line 54 of file backend.c.