diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2021-05-07 21:57:07 +0300 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2021-05-10 16:46:50 +0300 |
commit | 43359786a51e7fa7d89a45908de0ecee2d1dafa6 (patch) | |
tree | be73f0e8c2811827c00c407e6c35585e901402fe /drivers/gpu/drm/radeon/radeon.h | |
parent | cf241e872fc203b59e8ff4b4eae6a6c2511d3747 (diff) | |
download | linux-43359786a51e7fa7d89a45908de0ecee2d1dafa6.tar.xz |
drm/radeon: Move AGP data structures into radeon
With the AGP code already duplicated, move over the AGP structures
from the legacy code base in to radeon. The AGP data structures that
are required by radeon are now declared within the driver. The AGP
instance is stored in struct radeon_device.agp.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210507185709.22797-3-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon.h')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 4f9e8dc460be..80d7637f0c27 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -60,6 +60,7 @@ * are considered as fatal) */ +#include <linux/agp_backend.h> #include <linux/atomic.h> #include <linux/wait.h> #include <linux/list.h> @@ -1110,10 +1111,42 @@ typedef int (*radeon_packet0_check_t)(struct radeon_cs_parser *p, /* * AGP */ + +struct radeon_agp_mode { + unsigned long mode; /**< AGP mode */ +}; + +struct radeon_agp_info { + int agp_version_major; + int agp_version_minor; + unsigned long mode; + unsigned long aperture_base; /* physical address */ + unsigned long aperture_size; /* bytes */ + unsigned long memory_allowed; /* bytes */ + unsigned long memory_used; + + /* PCI information */ + unsigned short id_vendor; + unsigned short id_device; +}; + +struct radeon_agp_head { + struct agp_kern_info agp_info; + struct list_head memory; + unsigned long mode; + struct agp_bridge_data *bridge; + int enabled; + int acquired; + unsigned long base; + int agp_mtrr; + int cant_use_aperture; + unsigned long page_mask; +}; + #if IS_ENABLED(CONFIG_AGP) -struct drm_agp_head *radeon_agp_head_init(struct drm_device *dev); +struct radeon_agp_head *radeon_agp_head_init(struct drm_device *dev); #else -static inline struct drm_agp_head *radeon_agp_head_init(struct drm_device *dev) +static inline struct radeon_agp_head *radeon_agp_head_init(struct drm_device *dev) { return NULL; } @@ -2310,6 +2343,7 @@ struct radeon_device { #ifdef __alpha__ struct pci_controller *hose; #endif + struct radeon_agp_head *agp; struct rw_semaphore exclusive_lock; /* ASIC */ union radeon_asic_config config; |