18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* Common header for intel-gtt.ko and i915.ko */ 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci#ifndef _DRM_INTEL_GTT_H 58c2ecf20Sopenharmony_ci#define _DRM_INTEL_GTT_H 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#include <linux/agp_backend.h> 88c2ecf20Sopenharmony_ci#include <linux/intel-iommu.h> 98c2ecf20Sopenharmony_ci#include <linux/kernel.h> 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_civoid intel_gtt_get(u64 *gtt_total, 128c2ecf20Sopenharmony_ci phys_addr_t *mappable_base, 138c2ecf20Sopenharmony_ci resource_size_t *mappable_end); 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ciint intel_gmch_probe(struct pci_dev *bridge_pdev, struct pci_dev *gpu_pdev, 168c2ecf20Sopenharmony_ci struct agp_bridge_data *bridge); 178c2ecf20Sopenharmony_civoid intel_gmch_remove(void); 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_cibool intel_enable_gtt(void); 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_civoid intel_gtt_chipset_flush(void); 228c2ecf20Sopenharmony_civoid intel_gtt_insert_page(dma_addr_t addr, 238c2ecf20Sopenharmony_ci unsigned int pg, 248c2ecf20Sopenharmony_ci unsigned int flags); 258c2ecf20Sopenharmony_civoid intel_gtt_insert_sg_entries(struct sg_table *st, 268c2ecf20Sopenharmony_ci unsigned int pg_start, 278c2ecf20Sopenharmony_ci unsigned int flags); 288c2ecf20Sopenharmony_civoid intel_gtt_clear_range(unsigned int first_entry, unsigned int num_entries); 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci/* Special gtt memory types */ 318c2ecf20Sopenharmony_ci#define AGP_DCACHE_MEMORY 1 328c2ecf20Sopenharmony_ci#define AGP_PHYS_MEMORY 2 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci/* flag for GFDT type */ 358c2ecf20Sopenharmony_ci#define AGP_USER_CACHED_MEMORY_GFDT (1 << 3) 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci#endif 38