diff options
Diffstat (limited to 'meta-emenlow/recipes/psb-kernel-source/psb-kernel-source-4.42.0/build.patch')
-rw-r--r-- | meta-emenlow/recipes/psb-kernel-source/psb-kernel-source-4.42.0/build.patch | 175 |
1 files changed, 175 insertions, 0 deletions
diff --git a/meta-emenlow/recipes/psb-kernel-source/psb-kernel-source-4.42.0/build.patch b/meta-emenlow/recipes/psb-kernel-source/psb-kernel-source-4.42.0/build.patch new file mode 100644 index 0000000000..ce6f2aa41b --- /dev/null +++ b/meta-emenlow/recipes/psb-kernel-source/psb-kernel-source-4.42.0/build.patch | |||
@@ -0,0 +1,175 @@ | |||
1 | # These are various fixes needed to make the psb kernel driver build against | ||
2 | # 2.6.33.2. | ||
3 | # The Makefile patch is specific to the Poky environment - the external kernel | ||
4 | # module build expects the kernel tree it's building against to have fixdep | ||
5 | # and modpost built, which isn't the case here. So, the modules rule makes | ||
6 | # sure that they are built before the module is built. | ||
7 | # Aside from that, the changes involve adding missing header files and | ||
8 | # compensating for a structure field changing name and type. | ||
9 | |||
10 | Index: psb-kernel-source-4.42.0/drm_os_linux.h | ||
11 | =================================================================== | ||
12 | --- psb-kernel-source-4.42.0.orig/drm_os_linux.h | ||
13 | +++ psb-kernel-source-4.42.0/drm_os_linux.h | ||
14 | @@ -50,12 +50,6 @@ | ||
15 | |||
16 | /** IRQ handler arguments and return type and values */ | ||
17 | #define DRM_IRQ_ARGS int irq, void *arg | ||
18 | -/** backwards compatibility with old irq return values */ | ||
19 | -#ifndef IRQ_HANDLED | ||
20 | -typedef void irqreturn_t; | ||
21 | -#define IRQ_HANDLED /* nothing */ | ||
22 | -#define IRQ_NONE /* nothing */ | ||
23 | -#endif | ||
24 | |||
25 | /** AGP types */ | ||
26 | #if __OS_HAS_AGP | ||
27 | Index: psb-kernel-source-4.42.0/Makefile | ||
28 | =================================================================== | ||
29 | --- psb-kernel-source-4.42.0.orig/Makefile | ||
30 | +++ psb-kernel-source-4.42.0/Makefile | ||
31 | @@ -165,7 +165,10 @@ endif | ||
32 | all: modules | ||
33 | |||
34 | modules: includes | ||
35 | - +make -C $(LINUXDIR) $(GETCONFIG) SUBDIRS=`pwd` DRMSRCDIR=`pwd` modules | ||
36 | + +make -C $(LINUXDIR)/scripts/basic fixdep | ||
37 | +# +make -C $(LINUXDIR) SUBDIRS=scripts/mod modpost | ||
38 | + +make -C $(LINUXDIR) SUBDIRS=scripts | ||
39 | + +make -k -C $(LINUXDIR) $(GETCONFIG) SUBDIRS=`pwd` DRMSRCDIR=`pwd` modules | ||
40 | |||
41 | ifeq ($(HEADERFROMBOOT),1) | ||
42 | |||
43 | @@ -243,7 +246,7 @@ dristat: dristat.c | ||
44 | drmstat: drmstat.c | ||
45 | $(CC) $(PRGCFLAGS) $< -o $@ $(DRMSTATLIBS) | ||
46 | |||
47 | -install: | ||
48 | +modules_install: | ||
49 | make -C $(LINUXDIR) $(GETCONFIG) SUBDIRS=`pwd` DRMSRCDIR=`pwd` modules_install | ||
50 | |||
51 | else | ||
52 | Index: psb-kernel-source-4.42.0/drm_edid.c | ||
53 | =================================================================== | ||
54 | --- psb-kernel-source-4.42.0.orig/drm_edid.c | ||
55 | +++ psb-kernel-source-4.42.0/drm_edid.c | ||
56 | @@ -11,6 +11,7 @@ | ||
57 | #include "drm_edid.h" | ||
58 | |||
59 | #include <acpi/acpi_drivers.h> | ||
60 | +#include <linux/i2c.h> | ||
61 | |||
62 | /* Valid EDID header has these bytes */ | ||
63 | static u8 edid_header[] = { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 }; | ||
64 | @@ -39,7 +40,7 @@ int drm_get_acpi_edid(char *method, char | ||
65 | if (obj && obj->type == ACPI_TYPE_BUFFER) | ||
66 | memcpy(edid, obj->buffer.pointer, obj->buffer.length); | ||
67 | else { | ||
68 | - printk(KERN_ERR PREFIX "Invalid _DDC data\n"); | ||
69 | + printk(KERN_ERR "Invalid _DDC data\n"); | ||
70 | status = -EFAULT; | ||
71 | kfree(obj); | ||
72 | } | ||
73 | Index: psb-kernel-source-4.42.0/drm_ttm.c | ||
74 | =================================================================== | ||
75 | --- psb-kernel-source-4.42.0.orig/drm_ttm.c | ||
76 | +++ psb-kernel-source-4.42.0/drm_ttm.c | ||
77 | @@ -28,6 +28,8 @@ | ||
78 | * Authors: Thomas Hellström <thomas-at-tungstengraphics-dot-com> | ||
79 | */ | ||
80 | |||
81 | +#include "linux/spinlock.h" | ||
82 | +#include "asm/agp.h" | ||
83 | #include "drmP.h" | ||
84 | |||
85 | static void drm_ttm_ipi_handler(void *null) | ||
86 | Index: psb-kernel-source-4.42.0/psb_drv.c | ||
87 | =================================================================== | ||
88 | --- psb-kernel-source-4.42.0.orig/psb_drv.c | ||
89 | +++ psb-kernel-source-4.42.0/psb_drv.c | ||
90 | @@ -34,8 +34,10 @@ | ||
91 | #include <linux/cpu.h> | ||
92 | #include <linux/notifier.h> | ||
93 | #include <linux/fb.h> | ||
94 | +#include "linux/spinlock.h" | ||
95 | +#include "asm/agp.h" | ||
96 | |||
97 | -int drm_psb_debug = 0; | ||
98 | +int drm_psb_debug = 255; | ||
99 | EXPORT_SYMBOL(drm_psb_debug); | ||
100 | static int drm_psb_trap_pagefaults = 0; | ||
101 | static int drm_psb_clock_gating = 0; | ||
102 | Index: psb-kernel-source-4.42.0/intel_lvds.c | ||
103 | =================================================================== | ||
104 | --- psb-kernel-source-4.42.0.orig/intel_lvds.c | ||
105 | +++ psb-kernel-source-4.42.0/intel_lvds.c | ||
106 | @@ -29,6 +29,7 @@ | ||
107 | |||
108 | #include <linux/i2c.h> | ||
109 | #include <linux/backlight.h> | ||
110 | +#include <linux/i2c.h> | ||
111 | #include "drm_crtc.h" | ||
112 | #include "drm_edid.h" | ||
113 | #include "intel_lvds.h" | ||
114 | Index: psb-kernel-source-4.42.0/drm_memory.c | ||
115 | =================================================================== | ||
116 | --- psb-kernel-source-4.42.0.orig/drm_memory.c | ||
117 | +++ psb-kernel-source-4.42.0/drm_memory.c | ||
118 | @@ -264,9 +264,9 @@ static void *agp_remap(unsigned long off | ||
119 | return NULL; | ||
120 | |||
121 | phys_addr_map = | ||
122 | - agpmem->memory->memory + (offset - agpmem->bound) / PAGE_SIZE; | ||
123 | + agpmem->memory->pages + (offset - agpmem->bound) / PAGE_SIZE; | ||
124 | for (i = 0; i < num_pages; ++i) | ||
125 | - page_map[i] = pfn_to_page(phys_addr_map[i] >> PAGE_SHIFT); | ||
126 | + page_map[i] = phys_addr_map[i]; | ||
127 | addr = vmap(page_map, num_pages, VM_IOREMAP, PAGE_AGP); | ||
128 | vfree(page_map); | ||
129 | |||
130 | Index: psb-kernel-source-4.42.0/drm_agpsupport.c | ||
131 | =================================================================== | ||
132 | --- psb-kernel-source-4.42.0.orig/drm_agpsupport.c | ||
133 | +++ psb-kernel-source-4.42.0/drm_agpsupport.c | ||
134 | @@ -524,7 +524,7 @@ static int drm_agp_populate(struct drm_t | ||
135 | DRM_DEBUG("Current page count is %ld\n", (long) mem->page_count); | ||
136 | mem->page_count = 0; | ||
137 | for (cur_page = pages; cur_page < last_page; ++cur_page) | ||
138 | - mem->pages[mem->page_count++] = phys_to_gart(page_to_phys(*cur_page)); | ||
139 | + mem->pages[mem->page_count++] = page_to_phys(*cur_page); | ||
140 | agp_be->mem = mem; | ||
141 | return 0; | ||
142 | } | ||
143 | Index: psb-kernel-source-4.42.0/drm_vm.c | ||
144 | =================================================================== | ||
145 | --- psb-kernel-source-4.42.0.orig/drm_vm.c | ||
146 | +++ psb-kernel-source-4.42.0/drm_vm.c | ||
147 | @@ -145,13 +145,13 @@ static int drm_do_vm_fault(struct vm_are | ||
148 | * Get the page, inc the use count, and return it | ||
149 | */ | ||
150 | offset = (baddr - agpmem->bound) >> PAGE_SHIFT; | ||
151 | - page = virt_to_page(__va(agpmem->memory->memory[offset])); | ||
152 | + page = agpmem->memory->pages[offset]; | ||
153 | get_page(page); | ||
154 | vmf->page = page; | ||
155 | |||
156 | DRM_DEBUG | ||
157 | ("baddr = 0x%lx page = 0x%p, offset = 0x%lx, count=%d\n", | ||
158 | - baddr, __va(agpmem->memory->memory[offset]), offset, | ||
159 | + baddr, agpmem->memory->pages[offset], offset, | ||
160 | page_count(page)); | ||
161 | return 0; | ||
162 | } | ||
163 | Index: psb-kernel-source-4.42.0/psb_drv.h | ||
164 | =================================================================== | ||
165 | --- psb-kernel-source-4.42.0.orig/psb_drv.h | ||
166 | +++ psb-kernel-source-4.42.0/psb_drv.h | ||
167 | @@ -809,7 +809,7 @@ extern int drm_psb_detear; | ||
168 | #define PSB_DEBUG(_flag, _fmt, _arg...) \ | ||
169 | do { \ | ||
170 | if (unlikely((_flag) & drm_psb_debug)) \ | ||
171 | - printk(KERN_DEBUG \ | ||
172 | + printk(KERN_ERR \ | ||
173 | "[psb:0x%02x:%s] " _fmt , _flag, \ | ||
174 | __FUNCTION__ , ##_arg); \ | ||
175 | } while (0) | ||