18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef DRM_ATI_PCIGART_H 38c2ecf20Sopenharmony_ci#define DRM_ATI_PCIGART_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <drm/drm_legacy.h> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci/* location of GART table */ 88c2ecf20Sopenharmony_ci#define DRM_ATI_GART_MAIN 1 98c2ecf20Sopenharmony_ci#define DRM_ATI_GART_FB 2 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#define DRM_ATI_GART_PCI 1 128c2ecf20Sopenharmony_ci#define DRM_ATI_GART_PCIE 2 138c2ecf20Sopenharmony_ci#define DRM_ATI_GART_IGP 3 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_cistruct drm_ati_pcigart_info { 168c2ecf20Sopenharmony_ci int gart_table_location; 178c2ecf20Sopenharmony_ci int gart_reg_if; 188c2ecf20Sopenharmony_ci void *addr; 198c2ecf20Sopenharmony_ci dma_addr_t bus_addr; 208c2ecf20Sopenharmony_ci dma_addr_t table_mask; 218c2ecf20Sopenharmony_ci struct drm_dma_handle *table_handle; 228c2ecf20Sopenharmony_ci struct drm_local_map mapping; 238c2ecf20Sopenharmony_ci int table_size; 248c2ecf20Sopenharmony_ci}; 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ciextern int drm_ati_pcigart_init(struct drm_device *dev, 278c2ecf20Sopenharmony_ci struct drm_ati_pcigart_info * gart_info); 288c2ecf20Sopenharmony_ciextern int drm_ati_pcigart_cleanup(struct drm_device *dev, 298c2ecf20Sopenharmony_ci struct drm_ati_pcigart_info * gart_info); 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci#endif 32