Sync with Linux 2.4.0-test7/pre4
parent
f75ec3010a
commit
f0f6509a72
|
@ -46,6 +46,7 @@
|
||||||
#include <linux/version.h>
|
#include <linux/version.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/smp_lock.h> /* For (un)lock_kernel */
|
#include <linux/smp_lock.h> /* For (un)lock_kernel */
|
||||||
|
#include <linux/mm.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/mman.h>
|
#include <asm/mman.h>
|
||||||
#include <asm/uaccess.h>
|
#include <asm/uaccess.h>
|
||||||
|
@ -140,7 +141,7 @@ typedef struct wait_queue *wait_queue_head_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* virt_to_page added in 2.4.0-test6 */
|
/* virt_to_page added in 2.4.0-test6 */
|
||||||
#ifndef virt_to_page
|
#if LINUX_VERSION_CODE < 0x020400
|
||||||
#define virt_to_page(kaddr) (mem_map + MAP_NR(kaddr))
|
#define virt_to_page(kaddr) (mem_map + MAP_NR(kaddr))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -309,7 +309,9 @@ drm_agp_head_t *drm_agp_init(void)
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= 0x020400
|
#if LINUX_VERSION_CODE >= 0x020400
|
||||||
case VIA_MVP4: head->chipset = "VIA MVP4"; break;
|
case VIA_MVP4: head->chipset = "VIA MVP4"; break;
|
||||||
case VIA_APOLLO_SUPER: head->chipset = "VIA Apollo Super";
|
case VIA_APOLLO_KX133: head->chipset = "VIA Apollo KX133";
|
||||||
|
break;
|
||||||
|
case VIA_APOLLO_KT133: head->chipset = "VIA Apollo KT133";
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -322,7 +324,7 @@ drm_agp_head_t *drm_agp_init(void)
|
||||||
case ALI_M1541: head->chipset = "ALi M1541"; break;
|
case ALI_M1541: head->chipset = "ALi M1541"; break;
|
||||||
default: head->chipset = "Unknown"; break;
|
default: head->chipset = "Unknown"; break;
|
||||||
}
|
}
|
||||||
DRM_INFO("AGP %d.%d on %s @ 0x%08lx %dMB\n",
|
DRM_INFO("AGP %d.%d on %s @ 0x%08lx %ZuMB\n",
|
||||||
head->agp_info.version.major,
|
head->agp_info.version.major,
|
||||||
head->agp_info.version.minor,
|
head->agp_info.version.minor,
|
||||||
head->chipset,
|
head->chipset,
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
#include <linux/version.h>
|
#include <linux/version.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/smp_lock.h> /* For (un)lock_kernel */
|
#include <linux/smp_lock.h> /* For (un)lock_kernel */
|
||||||
|
#include <linux/mm.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/mman.h>
|
#include <asm/mman.h>
|
||||||
#include <asm/uaccess.h>
|
#include <asm/uaccess.h>
|
||||||
|
@ -140,7 +141,7 @@ typedef struct wait_queue *wait_queue_head_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* virt_to_page added in 2.4.0-test6 */
|
/* virt_to_page added in 2.4.0-test6 */
|
||||||
#ifndef virt_to_page
|
#if LINUX_VERSION_CODE < 0x020400
|
||||||
#define virt_to_page(kaddr) (mem_map + MAP_NR(kaddr))
|
#define virt_to_page(kaddr) (mem_map + MAP_NR(kaddr))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#define __NO_VERSION__
|
#define __NO_VERSION__
|
||||||
#include <linux/config.h>
|
#include <linux/config.h>
|
||||||
#include "drmP.h"
|
#include "drmP.h"
|
||||||
|
#include <linux/wrapper.h>
|
||||||
|
|
||||||
typedef struct drm_mem_stats {
|
typedef struct drm_mem_stats {
|
||||||
const char *name;
|
const char *name;
|
||||||
|
|
|
@ -250,7 +250,7 @@ int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma)
|
||||||
vma->vm_start, vma->vm_end, VM_OFFSET(vma));
|
vma->vm_start, vma->vm_end, VM_OFFSET(vma));
|
||||||
|
|
||||||
/* Length must match exact page count */
|
/* Length must match exact page count */
|
||||||
if ((length >> PAGE_SHIFT) != dma->page_count) {
|
if (!dma || (length >> PAGE_SHIFT) != dma->page_count) {
|
||||||
unlock_kernel();
|
unlock_kernel();
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
@ -323,6 +323,9 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma)
|
||||||
pgprot_val(vma->vm_page_prot) |= _PAGE_PCD;
|
pgprot_val(vma->vm_page_prot) |= _PAGE_PCD;
|
||||||
pgprot_val(vma->vm_page_prot) &= ~_PAGE_PWT;
|
pgprot_val(vma->vm_page_prot) &= ~_PAGE_PWT;
|
||||||
}
|
}
|
||||||
|
#elif defined(__ia64__)
|
||||||
|
if (map->type != _DRM_AGP)
|
||||||
|
vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
|
||||||
#endif
|
#endif
|
||||||
vma->vm_flags |= VM_IO; /* not in core dump */
|
vma->vm_flags |= VM_IO; /* not in core dump */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue