# Created by Michel MENGIS - Team Poseidon # Swiss Federal Institut of Technology # http://poseidon.epfl.ch diff -ruN ./agpgart/agpgart_fe.c ../mydripkg2/agpgart/agpgart_fe.c --- ./agpgart/agpgart_fe.c 2004-12-17 19:10:39.000000000 +0100 +++ ../mydripkg2/agpgart/agpgart_fe.c 2005-03-22 09:46:35.000000000 +0100 @@ -52,10 +52,10 @@ #if defined(REMAP_PAGE_RANGE_5_ARGS) #define RemapPageRange(vma,from,to,size,prot) \ - remap_page_range(vma,from,to,size,prot) + remap_page_range(vma,from,to >> PAGE_SHIFT,size,prot) #else #define RemapPageRange(vma,from,to,size,prot) \ - remap_page_range(from,to,size,prot) + remap_page_range(vma,from,to >> PAGE_SHIFT ,size,prot) #endif #ifndef minor #define minor(x) MINOR(x) diff -ruN ./agpgart/Makefile ../mydripkg2/agpgart/Makefile --- ./agpgart/Makefile 2004-12-17 19:10:39.000000000 +0100 +++ ../mydripkg2/agpgart/Makefile 2005-03-21 15:35:02.000000000 +0100 @@ -12,7 +12,7 @@ obj-$(CONFIG_AGP) += agpgart.o -include $(TOPDIR)/Rules.make +include $(TOPDIR)/Rules.make $(TOPDIR)/epfl agpgart.o: $(agpgart-objs) $(LD) $(LD_RFLAG) -r -o $@ $(agpgart-objs) diff -ruN ./agpgart-2.0/agpgart.mod.c ../mydripkg2/agpgart-2.0/agpgart.mod.c --- ./agpgart-2.0/agpgart.mod.c 1970-01-01 01:00:00.000000000 +0100 +++ ../mydripkg2/agpgart-2.0/agpgart.mod.c 2005-03-22 10:02:07.000000000 +0100 @@ -0,0 +1,21 @@ +#include +#include +#include + +MODULE_INFO(vermagic, VERMAGIC_STRING); + +#undef unix +struct module __this_module +__attribute__((section(".gnu.linkonce.this_module"))) = { + .name = __stringify(KBUILD_MODNAME), + .init = init_module, +#ifdef CONFIG_MODULE_UNLOAD + .exit = cleanup_module, +#endif +}; + +static const char __module_depends[] +__attribute_used__ +__attribute__((section(".modinfo"))) = +"depends="; + diff -ruN ./agpgart-2.0/ati-agp.mod.c ../mydripkg2/agpgart-2.0/ati-agp.mod.c --- ./agpgart-2.0/ati-agp.mod.c 1970-01-01 01:00:00.000000000 +0100 +++ ../mydripkg2/agpgart-2.0/ati-agp.mod.c 2005-03-22 10:02:07.000000000 +0100 @@ -0,0 +1,22 @@ +#include +#include +#include + +MODULE_INFO(vermagic, VERMAGIC_STRING); + +#undef unix +struct module __this_module +__attribute__((section(".gnu.linkonce.this_module"))) = { + .name = __stringify(KBUILD_MODNAME), + .init = init_module, +#ifdef CONFIG_MODULE_UNLOAD + .exit = cleanup_module, +#endif +}; + +static const char __module_depends[] +__attribute_used__ +__attribute__((section(".modinfo"))) = +"depends=agpgart"; + +MODULE_ALIAS("pci:v00001002d*sv*sd*bc06sc00i00*"); diff -ruN ./agpgart-2.0/backend.c ../mydripkg2/agpgart-2.0/backend.c --- ./agpgart-2.0/backend.c 2004-12-17 19:10:39.000000000 +0100 +++ ../mydripkg2/agpgart-2.0/backend.c 2005-03-21 15:56:00.000000000 +0100 @@ -1,31 +1,6 @@ -/* - * AGPGART driver backend routines. - * Copyright (C) 2002-2003 Dave Jones. - * Copyright (C) 1999 Jeff Hartmann. - * Copyright (C) 1999 Precision Insight, Inc. - * Copyright (C) 1999 Xi Graphics, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * JEFF HARTMANN, DAVE JONES, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * TODO: - * - Allocate more than order 0 pages to avoid too much linear map splitting. - */ + + + #include #include #include @@ -38,6 +13,17 @@ #include #include "agp.h" +typedef struct { + void (*free_memory)(struct agp_memory *); + struct agp_memory * (*allocate_memory)(size_t, u32); + int (*bind_memory)(struct agp_memory *, off_t); + int (*unbind_memory)(struct agp_memory *); + void (*enable)(u32); + int (*acquire)(void); + void (*release)(void); + int (*copy_info)(struct agp_kern_info *); +} drm_agp_t; + /* Due to XFree86 brain-damage, we can't go to 1.0 until they * fix some real stupidity. It's only by chance we can bump * past 0.99 at all due to some boolean logic error. */ diff -ruN ./agpgart-2.0/frontend.c ../mydripkg2/agpgart-2.0/frontend.c --- ./agpgart-2.0/frontend.c 2004-12-17 19:10:39.000000000 +0100 +++ ../mydripkg2/agpgart-2.0/frontend.c 2005-03-22 09:43:10.000000000 +0100 @@ -627,8 +627,8 @@ DBG("client vm_ops=%p", kerninfo.vm_ops); if (kerninfo.vm_ops) { vma->vm_ops = kerninfo.vm_ops; - } else if (remap_page_range(vma, vma->vm_start, - (kerninfo.aper_base + offset), + } else if (remap_pfn_range(vma, vma->vm_start, + (kerninfo.aper_base + offset) >> PAGE_SHIFT, size, vma->vm_page_prot)) { goto out_again; } @@ -643,8 +643,8 @@ DBG("controller vm_ops=%p", kerninfo.vm_ops); if (kerninfo.vm_ops) { vma->vm_ops = kerninfo.vm_ops; - } else if (remap_page_range(vma, vma->vm_start, - kerninfo.aper_base, + } else if (remap_pfn_range(vma, vma->vm_start, + kerninfo.aper_base >> PAGE_SHIFT, size, vma->vm_page_prot)) { goto out_again; } diff -ruN ./agpgart-2.0/generic.c ../mydripkg2/agpgart-2.0/generic.c --- ./agpgart-2.0/generic.c 2004-12-17 19:10:39.000000000 +0100 +++ ../mydripkg2/agpgart-2.0/generic.c 2005-03-22 10:01:57.000000000 +0100 @@ -46,6 +46,25 @@ */ EXPORT_SYMBOL_GPL(agp_memory_reserved); +#if defined(CONFIG_X86) +int map_page_into_agp(struct page *page) +{ + int i; + i = change_page_attr(page, 1, PAGE_KERNEL_NOCACHE); + global_flush_tlb(); + return i; +} +EXPORT_SYMBOL_GPL(map_page_into_agp); + +int unmap_page_from_agp(struct page *page) +{ + int i; + i = change_page_attr(page, 1, PAGE_KERNEL); + global_flush_tlb(); + return i; +} +EXPORT_SYMBOL_GPL(unmap_page_from_agp); +#endif /* * Generic routines for handling agp_memory structures - * They use the basic page allocation routines to do the brunt of the work. diff -ruN ./agpgart-2.0/intel-agp.c ../mydripkg2/agpgart-2.0/intel-agp.c --- ./agpgart-2.0/intel-agp.c 2004-12-17 19:10:39.000000000 +0100 +++ ../mydripkg2/agpgart-2.0/intel-agp.c 2005-03-21 15:57:44.000000000 +0100 @@ -1739,17 +1739,15 @@ * doing the i810 host bridge. */ /* save host bridge pci state */ - pci_save_state(pdev, intel_i830_private.pm_state); + pci_save_state(pdev); /* now save integrated graphics pci state, if we have one (i830) */ if (intel_i830_private.i830_dev) - pci_save_state(intel_i830_private.i830_dev, - intel_i830_private.pm_ig_state); + pci_save_state(intel_i830_private.i830_dev); /* now save integrated graphics pci state, if we have one (i810) */ if (intel_i810_private.i810_dev) - pci_save_state(intel_i810_private.i810_dev, - intel_i810_private.pm_ig_state); + pci_save_state(intel_i810_private.i810_dev); return 0; } @@ -1762,17 +1760,15 @@ * doing the i810 host bridge. */ /* restore host bridge pci state */ - pci_restore_state(pdev, intel_i830_private.pm_state); + pci_restore_state(pdev); /* now restore integrated graphics pci state, if we have one (i830) */ if (intel_i830_private.i830_dev) - pci_restore_state(intel_i830_private.i830_dev, - intel_i830_private.pm_ig_state); + pci_restore_state(intel_i830_private.i830_dev); /* now restore integrated graphics pci state, if we have one (i810) */ if (intel_i810_private.i810_dev) - pci_restore_state(intel_i810_private.i810_dev, - intel_i810_private.pm_ig_state); + pci_restore_state(intel_i810_private.i810_dev); if (bridge->driver == &intel_generic_driver) intel_configure(); diff -ruN ./agpgart-2.0/intel-agp.mod.c ../mydripkg2/agpgart-2.0/intel-agp.mod.c --- ./agpgart-2.0/intel-agp.mod.c 1970-01-01 01:00:00.000000000 +0100 +++ ../mydripkg2/agpgart-2.0/intel-agp.mod.c 2005-03-22 10:02:07.000000000 +0100 @@ -0,0 +1,22 @@ +#include +#include +#include + +MODULE_INFO(vermagic, VERMAGIC_STRING); + +#undef unix +struct module __this_module +__attribute__((section(".gnu.linkonce.this_module"))) = { + .name = __stringify(KBUILD_MODNAME), + .init = init_module, +#ifdef CONFIG_MODULE_UNLOAD + .exit = cleanup_module, +#endif +}; + +static const char __module_depends[] +__attribute_used__ +__attribute__((section(".modinfo"))) = +"depends=agpgart"; + +MODULE_ALIAS("pci:v00008086d*sv*sd*bc06sc00i00*"); diff -ruN ./agpgart-2.0/nvidia-agp.mod.c ../mydripkg2/agpgart-2.0/nvidia-agp.mod.c --- ./agpgart-2.0/nvidia-agp.mod.c 1970-01-01 01:00:00.000000000 +0100 +++ ../mydripkg2/agpgart-2.0/nvidia-agp.mod.c 2005-03-22 10:02:07.000000000 +0100 @@ -0,0 +1,22 @@ +#include +#include +#include + +MODULE_INFO(vermagic, VERMAGIC_STRING); + +#undef unix +struct module __this_module +__attribute__((section(".gnu.linkonce.this_module"))) = { + .name = __stringify(KBUILD_MODNAME), + .init = init_module, +#ifdef CONFIG_MODULE_UNLOAD + .exit = cleanup_module, +#endif +}; + +static const char __module_depends[] +__attribute_used__ +__attribute__((section(".modinfo"))) = +"depends=agpgart"; + +MODULE_ALIAS("pci:v000010DEd*sv*sd*bc06sc00i00*"); diff -ruN ./drm/drm_agpsupport.h ../mydripkg2/drm/drm_agpsupport.h --- ./drm/drm_agpsupport.h 2004-12-17 19:10:39.000000000 +0100 +++ ../mydripkg2/drm/drm_agpsupport.h 2005-03-22 09:28:54.000000000 +0100 @@ -31,6 +31,18 @@ * OTHER DEALINGS IN THE SOFTWARE. */ +typedef struct { + void (*free_memory)(struct agp_memory *); + struct agp_memory * (*allocate_memory)(size_t, u32); + int (*bind_memory)(struct agp_memory *, off_t); + int (*unbind_memory)(struct agp_memory *); + void (*enable)(u32); + int (*acquire)(void); + void (*release)(void); + int (*copy_info)(struct agp_kern_info *); +} drm_agp_t; + + #define __NO_VERSION__ #include "drmP.h" #include diff -ruN ./drm/drm_vm.h ../mydripkg2/drm/drm_vm.h --- ./drm/drm_vm.h 2004-12-17 19:10:39.000000000 +0100 +++ ../mydripkg2/drm/drm_vm.h 2005-03-22 09:56:48.000000000 +0100 @@ -620,8 +620,8 @@ vma->vm_end - vma->vm_start, vma->vm_page_prot, 0)) #else - if (remap_page_range(DRM_RPR_ARG(vma) vma->vm_start, - VM_OFFSET(vma) + offset, + if (remap_pfn_range(vma,DRM_RPR_ARG(vma) vma->vm_start, + VM_OFFSET(vma) + offset >> PAGE_SHIFT, vma->vm_end - vma->vm_start, vma->vm_page_prot)) #endif diff -ruN ./drm/i915.mod.c ../mydripkg2/drm/i915.mod.c --- ./drm/i915.mod.c 1970-01-01 01:00:00.000000000 +0100 +++ ../mydripkg2/drm/i915.mod.c 2005-03-22 10:02:09.000000000 +0100 @@ -0,0 +1,21 @@ +#include +#include +#include + +MODULE_INFO(vermagic, VERMAGIC_STRING); + +#undef unix +struct module __this_module +__attribute__((section(".gnu.linkonce.this_module"))) = { + .name = __stringify(KBUILD_MODNAME), + .init = init_module, +#ifdef CONFIG_MODULE_UNLOAD + .exit = cleanup_module, +#endif +}; + +static const char __module_depends[] +__attribute_used__ +__attribute__((section(".modinfo"))) = +"depends="; + diff -ruN ./drm/Makefile ../mydripkg2/drm/Makefile --- ./drm/Makefile 2004-12-17 19:10:39.000000000 +0100 +++ ../mydripkg2/drm/Makefile 2005-03-21 15:37:47.000000000 +0100 @@ -190,7 +190,7 @@ CLEANFILES += $(BOOTHEADERS) $(BOOTCONFIG) -includes:: $(BOOTHEADERS) $(BOOTCONFIG) +includes:: $(BOOTHEADERS) $(BOOTCONFIG) version.h: $(BOOTVERSION_PREFIX)version.h rm -f $@ diff -ruN ./patch ../mydripkg2/patch --- ./patch 2005-03-22 12:57:01.000000000 +0100 +++ ../mydripkg2/patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,359 +0,0 @@ -diff -ruN ./agpgart/agpgart_fe.c ../mydripkg2/agpgart/agpgart_fe.c ---- ./agpgart/agpgart_fe.c 2004-12-17 19:10:39.000000000 +0100 -+++ ../mydripkg2/agpgart/agpgart_fe.c 2005-03-22 09:46:35.000000000 +0100 -@@ -52,10 +52,10 @@ - - #if defined(REMAP_PAGE_RANGE_5_ARGS) - #define RemapPageRange(vma,from,to,size,prot) \ -- remap_page_range(vma,from,to,size,prot) -+ remap_page_range(vma,from,to >> PAGE_SHIFT,size,prot) - #else - #define RemapPageRange(vma,from,to,size,prot) \ -- remap_page_range(from,to,size,prot) -+ remap_page_range(vma,from,to >> PAGE_SHIFT ,size,prot) - #endif - #ifndef minor - #define minor(x) MINOR(x) -diff -ruN ./agpgart/Makefile ../mydripkg2/agpgart/Makefile ---- ./agpgart/Makefile 2004-12-17 19:10:39.000000000 +0100 -+++ ../mydripkg2/agpgart/Makefile 2005-03-21 15:35:02.000000000 +0100 -@@ -12,7 +12,7 @@ - - obj-$(CONFIG_AGP) += agpgart.o - --include $(TOPDIR)/Rules.make -+include $(TOPDIR)/Rules.make $(TOPDIR)/epfl - - agpgart.o: $(agpgart-objs) - $(LD) $(LD_RFLAG) -r -o $@ $(agpgart-objs) -diff -ruN ./agpgart-2.0/agpgart.mod.c ../mydripkg2/agpgart-2.0/agpgart.mod.c ---- ./agpgart-2.0/agpgart.mod.c 1970-01-01 01:00:00.000000000 +0100 -+++ ../mydripkg2/agpgart-2.0/agpgart.mod.c 2005-03-22 10:02:07.000000000 +0100 -@@ -0,0 +1,21 @@ -+#include -+#include -+#include -+ -+MODULE_INFO(vermagic, VERMAGIC_STRING); -+ -+#undef unix -+struct module __this_module -+__attribute__((section(".gnu.linkonce.this_module"))) = { -+ .name = __stringify(KBUILD_MODNAME), -+ .init = init_module, -+#ifdef CONFIG_MODULE_UNLOAD -+ .exit = cleanup_module, -+#endif -+}; -+ -+static const char __module_depends[] -+__attribute_used__ -+__attribute__((section(".modinfo"))) = -+"depends="; -+ -diff -ruN ./agpgart-2.0/ati-agp.mod.c ../mydripkg2/agpgart-2.0/ati-agp.mod.c ---- ./agpgart-2.0/ati-agp.mod.c 1970-01-01 01:00:00.000000000 +0100 -+++ ../mydripkg2/agpgart-2.0/ati-agp.mod.c 2005-03-22 10:02:07.000000000 +0100 -@@ -0,0 +1,22 @@ -+#include -+#include -+#include -+ -+MODULE_INFO(vermagic, VERMAGIC_STRING); -+ -+#undef unix -+struct module __this_module -+__attribute__((section(".gnu.linkonce.this_module"))) = { -+ .name = __stringify(KBUILD_MODNAME), -+ .init = init_module, -+#ifdef CONFIG_MODULE_UNLOAD -+ .exit = cleanup_module, -+#endif -+}; -+ -+static const char __module_depends[] -+__attribute_used__ -+__attribute__((section(".modinfo"))) = -+"depends=agpgart"; -+ -+MODULE_ALIAS("pci:v00001002d*sv*sd*bc06sc00i00*"); -diff -ruN ./agpgart-2.0/backend.c ../mydripkg2/agpgart-2.0/backend.c ---- ./agpgart-2.0/backend.c 2004-12-17 19:10:39.000000000 +0100 -+++ ../mydripkg2/agpgart-2.0/backend.c 2005-03-21 15:56:00.000000000 +0100 -@@ -1,31 +1,6 @@ --/* -- * AGPGART driver backend routines. -- * Copyright (C) 2002-2003 Dave Jones. -- * Copyright (C) 1999 Jeff Hartmann. -- * Copyright (C) 1999 Precision Insight, Inc. -- * Copyright (C) 1999 Xi Graphics, Inc. -- * -- * Permission is hereby granted, free of charge, to any person obtaining a -- * copy of this software and associated documentation files (the "Software"), -- * to deal in the Software without restriction, including without limitation -- * the rights to use, copy, modify, merge, publish, distribute, sublicense, -- * and/or sell copies of the Software, and to permit persons to whom the -- * Software is furnished to do so, subject to the following conditions: -- * -- * The above copyright notice and this permission notice shall be included -- * in all copies or substantial portions of the Software. -- * -- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -- * JEFF HARTMANN, DAVE JONES, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, -- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE -- * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- * -- * TODO: -- * - Allocate more than order 0 pages to avoid too much linear map splitting. -- */ -+ -+ -+ - #include - #include - #include -@@ -38,6 +13,17 @@ - #include - #include "agp.h" - -+typedef struct { -+ void (*free_memory)(struct agp_memory *); -+ struct agp_memory * (*allocate_memory)(size_t, u32); -+ int (*bind_memory)(struct agp_memory *, off_t); -+ int (*unbind_memory)(struct agp_memory *); -+ void (*enable)(u32); -+ int (*acquire)(void); -+ void (*release)(void); -+ int (*copy_info)(struct agp_kern_info *); -+} drm_agp_t; -+ - /* Due to XFree86 brain-damage, we can't go to 1.0 until they - * fix some real stupidity. It's only by chance we can bump - * past 0.99 at all due to some boolean logic error. */ -diff -ruN ./agpgart-2.0/frontend.c ../mydripkg2/agpgart-2.0/frontend.c ---- ./agpgart-2.0/frontend.c 2004-12-17 19:10:39.000000000 +0100 -+++ ../mydripkg2/agpgart-2.0/frontend.c 2005-03-22 09:43:10.000000000 +0100 -@@ -627,8 +627,8 @@ - DBG("client vm_ops=%p", kerninfo.vm_ops); - if (kerninfo.vm_ops) { - vma->vm_ops = kerninfo.vm_ops; -- } else if (remap_page_range(vma, vma->vm_start, -- (kerninfo.aper_base + offset), -+ } else if (remap_pfn_range(vma, vma->vm_start, -+ (kerninfo.aper_base + offset) >> PAGE_SHIFT, - size, vma->vm_page_prot)) { - goto out_again; - } -@@ -643,8 +643,8 @@ - DBG("controller vm_ops=%p", kerninfo.vm_ops); - if (kerninfo.vm_ops) { - vma->vm_ops = kerninfo.vm_ops; -- } else if (remap_page_range(vma, vma->vm_start, -- kerninfo.aper_base, -+ } else if (remap_pfn_range(vma, vma->vm_start, -+ kerninfo.aper_base >> PAGE_SHIFT, - size, vma->vm_page_prot)) { - goto out_again; - } -diff -ruN ./agpgart-2.0/generic.c ../mydripkg2/agpgart-2.0/generic.c ---- ./agpgart-2.0/generic.c 2004-12-17 19:10:39.000000000 +0100 -+++ ../mydripkg2/agpgart-2.0/generic.c 2005-03-22 10:01:57.000000000 +0100 -@@ -46,6 +46,25 @@ - */ - EXPORT_SYMBOL_GPL(agp_memory_reserved); - -+#if defined(CONFIG_X86) -+int map_page_into_agp(struct page *page) -+{ -+ int i; -+ i = change_page_attr(page, 1, PAGE_KERNEL_NOCACHE); -+ global_flush_tlb(); -+ return i; -+} -+EXPORT_SYMBOL_GPL(map_page_into_agp); -+ -+int unmap_page_from_agp(struct page *page) -+{ -+ int i; -+ i = change_page_attr(page, 1, PAGE_KERNEL); -+ global_flush_tlb(); -+ return i; -+} -+EXPORT_SYMBOL_GPL(unmap_page_from_agp); -+#endif - /* - * Generic routines for handling agp_memory structures - - * They use the basic page allocation routines to do the brunt of the work. -diff -ruN ./agpgart-2.0/intel-agp.c ../mydripkg2/agpgart-2.0/intel-agp.c ---- ./agpgart-2.0/intel-agp.c 2004-12-17 19:10:39.000000000 +0100 -+++ ../mydripkg2/agpgart-2.0/intel-agp.c 2005-03-21 15:57:44.000000000 +0100 -@@ -1739,17 +1739,15 @@ - * doing the i810 host bridge. */ - - /* save host bridge pci state */ -- pci_save_state(pdev, intel_i830_private.pm_state); -+ pci_save_state(pdev); - - /* now save integrated graphics pci state, if we have one (i830) */ - if (intel_i830_private.i830_dev) -- pci_save_state(intel_i830_private.i830_dev, -- intel_i830_private.pm_ig_state); -+ pci_save_state(intel_i830_private.i830_dev); - - /* now save integrated graphics pci state, if we have one (i810) */ - if (intel_i810_private.i810_dev) -- pci_save_state(intel_i810_private.i810_dev, -- intel_i810_private.pm_ig_state); -+ pci_save_state(intel_i810_private.i810_dev); - - return 0; - } -@@ -1762,17 +1760,15 @@ - * doing the i810 host bridge. */ - - /* restore host bridge pci state */ -- pci_restore_state(pdev, intel_i830_private.pm_state); -+ pci_restore_state(pdev); - - /* now restore integrated graphics pci state, if we have one (i830) */ - if (intel_i830_private.i830_dev) -- pci_restore_state(intel_i830_private.i830_dev, -- intel_i830_private.pm_ig_state); -+ pci_restore_state(intel_i830_private.i830_dev); - - /* now restore integrated graphics pci state, if we have one (i810) */ - if (intel_i810_private.i810_dev) -- pci_restore_state(intel_i810_private.i810_dev, -- intel_i810_private.pm_ig_state); -+ pci_restore_state(intel_i810_private.i810_dev); - - if (bridge->driver == &intel_generic_driver) - intel_configure(); -diff -ruN ./agpgart-2.0/intel-agp.mod.c ../mydripkg2/agpgart-2.0/intel-agp.mod.c ---- ./agpgart-2.0/intel-agp.mod.c 1970-01-01 01:00:00.000000000 +0100 -+++ ../mydripkg2/agpgart-2.0/intel-agp.mod.c 2005-03-22 10:02:07.000000000 +0100 -@@ -0,0 +1,22 @@ -+#include -+#include -+#include -+ -+MODULE_INFO(vermagic, VERMAGIC_STRING); -+ -+#undef unix -+struct module __this_module -+__attribute__((section(".gnu.linkonce.this_module"))) = { -+ .name = __stringify(KBUILD_MODNAME), -+ .init = init_module, -+#ifdef CONFIG_MODULE_UNLOAD -+ .exit = cleanup_module, -+#endif -+}; -+ -+static const char __module_depends[] -+__attribute_used__ -+__attribute__((section(".modinfo"))) = -+"depends=agpgart"; -+ -+MODULE_ALIAS("pci:v00008086d*sv*sd*bc06sc00i00*"); -diff -ruN ./agpgart-2.0/nvidia-agp.mod.c ../mydripkg2/agpgart-2.0/nvidia-agp.mod.c ---- ./agpgart-2.0/nvidia-agp.mod.c 1970-01-01 01:00:00.000000000 +0100 -+++ ../mydripkg2/agpgart-2.0/nvidia-agp.mod.c 2005-03-22 10:02:07.000000000 +0100 -@@ -0,0 +1,22 @@ -+#include -+#include -+#include -+ -+MODULE_INFO(vermagic, VERMAGIC_STRING); -+ -+#undef unix -+struct module __this_module -+__attribute__((section(".gnu.linkonce.this_module"))) = { -+ .name = __stringify(KBUILD_MODNAME), -+ .init = init_module, -+#ifdef CONFIG_MODULE_UNLOAD -+ .exit = cleanup_module, -+#endif -+}; -+ -+static const char __module_depends[] -+__attribute_used__ -+__attribute__((section(".modinfo"))) = -+"depends=agpgart"; -+ -+MODULE_ALIAS("pci:v000010DEd*sv*sd*bc06sc00i00*"); -diff -ruN ./drm/drm_agpsupport.h ../mydripkg2/drm/drm_agpsupport.h ---- ./drm/drm_agpsupport.h 2004-12-17 19:10:39.000000000 +0100 -+++ ../mydripkg2/drm/drm_agpsupport.h 2005-03-22 09:28:54.000000000 +0100 -@@ -31,6 +31,18 @@ - * OTHER DEALINGS IN THE SOFTWARE. - */ - -+typedef struct { -+ void (*free_memory)(struct agp_memory *); -+ struct agp_memory * (*allocate_memory)(size_t, u32); -+ int (*bind_memory)(struct agp_memory *, off_t); -+ int (*unbind_memory)(struct agp_memory *); -+ void (*enable)(u32); -+ int (*acquire)(void); -+ void (*release)(void); -+ int (*copy_info)(struct agp_kern_info *); -+} drm_agp_t; -+ -+ - #define __NO_VERSION__ - #include "drmP.h" - #include -diff -ruN ./drm/drm_vm.h ../mydripkg2/drm/drm_vm.h ---- ./drm/drm_vm.h 2004-12-17 19:10:39.000000000 +0100 -+++ ../mydripkg2/drm/drm_vm.h 2005-03-22 09:56:48.000000000 +0100 -@@ -620,8 +620,8 @@ - vma->vm_end - vma->vm_start, - vma->vm_page_prot, 0)) - #else -- if (remap_page_range(DRM_RPR_ARG(vma) vma->vm_start, -- VM_OFFSET(vma) + offset, -+ if (remap_pfn_range(vma,DRM_RPR_ARG(vma) vma->vm_start, -+ VM_OFFSET(vma) + offset >> PAGE_SHIFT, - vma->vm_end - vma->vm_start, - vma->vm_page_prot)) - #endif -diff -ruN ./drm/i915.mod.c ../mydripkg2/drm/i915.mod.c ---- ./drm/i915.mod.c 1970-01-01 01:00:00.000000000 +0100 -+++ ../mydripkg2/drm/i915.mod.c 2005-03-22 10:02:09.000000000 +0100 -@@ -0,0 +1,21 @@ -+#include -+#include -+#include -+ -+MODULE_INFO(vermagic, VERMAGIC_STRING); -+ -+#undef unix -+struct module __this_module -+__attribute__((section(".gnu.linkonce.this_module"))) = { -+ .name = __stringify(KBUILD_MODNAME), -+ .init = init_module, -+#ifdef CONFIG_MODULE_UNLOAD -+ .exit = cleanup_module, -+#endif -+}; -+ -+static const char __module_depends[] -+__attribute_used__ -+__attribute__((section(".modinfo"))) = -+"depends="; -+ -diff -ruN ./drm/Makefile ../mydripkg2/drm/Makefile ---- ./drm/Makefile 2004-12-17 19:10:39.000000000 +0100 -+++ ../mydripkg2/drm/Makefile 2005-03-21 15:37:47.000000000 +0100 -@@ -190,7 +190,7 @@ - - CLEANFILES += $(BOOTHEADERS) $(BOOTCONFIG) - --includes:: $(BOOTHEADERS) $(BOOTCONFIG) -+includes:: $(BOOTHEADERS) $(BOOTCONFIG) - - version.h: $(BOOTVERSION_PREFIX)version.h - rm -f $@