From a030ce4477baa06dd9c037ccd3c8d171aac9ed44 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Tue, 23 Jan 2007 10:33:43 +0100 Subject: [AGPGART] Allow drm-populated agp memory types This patch allows drm to populate an agpgart structure with pages of its own. It's needed for the new drm memory manager which dynamically flips pages in and out of AGP. The patch modifies the generic functions as well as the intel agp driver. The intel drm driver is currently the only one supporting the new memory manager. Other agp drivers may need some minor fixing up once they have a corresponding memory manager enabled drm driver. AGP memory types >= AGP_USER_TYPES are not populated by the agpgart driver, but the drm is expected to do that, as well as taking care of cache- and tlb flushing when needed. It's not possible to request these types from user space using agpgart ioctls. The Intel driver also gets a new memory type for pages that can be bound cached to the intel GTT. Signed-off-by: Thomas Hellstrom Signed-off-by: Dave Jones --- include/linux/agp_backend.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/linux/agp_backend.h') diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h index a5c8bb5d80ba..abc521cfb084 100644 --- a/include/linux/agp_backend.h +++ b/include/linux/agp_backend.h @@ -87,10 +87,15 @@ struct agp_memory { u32 physical; u8 is_bound; u8 is_flushed; + u8 vmalloc_flag; }; #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) + extern struct agp_bridge_data *agp_bridge; extern struct list_head agp_bridges; -- cgit v1.2.1