summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2001-09-25 09:35:37 +0000
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2001-09-25 09:35:37 +0000
commit3d9ff790cd9427fda4a163eac1d3b14e2ce1af12 (patch)
tree5d988d60380884490adf273e740caff94b20798a
parent759572da3bc7f5bb3d8774f007be61a33d6abfc7 (diff)
merge with latest trunk code.
-rw-r--r--linux-core/ati_pcigart.c14
-rw-r--r--linux-core/drmP.h6
-rw-r--r--linux-core/drm_agpsupport.c8
-rw-r--r--linux-core/drm_context.c2
-rw-r--r--linux-core/drm_drv.c1
-rw-r--r--linux-core/drm_ioctl.c4
-rw-r--r--linux-core/drm_scatter.c6
-rw-r--r--linux-core/drm_vm.c52
-rw-r--r--linux/ati_pcigart.h14
-rw-r--r--linux/drmP.h6
-rw-r--r--linux/drm_agpsupport.h8
-rw-r--r--linux/drm_context.h2
-rw-r--r--linux/drm_drv.h1
-rw-r--r--linux/drm_ioctl.h4
-rw-r--r--linux/drm_scatter.h6
-rw-r--r--linux/drm_vm.h52
-rw-r--r--linux/r128_cce.c9
-rw-r--r--linux/radeon_cp.c16
18 files changed, 113 insertions, 98 deletions
diff --git a/linux-core/ati_pcigart.c b/linux-core/ati_pcigart.c
index d5d7c0ad..8b486c10 100644
--- a/linux-core/ati_pcigart.c
+++ b/linux-core/ati_pcigart.c
@@ -103,7 +103,6 @@ int DRM(ati_pcigart_init)( drm_device_t *dev,
goto done;
}
-#if defined(__alpha__)
if ( !dev->pdev ) {
DRM_ERROR( "PCI device unknown!\n" );
goto done;
@@ -118,9 +117,6 @@ int DRM(ati_pcigart_init)( drm_device_t *dev,
address = 0;
goto done;
}
-#else
- bus_address = virt_to_bus( (void *)address );
-#endif
pci_gart = (u32 *)address;
@@ -130,7 +126,6 @@ int DRM(ati_pcigart_init)( drm_device_t *dev,
memset( pci_gart, 0, ATI_MAX_PCIGART_PAGES * sizeof(u32) );
for ( i = 0 ; i < pages ; i++ ) {
-#if defined(__alpha__)
/* we need to support large memory configurations */
entry->busaddr[i] = pci_map_single(dev->pdev,
page_address( entry->pagelist[i] ),
@@ -144,9 +139,7 @@ int DRM(ati_pcigart_init)( drm_device_t *dev,
goto done;
}
page_base = (u32) entry->busaddr[i];
-#else
- page_base = page_to_bus( entry->pagelist[i] );
-#endif
+
for (j = 0; j < (PAGE_SIZE / ATI_PCIGART_PAGE_SIZE); j++) {
*pci_gart++ = cpu_to_le32( page_base );
page_base += ATI_PCIGART_PAGE_SIZE;
@@ -155,7 +148,7 @@ int DRM(ati_pcigart_init)( drm_device_t *dev,
ret = 1;
-#if __i386__
+#if defined(__i386__) || defined(__x86_64__)
asm volatile ( "wbinvd" ::: "memory" );
#else
mb();
@@ -171,7 +164,6 @@ int DRM(ati_pcigart_cleanup)( drm_device_t *dev,
unsigned long addr,
dma_addr_t bus_addr)
{
-#if defined(__alpha__)
drm_sg_mem_t *entry = dev->sg;
unsigned long pages;
int i;
@@ -197,8 +189,6 @@ int DRM(ati_pcigart_cleanup)( drm_device_t *dev,
}
}
-#endif
-
if ( addr ) {
DRM(ati_free_pcigart_table)( addr );
}
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index 9cc2f061..df7e48f2 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -401,6 +401,8 @@ typedef struct drm_agp_head {
int acquired;
unsigned long base;
int agp_mtrr;
+ int cant_use_aperture;
+ unsigned long page_mask;
} drm_agp_head_t;
#endif
@@ -409,9 +411,7 @@ typedef struct drm_sg_mem {
void *virtual;
int pages;
struct page **pagelist;
-#if defined(__alpha__)
dma_addr_t *busaddr;
-#endif
} drm_sg_mem_t;
typedef struct drm_sigdata {
@@ -559,8 +559,8 @@ struct drm_device {
#if __REALLY_HAVE_AGP
drm_agp_head_t *agp;
#endif
-#ifdef __alpha__
struct pci_dev *pdev;
+#ifdef __alpha__
#if LINUX_VERSION_CODE < 0x020403
struct pci_controler *hose;
#else
diff --git a/linux-core/drm_agpsupport.c b/linux-core/drm_agpsupport.c
index b4b85abd..28cc5a26 100644
--- a/linux-core/drm_agpsupport.c
+++ b/linux-core/drm_agpsupport.c
@@ -308,6 +308,14 @@ drm_agp_head_t *DRM(agp_init)(void)
default: head->chipset = "Unknown"; break;
}
+#if LINUX_VERSION_CODE <= 0x020408
+ head->cant_use_aperture = 0;
+ head->page_mask = ~(0xfff);
+#else
+ head->cant_use_aperture = head->agp_info.cant_use_aperture;
+ head->page_mask = head->agp_info.page_mask;
+#endif
+
DRM_INFO("AGP %d.%d on %s @ 0x%08lx %ZuMB\n",
head->agp_info.version.major,
head->agp_info.version.minor,
diff --git a/linux-core/drm_context.c b/linux-core/drm_context.c
index 79cb1360..a3d4e56c 100644
--- a/linux-core/drm_context.c
+++ b/linux-core/drm_context.c
@@ -177,7 +177,7 @@ int DRM(setsareactx)( DRM_OS_IOCTL )
drm_ctx_priv_map_t request;
drm_map_t *map = NULL;
#ifdef __linux__
- drm_map_list_t *r_list;
+ drm_map_list_t *r_list = NULL;
struct list_head *list;
#endif /* __linux__ */
#ifdef __FreeBSD__
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index 941f2373..5b56f4cd 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -253,6 +253,7 @@ static char *drm_opts = NULL;
MODULE_AUTHOR( DRIVER_AUTHOR );
MODULE_DESCRIPTION( DRIVER_DESC );
MODULE_PARM( drm_opts, "s" );
+MODULE_LICENSE("GPL and additional rights");
#endif /* __linux__ */
#ifdef __FreeBSD__
diff --git a/linux-core/drm_ioctl.c b/linux-core/drm_ioctl.c
index db793234..9232f398 100644
--- a/linux-core/drm_ioctl.c
+++ b/linux-core/drm_ioctl.c
@@ -140,7 +140,6 @@ int DRM(setunique)( DRM_OS_IOCTL )
sprintf(dev->devname, "%s@%s", dev->name, dev->unique);
#ifdef __linux__
-#ifdef __alpha__
do {
struct pci_dev *pci_dev;
int b, d, f;
@@ -158,10 +157,11 @@ int DRM(setunique)( DRM_OS_IOCTL )
pci_dev = pci_find_slot(b, PCI_DEVFN(d,f));
if (pci_dev) {
dev->pdev = pci_dev;
+#ifdef __alpha__
dev->hose = pci_dev->sysdata;
+#endif
}
} while(0);
-#endif
#endif /* __linux__ */
return 0;
diff --git a/linux-core/drm_scatter.c b/linux-core/drm_scatter.c
index f0074450..a6b8275f 100644
--- a/linux-core/drm_scatter.c
+++ b/linux-core/drm_scatter.c
@@ -47,11 +47,9 @@ void DRM(sg_cleanup)( drm_sg_mem_t *entry )
vfree( entry->virtual );
-#if defined(__alpha__)
DRM(free)( entry->busaddr,
entry->pages * sizeof(*entry->busaddr),
DRM_MEM_PAGES );
-#endif
DRM(free)( entry->pagelist,
entry->pages * sizeof(*entry->pagelist),
DRM_MEM_PAGES );
@@ -99,7 +97,6 @@ int DRM(sg_alloc)( struct inode *inode, struct file *filp,
return -ENOMEM;
}
-#if defined(__alpha__)
entry->busaddr = DRM(alloc)( pages * sizeof(*entry->busaddr),
DRM_MEM_PAGES );
if ( !entry->busaddr ) {
@@ -112,15 +109,12 @@ int DRM(sg_alloc)( struct inode *inode, struct file *filp,
return -ENOMEM;
}
memset( (void *)entry->busaddr, 0, pages * sizeof(*entry->busaddr) );
-#endif
entry->virtual = vmalloc_32( pages << PAGE_SHIFT );
if ( !entry->virtual ) {
-#if defined(__alpha__)
DRM(free)( entry->busaddr,
entry->pages * sizeof(*entry->busaddr),
DRM_MEM_PAGES );
-#endif
DRM(free)( entry->pagelist,
entry->pages * sizeof(*entry->pagelist),
DRM_MEM_PAGES );
diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c
index f01d2081..ae50eda8 100644
--- a/linux-core/drm_vm.c
+++ b/linux-core/drm_vm.c
@@ -56,11 +56,18 @@ struct vm_operations_struct DRM(vm_sg_ops) = {
close: DRM(vm_close),
};
+#if LINUX_VERSION_CODE < 0x020317
+unsigned long DRM(vm_nopage)(struct vm_area_struct *vma,
+ unsigned long address,
+ int write_access)
+#else
+ /* Return type changed in 2.3.23 */
struct page *DRM(vm_nopage)(struct vm_area_struct *vma,
unsigned long address,
int write_access)
+#endif
{
-#if defined(__alpha__) && __REALLY_HAVE_AGP
+#if __REALLY_HAVE_AGP
drm_file_t *priv = vma->vm_file->private_data;
drm_device_t *dev = priv->dev;
drm_map_t *map = NULL;
@@ -70,6 +77,9 @@ struct page *DRM(vm_nopage)(struct vm_area_struct *vma,
/*
* Find the right map
*/
+
+ if(!dev->agp->cant_use_aperture) goto vm_nopage_error;
+
list_for_each(list, &dev->maplist->head) {
r_list = (drm_map_list_t *)list;
map = r_list->map;
@@ -83,10 +93,12 @@ struct page *DRM(vm_nopage)(struct vm_area_struct *vma,
struct drm_agp_mem *agpmem;
struct page *page;
+#if __alpha__
/*
- * Make it a bus-relative address
+ * Adjust to a bus-relative address
*/
baddr -= dev->hose->mem_space->start;
+#endif
/*
* It's AGP memory - find the real physical page to map
@@ -97,35 +109,47 @@ struct page *DRM(vm_nopage)(struct vm_area_struct *vma,
break;
}
- if (!agpmem) {
- /*
- * Oops - no memory found
- */
- return NOPAGE_SIGBUS; /* couldn't find it */
- }
+ if (!agpmem) goto vm_nopage_error;
/*
* Get the page, inc the use count, and return it
*/
offset = (baddr - agpmem->bound) >> PAGE_SHIFT;
- agpmem->memory->memory[offset] &= ~1UL; /* HACK */
+ agpmem->memory->memory[offset] &= dev->agp->page_mask;
page = virt_to_page(__va(agpmem->memory->memory[offset]));
-#if 0
- DRM_ERROR("baddr = 0x%lx page = 0x%lx, offset = 0x%lx\n",
- baddr, __va(agpmem->memory->memory[offset]), offset);
-#endif
get_page(page);
+
+ DRM_DEBUG("baddr = 0x%lx page = 0x%p, offset = 0x%lx\n",
+ baddr, __va(agpmem->memory->memory[offset]), offset);
+
+#if LINUX_VERSION_CODE < 0x020317
+ return page_address(page);
+#else
return page;
- }
#endif
+ }
+vm_nopage_error:
+#endif /* __REALLY_HAVE_AGP */
+
return NOPAGE_SIGBUS; /* Disallow mremap */
}
+#if LINUX_VERSION_CODE < 0x020317
+unsigned long DRM(vm_shm_nopage)(struct vm_area_struct *vma,
+ unsigned long address,
+ int write_access)
+#else
+ /* Return type changed in 2.3.23 */
struct page *DRM(vm_shm_nopage)(struct vm_area_struct *vma,
unsigned long address,
int write_access)
+#endif
{
+#if LINUX_VERSION_CODE >= 0x020300
drm_map_t *map = (drm_map_t *)vma->vm_private_data;
+#else
+ drm_map_t *map = (drm_map_t *)vma->vm_pte;
+#endif
unsigned long offset;
unsigned long i;
pgd_t *pgd;
diff --git a/linux/ati_pcigart.h b/linux/ati_pcigart.h
index d5d7c0ad..8b486c10 100644
--- a/linux/ati_pcigart.h
+++ b/linux/ati_pcigart.h
@@ -103,7 +103,6 @@ int DRM(ati_pcigart_init)( drm_device_t *dev,
goto done;
}
-#if defined(__alpha__)
if ( !dev->pdev ) {
DRM_ERROR( "PCI device unknown!\n" );
goto done;
@@ -118,9 +117,6 @@ int DRM(ati_pcigart_init)( drm_device_t *dev,
address = 0;
goto done;
}
-#else
- bus_address = virt_to_bus( (void *)address );
-#endif
pci_gart = (u32 *)address;
@@ -130,7 +126,6 @@ int DRM(ati_pcigart_init)( drm_device_t *dev,
memset( pci_gart, 0, ATI_MAX_PCIGART_PAGES * sizeof(u32) );
for ( i = 0 ; i < pages ; i++ ) {
-#if defined(__alpha__)
/* we need to support large memory configurations */
entry->busaddr[i] = pci_map_single(dev->pdev,
page_address( entry->pagelist[i] ),
@@ -144,9 +139,7 @@ int DRM(ati_pcigart_init)( drm_device_t *dev,
goto done;
}
page_base = (u32) entry->busaddr[i];
-#else
- page_base = page_to_bus( entry->pagelist[i] );
-#endif
+
for (j = 0; j < (PAGE_SIZE / ATI_PCIGART_PAGE_SIZE); j++) {
*pci_gart++ = cpu_to_le32( page_base );
page_base += ATI_PCIGART_PAGE_SIZE;
@@ -155,7 +148,7 @@ int DRM(ati_pcigart_init)( drm_device_t *dev,
ret = 1;
-#if __i386__
+#if defined(__i386__) || defined(__x86_64__)
asm volatile ( "wbinvd" ::: "memory" );
#else
mb();
@@ -171,7 +164,6 @@ int DRM(ati_pcigart_cleanup)( drm_device_t *dev,
unsigned long addr,
dma_addr_t bus_addr)
{
-#if defined(__alpha__)
drm_sg_mem_t *entry = dev->sg;
unsigned long pages;
int i;
@@ -197,8 +189,6 @@ int DRM(ati_pcigart_cleanup)( drm_device_t *dev,
}
}
-#endif
-
if ( addr ) {
DRM(ati_free_pcigart_table)( addr );
}
diff --git a/linux/drmP.h b/linux/drmP.h
index 9cc2f061..df7e48f2 100644
--- a/linux/drmP.h
+++ b/linux/drmP.h
@@ -401,6 +401,8 @@ typedef struct drm_agp_head {
int acquired;
unsigned long base;
int agp_mtrr;
+ int cant_use_aperture;
+ unsigned long page_mask;
} drm_agp_head_t;
#endif
@@ -409,9 +411,7 @@ typedef struct drm_sg_mem {
void *virtual;
int pages;
struct page **pagelist;
-#if defined(__alpha__)
dma_addr_t *busaddr;
-#endif
} drm_sg_mem_t;
typedef struct drm_sigdata {
@@ -559,8 +559,8 @@ struct drm_device {
#if __REALLY_HAVE_AGP
drm_agp_head_t *agp;
#endif
-#ifdef __alpha__
struct pci_dev *pdev;
+#ifdef __alpha__
#if LINUX_VERSION_CODE < 0x020403
struct pci_controler *hose;
#else
diff --git a/linux/drm_agpsupport.h b/linux/drm_agpsupport.h
index b4b85abd..28cc5a26 100644
--- a/linux/drm_agpsupport.h
+++ b/linux/drm_agpsupport.h
@@ -308,6 +308,14 @@ drm_agp_head_t *DRM(agp_init)(void)
default: head->chipset = "Unknown"; break;
}
+#if LINUX_VERSION_CODE <= 0x020408
+ head->cant_use_aperture = 0;
+ head->page_mask = ~(0xfff);
+#else
+ head->cant_use_aperture = head->agp_info.cant_use_aperture;
+ head->page_mask = head->agp_info.page_mask;
+#endif
+
DRM_INFO("AGP %d.%d on %s @ 0x%08lx %ZuMB\n",
head->agp_info.version.major,
head->agp_info.version.minor,
diff --git a/linux/drm_context.h b/linux/drm_context.h
index 79cb1360..a3d4e56c 100644
--- a/linux/drm_context.h
+++ b/linux/drm_context.h
@@ -177,7 +177,7 @@ int DRM(setsareactx)( DRM_OS_IOCTL )
drm_ctx_priv_map_t request;
drm_map_t *map = NULL;
#ifdef __linux__
- drm_map_list_t *r_list;
+ drm_map_list_t *r_list = NULL;
struct list_head *list;
#endif /* __linux__ */
#ifdef __FreeBSD__
diff --git a/linux/drm_drv.h b/linux/drm_drv.h
index 941f2373..5b56f4cd 100644
--- a/linux/drm_drv.h
+++ b/linux/drm_drv.h
@@ -253,6 +253,7 @@ static char *drm_opts = NULL;
MODULE_AUTHOR( DRIVER_AUTHOR );
MODULE_DESCRIPTION( DRIVER_DESC );
MODULE_PARM( drm_opts, "s" );
+MODULE_LICENSE("GPL and additional rights");
#endif /* __linux__ */
#ifdef __FreeBSD__
diff --git a/linux/drm_ioctl.h b/linux/drm_ioctl.h
index db793234..9232f398 100644
--- a/linux/drm_ioctl.h
+++ b/linux/drm_ioctl.h
@@ -140,7 +140,6 @@ int DRM(setunique)( DRM_OS_IOCTL )
sprintf(dev->devname, "%s@%s", dev->name, dev->unique);
#ifdef __linux__
-#ifdef __alpha__
do {
struct pci_dev *pci_dev;
int b, d, f;
@@ -158,10 +157,11 @@ int DRM(setunique)( DRM_OS_IOCTL )
pci_dev = pci_find_slot(b, PCI_DEVFN(d,f));
if (pci_dev) {
dev->pdev = pci_dev;
+#ifdef __alpha__
dev->hose = pci_dev->sysdata;
+#endif
}
} while(0);
-#endif
#endif /* __linux__ */
return 0;
diff --git a/linux/drm_scatter.h b/linux/drm_scatter.h
index f0074450..a6b8275f 100644
--- a/linux/drm_scatter.h
+++ b/linux/drm_scatter.h
@@ -47,11 +47,9 @@ void DRM(sg_cleanup)( drm_sg_mem_t *entry )
vfree( entry->virtual );
-#if defined(__alpha__)
DRM(free)( entry->busaddr,
entry->pages * sizeof(*entry->busaddr),
DRM_MEM_PAGES );
-#endif
DRM(free)( entry->pagelist,
entry->pages * sizeof(*entry->pagelist),
DRM_MEM_PAGES );
@@ -99,7 +97,6 @@ int DRM(sg_alloc)( struct inode *inode, struct file *filp,
return -ENOMEM;
}
-#if defined(__alpha__)
entry->busaddr = DRM(alloc)( pages * sizeof(*entry->busaddr),
DRM_MEM_PAGES );
if ( !entry->busaddr ) {
@@ -112,15 +109,12 @@ int DRM(sg_alloc)( struct inode *inode, struct file *filp,
return -ENOMEM;
}
memset( (void *)entry->busaddr, 0, pages * sizeof(*entry->busaddr) );
-#endif
entry->virtual = vmalloc_32( pages << PAGE_SHIFT );
if ( !entry->virtual ) {
-#if defined(__alpha__)
DRM(free)( entry->busaddr,
entry->pages * sizeof(*entry->busaddr),
DRM_MEM_PAGES );
-#endif
DRM(free)( entry->pagelist,
entry->pages * sizeof(*entry->pagelist),
DRM_MEM_PAGES );
diff --git a/linux/drm_vm.h b/linux/drm_vm.h
index f01d2081..ae50eda8 100644
--- a/linux/drm_vm.h
+++ b/linux/drm_vm.h
@@ -56,11 +56,18 @@ struct vm_operations_struct DRM(vm_sg_ops) = {
close: DRM(vm_close),
};
+#if LINUX_VERSION_CODE < 0x020317
+unsigned long DRM(vm_nopage)(struct vm_area_struct *vma,
+ unsigned long address,
+ int write_access)
+#else
+ /* Return type changed in 2.3.23 */
struct page *DRM(vm_nopage)(struct vm_area_struct *vma,
unsigned long address,
int write_access)
+#endif
{
-#if defined(__alpha__) && __REALLY_HAVE_AGP
+#if __REALLY_HAVE_AGP
drm_file_t *priv = vma->vm_file->private_data;
drm_device_t *dev = priv->dev;
drm_map_t *map = NULL;
@@ -70,6 +77,9 @@ struct page *DRM(vm_nopage)(struct vm_area_struct *vma,
/*
* Find the right map
*/
+
+ if(!dev->agp->cant_use_aperture) goto vm_nopage_error;
+
list_for_each(list, &dev->maplist->head) {
r_list = (drm_map_list_t *)list;
map = r_list->map;
@@ -83,10 +93,12 @@ struct page *DRM(vm_nopage)(struct vm_area_struct *vma,
struct drm_agp_mem *agpmem;
struct page *page;
+#if __alpha__
/*
- * Make it a bus-relative address
+ * Adjust to a bus-relative address
*/
baddr -= dev->hose->mem_space->start;
+#endif
/*
* It's AGP memory - find the real physical page to map
@@ -97,35 +109,47 @@ struct page *DRM(vm_nopage)(struct vm_area_struct *vma,
break;
}
- if (!agpmem) {
- /*
- * Oops - no memory found
- */
- return NOPAGE_SIGBUS; /* couldn't find it */
- }
+ if (!agpmem) goto vm_nopage_error;
/*
* Get the page, inc the use count, and return it
*/
offset = (baddr - agpmem->bound) >> PAGE_SHIFT;
- agpmem->memory->memory[offset] &= ~1UL; /* HACK */
+ agpmem->memory->memory[offset] &= dev->agp->page_mask;
page = virt_to_page(__va(agpmem->memory->memory[offset]));
-#if 0
- DRM_ERROR("baddr = 0x%lx page = 0x%lx, offset = 0x%lx\n",
- baddr, __va(agpmem->memory->memory[offset]), offset);
-#endif
get_page(page);
+
+ DRM_DEBUG("baddr = 0x%lx page = 0x%p, offset = 0x%lx\n",
+ baddr, __va(agpmem->memory->memory[offset]), offset);
+
+#if LINUX_VERSION_CODE < 0x020317
+ return page_address(page);
+#else
return page;
- }
#endif
+ }
+vm_nopage_error:
+#endif /* __REALLY_HAVE_AGP */
+
return NOPAGE_SIGBUS; /* Disallow mremap */
}
+#if LINUX_VERSION_CODE < 0x020317
+unsigned long DRM(vm_shm_nopage)(struct vm_area_struct *vma,
+ unsigned long address,
+ int write_access)
+#else
+ /* Return type changed in 2.3.23 */
struct page *DRM(vm_shm_nopage)(struct vm_area_struct *vma,
unsigned long address,
int write_access)
+#endif
{
+#if LINUX_VERSION_CODE >= 0x020300
drm_map_t *map = (drm_map_t *)vma->vm_private_data;
+#else
+ drm_map_t *map = (drm_map_t *)vma->vm_pte;
+#endif
unsigned long offset;
unsigned long i;
pgd_t *pgd;
diff --git a/linux/r128_cce.c b/linux/r128_cce.c
index 9c0c3538..1ed8900e 100644
--- a/linux/r128_cce.c
+++ b/linux/r128_cce.c
@@ -361,20 +361,11 @@ static void r128_cce_init_ring_buffer( drm_device_t *dev,
tmp_ofs = dev_priv->ring_rptr->offset - dev->sg->handle;
page_ofs = tmp_ofs >> PAGE_SHIFT;
-#if defined(__alpha__)
R128_WRITE( R128_PM4_BUFFER_DL_RPTR_ADDR,
entry->busaddr[page_ofs]);
DRM_DEBUG( "ring rptr: offset=0x%08x handle=0x%08lx\n",
entry->busaddr[page_ofs],
entry->handle + tmp_ofs );
-#else
- R128_WRITE( R128_PM4_BUFFER_DL_RPTR_ADDR,
- page_to_bus(entry->pagelist[page_ofs]));
-
- DRM_DEBUG( "ring rptr: offset=0x%08x handle=0x%08lx\n",
- page_to_bus(entry->pagelist[page_ofs]),
- entry->handle + tmp_ofs );
-#endif
}
#endif
diff --git a/linux/radeon_cp.c b/linux/radeon_cp.c
index 651ce1b9..a46bb439 100644
--- a/linux/radeon_cp.c
+++ b/linux/radeon_cp.c
@@ -553,8 +553,7 @@ static int radeon_do_engine_reset( drm_device_t *dev )
RADEON_SOFT_RESET_RE |
RADEON_SOFT_RESET_PP |
RADEON_SOFT_RESET_E2 |
- RADEON_SOFT_RESET_RB |
- RADEON_SOFT_RESET_HDP ) );
+ RADEON_SOFT_RESET_RB ) );
RADEON_READ( RADEON_RBBM_SOFT_RESET );
RADEON_WRITE( RADEON_RBBM_SOFT_RESET, ( rbbm_soft_reset &
~( RADEON_SOFT_RESET_CP |
@@ -563,8 +562,7 @@ static int radeon_do_engine_reset( drm_device_t *dev )
RADEON_SOFT_RESET_RE |
RADEON_SOFT_RESET_PP |
RADEON_SOFT_RESET_E2 |
- RADEON_SOFT_RESET_RB |
- RADEON_SOFT_RESET_HDP ) ) );
+ RADEON_SOFT_RESET_RB ) ) );
RADEON_READ( RADEON_RBBM_SOFT_RESET );
@@ -635,20 +633,12 @@ static void radeon_cp_init_ring_buffer( drm_device_t *dev,
tmp_ofs = dev_priv->ring_rptr->offset - dev->sg->handle;
page_ofs = tmp_ofs >> PAGE_SHIFT;
-#if defined(__alpha__)
+
RADEON_WRITE( RADEON_CP_RB_RPTR_ADDR,
entry->busaddr[page_ofs]);
DRM_DEBUG( "ring rptr: offset=0x%08x handle=0x%08lx\n",
entry->busaddr[page_ofs],
entry->handle + tmp_ofs );
-#else
- RADEON_WRITE( RADEON_CP_RB_RPTR_ADDR,
- page_to_bus(entry->pagelist[page_ofs]));
-
- DRM_DEBUG( "ring rptr: offset=0x%08x handle=0x%08lx\n",
- page_to_bus(entry->pagelist[page_ofs]),
- entry->handle + tmp_ofs );
-#endif
}
#endif