agp: Add generic support for graphics dma remapping

New driver hooks for support graphics memory dma remapping
are introduced in this patch. It makes generic code can
tell if current device needs dma remapping, then call driver
provided interfaces for mapping and unmapping. Change has
also been made to handle scratch_page in remapping case.

Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
Zhenyu Wang 2009-07-23 17:25:49 +01:00 committed by David Woodhouse
parent 2a4ceb6d3e
commit ff663cf870
4 changed files with 40 additions and 1 deletions

View file

@ -79,9 +79,13 @@ struct agp_memory {
u32 physical;
bool is_bound;
bool is_flushed;
bool vmalloc_flag;
bool vmalloc_flag;
bool sg_vmalloc_flag;
/* list of agp_memory mapped to the aperture */
struct list_head mapped_list;
/* DMA-mapped addresses */
struct scatterlist *sg_list;
int num_sg;
};
#define AGP_NORMAL_MEMORY 0