summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2001-12-10 23:30:17 +0000
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2001-12-10 23:30:17 +0000
commit5d20d2c1d4461a617cabf14a5110de1f1c8023a4 (patch)
tree51ddb34a5836d9988ced8b8d93da67f6ba0e3940
parente2d4ec37f69dcaad5d38d2cddc50f714f082cd43 (diff)
merge linux kernel 2.4.15mesa-4-0-20020211-freeze
-rw-r--r--linux-core/ati_pcigart.c6
-rw-r--r--linux-core/drm_agpsupport.c6
-rw-r--r--linux-core/drm_vm.c19
-rw-r--r--linux/ati_pcigart.h6
-rw-r--r--linux/drm_agpsupport.h6
-rw-r--r--linux/drm_vm.h19
6 files changed, 54 insertions, 8 deletions
diff --git a/linux-core/ati_pcigart.c b/linux-core/ati_pcigart.c
index 8b486c10..5851b72f 100644
--- a/linux-core/ati_pcigart.c
+++ b/linux-core/ati_pcigart.c
@@ -36,7 +36,7 @@
#elif PAGE_SIZE == 4096
# define ATI_PCIGART_TABLE_ORDER 3
# define ATI_PCIGART_TABLE_PAGES (1 << 3)
-#elif
+#else
# error - PAGE_SIZE not 8K or 4K
#endif
@@ -57,7 +57,7 @@ static unsigned long DRM(ati_alloc_pcigart_table)( void )
page = virt_to_page( address );
- for ( i = 0 ; i <= ATI_PCIGART_TABLE_PAGES ; i++, page++ ) {
+ for ( i = 0 ; i < ATI_PCIGART_TABLE_PAGES ; i++, page++ ) {
atomic_inc( &page->count );
SetPageReserved( page );
}
@@ -74,7 +74,7 @@ static void DRM(ati_free_pcigart_table)( unsigned long address )
page = virt_to_page( address );
- for ( i = 0 ; i <= ATI_PCIGART_TABLE_PAGES ; i++, page++ ) {
+ for ( i = 0 ; i < ATI_PCIGART_TABLE_PAGES ; i++, page++ ) {
atomic_dec( &page->count );
ClearPageReserved( page );
}
diff --git a/linux-core/drm_agpsupport.c b/linux-core/drm_agpsupport.c
index 28cc5a26..fc0b29aa 100644
--- a/linux-core/drm_agpsupport.c
+++ b/linux-core/drm_agpsupport.c
@@ -268,7 +268,13 @@ drm_agp_head_t *DRM(agp_init)(void)
case INTEL_I810: head->chipset = "Intel i810"; break;
case INTEL_I815: head->chipset = "Intel i815"; break;
+#if LINUX_VERSION_CODE >= 0x020415
+ case INTEL_I820: head->chipset = "Intel i820"; break;
+#endif
case INTEL_I840: head->chipset = "Intel i840"; break;
+#if LINUX_VERSION_CODE >= 0x020415
+ case INTEL_I845: head->chipset = "Intel i845"; break;
+#endif
case INTEL_I850: head->chipset = "Intel i850"; break;
case VIA_GENERIC: head->chipset = "VIA"; break;
diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c
index ce66f908..5fd3571a 100644
--- a/linux-core/drm_vm.c
+++ b/linux-core/drm_vm.c
@@ -354,7 +354,12 @@ int DRM(mmap_dma)(struct file *filp, struct vm_area_struct *vma)
unlock_kernel();
vma->vm_ops = &DRM(vm_dma_ops);
+
+#if LINUX_VERSION_CODE <= 0x020414
vma->vm_flags |= VM_LOCKED | VM_SHM; /* Don't swap */
+#else
+ vma->vm_flags |= VM_RESERVED; /* Don't swap */
+#endif
vma->vm_file = filp; /* Needed for drm_vm_open() */
DRM(vm_open)(vma);
@@ -473,17 +478,29 @@ int DRM(mmap)(struct file *filp, struct vm_area_struct *vma)
vma->vm_private_data = (void *)map;
/* Don't let this area swap. Change when
DRM_KERNEL advisory is supported. */
+#if LINUX_VERSION_CODE <= 0x020414
vma->vm_flags |= VM_LOCKED;
+#else
+ vma->vm_flags |= VM_RESERVED;
+#endif
break;
case _DRM_SCATTER_GATHER:
vma->vm_ops = &DRM(vm_sg_ops);
vma->vm_private_data = (void *)map;
- vma->vm_flags |= VM_LOCKED;
+#if LINUX_VERSION_CODE <= 0x020414
+ vma->vm_flags |= VM_LOCKED;
+#else
+ vma->vm_flags |= VM_RESERVED;
+#endif
break;
default:
return -EINVAL; /* This should never happen. */
}
+#if LINUX_VERSION_CODE <= 0x020414
vma->vm_flags |= VM_LOCKED | VM_SHM; /* Don't swap */
+#else
+ vma->vm_flags |= VM_RESERVED; /* Don't swap */
+#endif
vma->vm_file = filp; /* Needed for drm_vm_open() */
DRM(vm_open)(vma);
diff --git a/linux/ati_pcigart.h b/linux/ati_pcigart.h
index 8b486c10..5851b72f 100644
--- a/linux/ati_pcigart.h
+++ b/linux/ati_pcigart.h
@@ -36,7 +36,7 @@
#elif PAGE_SIZE == 4096
# define ATI_PCIGART_TABLE_ORDER 3
# define ATI_PCIGART_TABLE_PAGES (1 << 3)
-#elif
+#else
# error - PAGE_SIZE not 8K or 4K
#endif
@@ -57,7 +57,7 @@ static unsigned long DRM(ati_alloc_pcigart_table)( void )
page = virt_to_page( address );
- for ( i = 0 ; i <= ATI_PCIGART_TABLE_PAGES ; i++, page++ ) {
+ for ( i = 0 ; i < ATI_PCIGART_TABLE_PAGES ; i++, page++ ) {
atomic_inc( &page->count );
SetPageReserved( page );
}
@@ -74,7 +74,7 @@ static void DRM(ati_free_pcigart_table)( unsigned long address )
page = virt_to_page( address );
- for ( i = 0 ; i <= ATI_PCIGART_TABLE_PAGES ; i++, page++ ) {
+ for ( i = 0 ; i < ATI_PCIGART_TABLE_PAGES ; i++, page++ ) {
atomic_dec( &page->count );
ClearPageReserved( page );
}
diff --git a/linux/drm_agpsupport.h b/linux/drm_agpsupport.h
index 28cc5a26..fc0b29aa 100644
--- a/linux/drm_agpsupport.h
+++ b/linux/drm_agpsupport.h
@@ -268,7 +268,13 @@ drm_agp_head_t *DRM(agp_init)(void)
case INTEL_I810: head->chipset = "Intel i810"; break;
case INTEL_I815: head->chipset = "Intel i815"; break;
+#if LINUX_VERSION_CODE >= 0x020415
+ case INTEL_I820: head->chipset = "Intel i820"; break;
+#endif
case INTEL_I840: head->chipset = "Intel i840"; break;
+#if LINUX_VERSION_CODE >= 0x020415
+ case INTEL_I845: head->chipset = "Intel i845"; break;
+#endif
case INTEL_I850: head->chipset = "Intel i850"; break;
case VIA_GENERIC: head->chipset = "VIA"; break;
diff --git a/linux/drm_vm.h b/linux/drm_vm.h
index ce66f908..5fd3571a 100644
--- a/linux/drm_vm.h
+++ b/linux/drm_vm.h
@@ -354,7 +354,12 @@ int DRM(mmap_dma)(struct file *filp, struct vm_area_struct *vma)
unlock_kernel();
vma->vm_ops = &DRM(vm_dma_ops);
+
+#if LINUX_VERSION_CODE <= 0x020414
vma->vm_flags |= VM_LOCKED | VM_SHM; /* Don't swap */
+#else
+ vma->vm_flags |= VM_RESERVED; /* Don't swap */
+#endif
vma->vm_file = filp; /* Needed for drm_vm_open() */
DRM(vm_open)(vma);
@@ -473,17 +478,29 @@ int DRM(mmap)(struct file *filp, struct vm_area_struct *vma)
vma->vm_private_data = (void *)map;
/* Don't let this area swap. Change when
DRM_KERNEL advisory is supported. */
+#if LINUX_VERSION_CODE <= 0x020414
vma->vm_flags |= VM_LOCKED;
+#else
+ vma->vm_flags |= VM_RESERVED;
+#endif
break;
case _DRM_SCATTER_GATHER:
vma->vm_ops = &DRM(vm_sg_ops);
vma->vm_private_data = (void *)map;
- vma->vm_flags |= VM_LOCKED;
+#if LINUX_VERSION_CODE <= 0x020414
+ vma->vm_flags |= VM_LOCKED;
+#else
+ vma->vm_flags |= VM_RESERVED;
+#endif
break;
default:
return -EINVAL; /* This should never happen. */
}
+#if LINUX_VERSION_CODE <= 0x020414
vma->vm_flags |= VM_LOCKED | VM_SHM; /* Don't swap */
+#else
+ vma->vm_flags |= VM_RESERVED; /* Don't swap */
+#endif
vma->vm_file = filp; /* Needed for drm_vm_open() */
DRM(vm_open)(vma);