mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-05 01:58:02 +02:00
radeon: rs690 GART tables need to be in uncached memory.
Allocate the rs480/690 tables from uncached memory.
This commit is contained in:
parent
fe59d04a7c
commit
9f9f171f8e
2 changed files with 17 additions and 5 deletions
|
|
@ -90,6 +90,12 @@ int drm_ati_alloc_pcigart_table(struct drm_device *dev,
|
|||
if (gart_info->table_handle == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
#ifdef CONFIG_X86
|
||||
/* IGPs only exist on x86 in any case */
|
||||
if (gart_info->gart_reg_if == DRM_ATI_GART_IGP)
|
||||
set_memory_uc(gart_info->table_handle->vaddr, gart_info->table_size >> PAGE_SHIFT);
|
||||
#endif
|
||||
|
||||
memset(gart_info->table_handle->vaddr, 0, gart_info->table_size);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -98,6 +104,11 @@ EXPORT_SYMBOL(drm_ati_alloc_pcigart_table);
|
|||
static void drm_ati_free_pcigart_table(struct drm_device *dev,
|
||||
struct drm_ati_pcigart_info *gart_info)
|
||||
{
|
||||
#ifdef CONFIG_X86
|
||||
/* IGPs only exist on x86 in any case */
|
||||
if (gart_info->gart_reg_if == DRM_ATI_GART_IGP)
|
||||
set_memory_wb(gart_info->table_handle->vaddr, gart_info->table_size >> PAGE_SHIFT);
|
||||
#endif
|
||||
drm_pci_free(dev, gart_info->table_handle);
|
||||
gart_info->table_handle = NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -613,17 +613,18 @@ static int radeon_gart_init(struct drm_device *dev)
|
|||
} else if (!(dev_priv->flags & RADEON_IS_AGP)) {
|
||||
/* allocate PCI GART table */
|
||||
dev_priv->gart_info.table_mask = DMA_BIT_MASK(32);
|
||||
dev_priv->gart_info.gart_table_location = DRM_ATI_GART_MAIN;
|
||||
if (dev_priv->flags & RADEON_IS_IGPGART)
|
||||
dev_priv->gart_info.gart_reg_if = DRM_ATI_GART_IGP;
|
||||
else
|
||||
dev_priv->gart_info.gart_reg_if = DRM_ATI_GART_PCI;
|
||||
|
||||
ret = drm_ati_alloc_pcigart_table(dev, &dev_priv->gart_info);
|
||||
if (ret) {
|
||||
DRM_ERROR("cannot allocate PCI GART page!\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
dev_priv->gart_info.gart_table_location = DRM_ATI_GART_MAIN;
|
||||
if (dev_priv->flags & RADEON_IS_IGPGART)
|
||||
dev_priv->gart_info.gart_reg_if = DRM_ATI_GART_IGP;
|
||||
else
|
||||
dev_priv->gart_info.gart_reg_if = DRM_ATI_GART_PCI;
|
||||
dev_priv->gart_info.addr = dev_priv->gart_info.table_handle->vaddr;
|
||||
dev_priv->gart_info.bus_addr = dev_priv->gart_info.table_handle->busaddr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue