linux drm fixes

main
Alan Hourihane 2003-09-12 20:00:59 +00:00
parent 85c16d962d
commit c5168016cc
9 changed files with 18 additions and 11 deletions

View File

@ -31,7 +31,7 @@
* DEALINGS IN THE SOFTWARE. * DEALINGS IN THE SOFTWARE.
*/ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c,v 1.31 2003/02/04 03:01:59 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c,v 1.36 2003/08/24 17:35:35 tsi Exp $ */
#ifdef XFree86Server #ifdef XFree86Server
# include "xf86.h" # include "xf86.h"

View File

@ -26,7 +26,7 @@
* Jens Owen <jens@tungstengraphics.com> * Jens Owen <jens@tungstengraphics.com>
* *
*/ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c,v 1.4 2001/08/27 17:40:59 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmCompat.c,v 1.1 2002/10/30 12:52:33 alanh Exp $ */
#ifdef XFree86Server #ifdef XFree86Server
# include "xf86.h" # include "xf86.h"

View File

@ -4,7 +4,7 @@
# #
# Based on David Woodhouse's mtd build. # Based on David Woodhouse's mtd build.
# #
# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel,v 1.17 2003/04/12 17:18:17 dawes Exp $ # $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel,v 1.18 2003/08/16 17:59:17 dawes Exp $
# #
gamma-objs := gamma_drv.o gamma_dma.o gamma-objs := gamma_drv.o gamma_dma.o

View File

@ -158,7 +158,7 @@ int DRM(ati_pcigart_init)( drm_device_t *dev,
ret = 1; ret = 1;
#if defined(__i386__) || defined(__x86_64__) #if defined(__i386__) || defined(__AMD64__)
asm volatile ( "wbinvd" ::: "memory" ); asm volatile ( "wbinvd" ::: "memory" );
#else #else
mb(); mb();

View File

@ -511,7 +511,7 @@ int DRM(mmap)(struct file *filp, struct vm_area_struct *vma)
if (!capable(CAP_SYS_ADMIN) && (map->flags & _DRM_READ_ONLY)) { if (!capable(CAP_SYS_ADMIN) && (map->flags & _DRM_READ_ONLY)) {
vma->vm_flags &= ~(VM_WRITE | VM_MAYWRITE); vma->vm_flags &= ~(VM_WRITE | VM_MAYWRITE);
#if defined(__i386__) || defined(__x86_64__) #if defined(__i386__) || defined(__AMD64__)
pgprot_val(vma->vm_page_prot) &= ~_PAGE_RW; pgprot_val(vma->vm_page_prot) &= ~_PAGE_RW;
#else #else
/* Ye gads this is ugly. With more thought /* Ye gads this is ugly. With more thought
@ -542,7 +542,7 @@ int DRM(mmap)(struct file *filp, struct vm_area_struct *vma)
case _DRM_FRAME_BUFFER: case _DRM_FRAME_BUFFER:
case _DRM_REGISTERS: case _DRM_REGISTERS:
if (VM_OFFSET(vma) >= __pa(high_memory)) { if (VM_OFFSET(vma) >= __pa(high_memory)) {
#if defined(__i386__) || defined(__x86_64__) #if defined(__i386__) || defined(__AMD64__)
if (boot_cpu_data.x86 > 3 && map->type != _DRM_AGP) { if (boot_cpu_data.x86 > 3 && map->type != _DRM_AGP) {
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;

View File

@ -4,7 +4,7 @@
# #
# Based on David Woodhouse's mtd build. # Based on David Woodhouse's mtd build.
# #
# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel,v 1.17 2003/04/12 17:18:17 dawes Exp $ # $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel,v 1.18 2003/08/16 17:59:17 dawes Exp $
# #
gamma-objs := gamma_drv.o gamma_dma.o gamma-objs := gamma_drv.o gamma_dma.o

View File

@ -11,7 +11,7 @@
# everything required for in-kernel source builds. It is included into # everything required for in-kernel source builds. It is included into
# this file, so none of that should be duplicated here. # this file, so none of that should be duplicated here.
# #
# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.linux,v 1.37 2003/04/23 01:48:57 dawes Exp $ # $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.linux,v 1.40 2003/08/17 17:12:25 dawes Exp $
# #
# #
@ -48,6 +48,7 @@ MODULE_LIST := gamma.o tdfx.o r128.o radeon.o mga.o sis.o
# Modules only for ix86 architectures # Modules only for ix86 architectures
ifneq (,$(findstring 86,$(MACHINE))) ifneq (,$(findstring 86,$(MACHINE)))
ARCHX86 := 1
MODULE_LIST += i830.o i810.o MODULE_LIST += i830.o i810.o
endif endif
@ -258,6 +259,12 @@ $(error Only 2.4.x and later kernels are supported \
($(VERSION).$(PATCHLEVEL).$(SUBLEVEL))) ($(VERSION).$(PATCHLEVEL).$(SUBLEVEL)))
endif endif
ifdef ARCHX86
ifndef CONFIG_X86_CMPXCHG
$(error CONFIG_X86_CMPXCHG needs to be enabled in the kernel)
endif
endif
# This needs to go before all other include paths. # This needs to go before all other include paths.
CC += -I$(DRMSRCDIR) CC += -I$(DRMSRCDIR)

View File

@ -158,7 +158,7 @@ int DRM(ati_pcigart_init)( drm_device_t *dev,
ret = 1; ret = 1;
#if defined(__i386__) || defined(__x86_64__) #if defined(__i386__) || defined(__AMD64__)
asm volatile ( "wbinvd" ::: "memory" ); asm volatile ( "wbinvd" ::: "memory" );
#else #else
mb(); mb();

View File

@ -511,7 +511,7 @@ int DRM(mmap)(struct file *filp, struct vm_area_struct *vma)
if (!capable(CAP_SYS_ADMIN) && (map->flags & _DRM_READ_ONLY)) { if (!capable(CAP_SYS_ADMIN) && (map->flags & _DRM_READ_ONLY)) {
vma->vm_flags &= ~(VM_WRITE | VM_MAYWRITE); vma->vm_flags &= ~(VM_WRITE | VM_MAYWRITE);
#if defined(__i386__) || defined(__x86_64__) #if defined(__i386__) || defined(__AMD64__)
pgprot_val(vma->vm_page_prot) &= ~_PAGE_RW; pgprot_val(vma->vm_page_prot) &= ~_PAGE_RW;
#else #else
/* Ye gads this is ugly. With more thought /* Ye gads this is ugly. With more thought
@ -542,7 +542,7 @@ int DRM(mmap)(struct file *filp, struct vm_area_struct *vma)
case _DRM_FRAME_BUFFER: case _DRM_FRAME_BUFFER:
case _DRM_REGISTERS: case _DRM_REGISTERS:
if (VM_OFFSET(vma) >= __pa(high_memory)) { if (VM_OFFSET(vma) >= __pa(high_memory)) {
#if defined(__i386__) || defined(__x86_64__) #if defined(__i386__) || defined(__AMD64__)
if (boot_cpu_data.x86 > 3 && map->type != _DRM_AGP) { if (boot_cpu_data.x86 > 3 && map->type != _DRM_AGP) {
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;