xref: /openbmc/linux/include/drm/intel-gtt.h (revision 82003e04)
1 /* Common header for intel-gtt.ko and i915.ko */
2 
3 #ifndef _DRM_INTEL_GTT_H
4 #define	_DRM_INTEL_GTT_H
5 
6 void intel_gtt_get(u64 *gtt_total, size_t *stolen_size,
7 		   phys_addr_t *mappable_base, u64 *mappable_end);
8 
9 int intel_gmch_probe(struct pci_dev *bridge_pdev, struct pci_dev *gpu_pdev,
10 		     struct agp_bridge_data *bridge);
11 void intel_gmch_remove(void);
12 
13 bool intel_enable_gtt(void);
14 
15 void intel_gtt_chipset_flush(void);
16 void intel_gtt_insert_page(dma_addr_t addr,
17 			   unsigned int pg,
18 			   unsigned int flags);
19 void intel_gtt_insert_sg_entries(struct sg_table *st,
20 				 unsigned int pg_start,
21 				 unsigned int flags);
22 void intel_gtt_clear_range(unsigned int first_entry, unsigned int num_entries);
23 
24 /* Special gtt memory types */
25 #define AGP_DCACHE_MEMORY	1
26 #define AGP_PHYS_MEMORY		2
27 
28 /* flag for GFDT type */
29 #define AGP_USER_CACHED_MEMORY_GFDT (1 << 3)
30 
31 #ifdef CONFIG_INTEL_IOMMU
32 extern int intel_iommu_gfx_mapped;
33 #endif
34 
35 #endif
36