intel-gtt.h 987 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* Common header for intel-gtt.ko and i915.ko */
  3. #ifndef _DRM_INTEL_GTT_H
  4. #define _DRM_INTEL_GTT_H
  5. void intel_gtt_get(u64 *gtt_total,
  6. u32 *stolen_size,
  7. phys_addr_t *mappable_base,
  8. u64 *mappable_end);
  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. bool intel_enable_gtt(void);
  13. void intel_gtt_chipset_flush(void);
  14. void intel_gtt_insert_page(dma_addr_t addr,
  15. unsigned int pg,
  16. unsigned int flags);
  17. void intel_gtt_insert_sg_entries(struct sg_table *st,
  18. unsigned int pg_start,
  19. unsigned int flags);
  20. void intel_gtt_clear_range(unsigned int first_entry, unsigned int num_entries);
  21. /* Special gtt memory types */
  22. #define AGP_DCACHE_MEMORY 1
  23. #define AGP_PHYS_MEMORY 2
  24. /* flag for GFDT type */
  25. #define AGP_USER_CACHED_MEMORY_GFDT (1 << 3)
  26. #ifdef CONFIG_INTEL_IOMMU
  27. extern int intel_iommu_gfx_mapped;
  28. #endif
  29. #endif