blob: b616033f16c5f9f350ab39ebcafd11b7b3632e58 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
diff -ur build_mod.orig/firegl_public.c build_mod/firegl_public.c
--- build_mod.orig/firegl_public.c 2004-03-18 07:00:29.000000000 +0900
+++ build_mod/firegl_public.c 2004-05-28 02:10:48.258677968 +0900
@@ -2816,10 +2816,21 @@
#ifdef FGL
struct _agp_memory* __ke_agp_allocate_memory_phys_list(__ke_size_t pages, unsigned long type, unsigned long * phys_addr)
{
-#if 0
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,0)
#ifdef __AGP__
- if (AGP_AVAILABLE(allocate_memory_phys_list))
- return AGP_FUNC(allocate_memory_phys_list)(pages, type, phys_addr);
+ if (AGP_AVAILABLE(allocate_memory)) {
+ int i;
+ struct _agp_memory* newmem = AGP_FUNC(allocate_memory)(pages, type);
+
+ if (newmem) {
+ /* convert/copy the pysical adresses into the "new" agp_memory table */
+ for (i = 0; i < pages; i++) {
+ phys_addr[i] = newmem->memory[i];
+ }
+ }
+
+ return newmem;
+ }
#endif /* __AGP__ */
#endif
if (firegl_agp)
|