diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-11-22 07:26:35 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-11-22 07:53:02 +0000 |
commit | a01737e4b23599082b7eb16cd9f009b0157c2907 (patch) | |
tree | 0ee425986b09459de785950398a579e3c3d419df /meta/recipes-graphics/xorg-driver | |
parent | 8043f458f52f28c414472764a664c31e2a62facf (diff) | |
download | poky-a01737e4b23599082b7eb16cd9f009b0157c2907.tar.gz |
xf86-video-omapfb: drop
This driver has been superceeded by a dri omap driver. This driver
no longer builds against current versions of the xserver. If someone
wants to do the work to resurect it, that is fine but until that happens
there is no point in keeping broken code in the tree which won't even
compile. It can be easily brought back from git history.
(From OE-Core rev: 75858ad8cb19ee24f2c418515cb9d2b649a4de46)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/xorg-driver')
7 files changed, 0 insertions, 616 deletions
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0004-Attempt-to-fix-VRFB.patch b/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0004-Attempt-to-fix-VRFB.patch deleted file mode 100644 index 6b59b9f363..0000000000 --- a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0004-Attempt-to-fix-VRFB.patch +++ /dev/null | |||
@@ -1,325 +0,0 @@ | |||
1 | From 9f034f7a83751e4d1bbff6dd742d54bd96d38230 Mon Sep 17 00:00:00 2001 | ||
2 | From: Eino-Ville Talvala <talvala@stanford.edu> | ||
3 | Date: Tue, 23 Aug 2011 18:37:01 +0200 | ||
4 | Subject: [PATCH] Attempt to fix VRFB | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | http://dominion.thruhere.net/git/cgit.cgi/xf86-video-omapfb/commit/?h=koen/fixups&id=6833fc9f795265e4943d248103fbaf3463b515d6 | ||
9 | |||
10 | Signed-off-by: Sebastian Krzyszkowiak <dos@dosowisko.net> | ||
11 | |||
12 | --- | ||
13 | src/image-format-conversions.c | 4 +- | ||
14 | src/image-format-conversions.h | 2 +- | ||
15 | src/omapfb-driver.c | 28 +++++++++++++-- | ||
16 | src/omapfb-xv-blizzard.c | 1 + | ||
17 | src/omapfb-xv-generic.c | 72 +++++++++++++++++++++++++++++++-------- | ||
18 | src/omapfb-xv.c | 3 ++ | ||
19 | 6 files changed, 88 insertions(+), 22 deletions(-) | ||
20 | |||
21 | diff --git a/src/image-format-conversions.c b/src/image-format-conversions.c | ||
22 | index dcefa9b..d43427d 100644 | ||
23 | --- a/src/image-format-conversions.c | ||
24 | +++ b/src/image-format-conversions.c | ||
25 | @@ -38,13 +38,13 @@ | ||
26 | #include "image-format-conversions.h" | ||
27 | |||
28 | /* Basic line-based copy for packed formats */ | ||
29 | -void packed_line_copy(int w, int h, int stride, uint8_t *src, uint8_t *dest) | ||
30 | +void packed_line_copy(int w, int h, int src_stride, int dst_stride, uint8_t *src, uint8_t *dest) | ||
31 | { | ||
32 | int i; | ||
33 | int len = w * 2; | ||
34 | for (i = 0; i < h; i++) | ||
35 | { | ||
36 | - memcpy(dest + i * len, src + i * stride, len); | ||
37 | + memcpy(dest + i * dst_stride, src + i * src_stride, len); | ||
38 | } | ||
39 | } | ||
40 | |||
41 | diff --git a/src/image-format-conversions.h b/src/image-format-conversions.h | ||
42 | index 584896a..ba7caf2 100644 | ||
43 | --- a/src/image-format-conversions.h | ||
44 | +++ b/src/image-format-conversions.h | ||
45 | @@ -27,7 +27,7 @@ | ||
46 | #include <stdint.h> | ||
47 | |||
48 | /* Basic line-based copy for packed formats */ | ||
49 | -void packed_line_copy(int w, int h, int stride, uint8_t *src, uint8_t *dest); | ||
50 | +void packed_line_copy(int w, int h, int src_stride, int dst_stride, uint8_t *src, uint8_t *dest); | ||
51 | |||
52 | /* Basic C implementation of YV12/I420 to UYVY conversion */ | ||
53 | void uv12_to_uyvy(int w, int h, int y_pitch, int uv_pitch, uint8_t *y_p, uint8_t *u_p, uint8_t *v_p, uint8_t *dest); | ||
54 | diff --git a/src/omapfb-driver.c b/src/omapfb-driver.c | ||
55 | index 48aa09c..07989f5 100644 | ||
56 | --- a/src/omapfb-driver.c | ||
57 | +++ b/src/omapfb-driver.c | ||
58 | @@ -66,6 +66,7 @@ | ||
59 | #define OMAPFB_VERSION 1000 | ||
60 | #define OMAPFB_DRIVER_NAME "OMAPFB" | ||
61 | #define OMAPFB_NAME "omapfb" | ||
62 | +#define ENFORCE_MODES | ||
63 | |||
64 | static Bool OMAPFBProbe(DriverPtr drv, int flags); | ||
65 | static Bool OMAPFBPreInit(ScrnInfoPtr pScrn, int flags); | ||
66 | @@ -105,11 +106,13 @@ static SymTabRec OMAPFBChipsets[] = { | ||
67 | typedef enum { | ||
68 | OPTION_ACCELMETHOD, | ||
69 | OPTION_FB, | ||
70 | + OPTION_ROTATE, | ||
71 | } FBDevOpts; | ||
72 | |||
73 | static const OptionInfoRec OMAPFBOptions[] = { | ||
74 | { OPTION_ACCELMETHOD, "AccelMethod", OPTV_STRING, {0}, FALSE }, | ||
75 | { OPTION_FB, "fb", OPTV_STRING, {0}, FALSE }, | ||
76 | + { OPTION_ROTATE, "rotation", OPTV_STRING, {0}, FALSE }, | ||
77 | { -1, NULL, OPTV_NONE, {0}, FALSE } | ||
78 | }; | ||
79 | |||
80 | @@ -286,6 +289,7 @@ OMAPFBPreInit(ScrnInfoPtr pScrn, int flags) | ||
81 | { | ||
82 | OMAPFBPtr ofb; | ||
83 | EntityInfoPtr pEnt; | ||
84 | + char *rotate; | ||
85 | rgb zeros = { 0, 0, 0 }; | ||
86 | struct stat st; | ||
87 | |||
88 | @@ -379,6 +383,8 @@ OMAPFBPreInit(ScrnInfoPtr pScrn, int flags) | ||
89 | pScrn->progClock = TRUE; | ||
90 | pScrn->chipset = "omapfb"; | ||
91 | |||
92 | + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Rotate test version 0.02\n"); | ||
93 | + | ||
94 | /* Start with configured virtual size */ | ||
95 | pScrn->virtualX = pScrn->display->virtualX; | ||
96 | pScrn->virtualY = pScrn->display->virtualY; | ||
97 | @@ -496,12 +502,21 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) | ||
98 | ofb->CloseScreen = pScreen->CloseScreen; | ||
99 | pScreen->CloseScreen = OMAPFBCloseScreen; | ||
100 | |||
101 | + /* Enforce the default mode (this is silly I guess) */ | ||
102 | +#ifdef ENFORCE_MODES | ||
103 | + //xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Enforcing modes\n"); | ||
104 | + //set_mode(ofb, &ofb->default_mode); | ||
105 | + //pScrn->displayWidth = ofb->fixed_info.line_length / | ||
106 | + // (ofb->state_info.bits_per_pixel>>3); //ofb->state_info.xres; | ||
107 | +#endif | ||
108 | + | ||
109 | /* Map our framebuffer memory */ | ||
110 | + ofb->mem_info.size = ofb->fixed_info.line_length * ofb->state_info.yres; | ||
111 | ofb->fb = mmap (NULL, ofb->mem_info.size, | ||
112 | PROT_READ | PROT_WRITE, MAP_SHARED, | ||
113 | ofb->fd, 0); | ||
114 | - if (ofb->fb == NULL) { | ||
115 | - xf86DrvMsg(scrnIndex, X_ERROR, "Mapping framebuffer memory failed\n"); | ||
116 | + if (ofb->fb == MAP_FAILED) { | ||
117 | + xf86DrvMsg(scrnIndex, X_ERROR, "Mapping framebuffer memory failed, wanted %d bytes.\n", ofb->mem_info.size); | ||
118 | return FALSE; | ||
119 | } | ||
120 | |||
121 | @@ -578,8 +593,13 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) | ||
122 | } else if (!ofb->dss) { | ||
123 | |||
124 | ofb->plane_info.enabled = 1; | ||
125 | - ofb->plane_info.out_width = ofb->state_info.xres; | ||
126 | - ofb->plane_info.out_height = ofb->state_info.yres; | ||
127 | + if (ofb->state_info.rotate == 0 || ofb->state_info.rotate == 2) { | ||
128 | + ofb->plane_info.out_width = ofb->state_info.xres; | ||
129 | + ofb->plane_info.out_height = ofb->state_info.yres; | ||
130 | + } else { | ||
131 | + ofb->plane_info.out_width = ofb->state_info.yres; | ||
132 | + ofb->plane_info.out_height = ofb->state_info.xres; | ||
133 | + } | ||
134 | |||
135 | if (ioctl (ofb->fd, OMAPFB_SETUP_PLANE, &ofb->plane_info)) { | ||
136 | xf86DrvMsg(scrnIndex, X_ERROR, | ||
137 | diff --git a/src/omapfb-xv-blizzard.c b/src/omapfb-xv-blizzard.c | ||
138 | index 406ffc6..b71d2aa 100644 | ||
139 | --- a/src/omapfb-xv-blizzard.c | ||
140 | +++ b/src/omapfb-xv-blizzard.c | ||
141 | @@ -220,6 +220,7 @@ int OMAPFBXVPutImageBlizzard (ScrnInfoPtr pScrn, | ||
142 | packed_line_copy(src_w & ~3, | ||
143 | src_h & ~3, | ||
144 | ((src_w + 1) & ~1) * 2, | ||
145 | + ofb->port->fixed_info.line_length, | ||
146 | (uint8_t*)buf, | ||
147 | (uint8_t*)ofb->port->fb); | ||
148 | break; | ||
149 | diff --git a/src/omapfb-xv-generic.c b/src/omapfb-xv-generic.c | ||
150 | index e6f89fe..b33f344 100644 | ||
151 | --- a/src/omapfb-xv-generic.c | ||
152 | +++ b/src/omapfb-xv-generic.c | ||
153 | @@ -62,7 +62,7 @@ int OMAPXVAllocPlane(ScrnInfoPtr pScrn) | ||
154 | { | ||
155 | OMAPFBPtr ofb = OMAPFB(pScrn); | ||
156 | |||
157 | - /* The memory size is already set in OMAPFBXVQueryImageAttributes */ | ||
158 | + /* The memory size is already set before we get here */ | ||
159 | if (ioctl(ofb->port->fd, OMAPFB_SETUP_MEM, &ofb->port->mem_info) != 0) { | ||
160 | xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | ||
161 | "Failed to allocate video plane memory\n"); | ||
162 | @@ -73,19 +73,20 @@ int OMAPXVAllocPlane(ScrnInfoPtr pScrn) | ||
163 | ofb->port->fb = mmap (NULL, ofb->port->mem_info.size, | ||
164 | PROT_READ | PROT_WRITE, MAP_SHARED, | ||
165 | ofb->port->fd, 0); | ||
166 | - if (ofb->port->fb == NULL) { | ||
167 | + if (ofb->port->fb == MAP_FAILED) { | ||
168 | xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | ||
169 | "Mapping video memory failed\n"); | ||
170 | return XvBadAlloc; | ||
171 | } | ||
172 | |||
173 | /* Update the state info */ | ||
174 | + /* Let's not - it's bad | ||
175 | if (ioctl (ofb->port->fd, FBIOGET_VSCREENINFO, &ofb->port->state_info)) | ||
176 | { | ||
177 | xf86Msg(X_ERROR, "%s: Reading state info failed\n", __FUNCTION__); | ||
178 | return XvBadAlloc; | ||
179 | } | ||
180 | - | ||
181 | + */ | ||
182 | return Success; | ||
183 | } | ||
184 | |||
185 | @@ -93,6 +94,7 @@ int OMAPXVAllocPlane(ScrnInfoPtr pScrn) | ||
186 | int OMAPXVSetupVideoPlane(ScrnInfoPtr pScrn) | ||
187 | { | ||
188 | OMAPFBPtr ofb = OMAPFB(pScrn); | ||
189 | + int ret; | ||
190 | |||
191 | if (ioctl (ofb->port->fd, FBIOPUT_VSCREENINFO, &ofb->port->state_info)) | ||
192 | { | ||
193 | @@ -104,6 +106,31 @@ int OMAPXVSetupVideoPlane(ScrnInfoPtr pScrn) | ||
194 | xf86Msg(X_ERROR, "%s: Reading state info failed\n", __FUNCTION__); | ||
195 | return XvBadAlloc; | ||
196 | } | ||
197 | + /* Changing rotation/nonstd flags can change the fixed info! */ | ||
198 | + if (ioctl (ofb->port->fd, FBIOGET_FSCREENINFO, &ofb->port->fixed_info)) | ||
199 | + { | ||
200 | + xf86Msg(X_ERROR, "%s: Reading state info failed\n", __FUNCTION__); | ||
201 | + return XvBadAlloc; | ||
202 | + } | ||
203 | + /* Correct fixed info requires recalculation of needed memory */ | ||
204 | + ofb->port->mem_info.size = ofb->port->fixed_info.line_length * ofb->port->state_info.yres; | ||
205 | + | ||
206 | + /* Allocate buffer memory */ | ||
207 | + ret = OMAPXVAllocPlane(pScrn); | ||
208 | + if (ret != Success) | ||
209 | + return ret; | ||
210 | + | ||
211 | + /* Workaround for reset of mode after memory allo */ | ||
212 | + if (ioctl (ofb->port->fd, FBIOPUT_VSCREENINFO, &ofb->port->state_info)) | ||
213 | + { | ||
214 | + xf86Msg(X_ERROR, "%s: setting state info failed\n", __FUNCTION__); | ||
215 | + return XvBadAlloc; | ||
216 | + } | ||
217 | + if (ioctl (ofb->port->fd, FBIOGET_VSCREENINFO, &ofb->port->state_info)) | ||
218 | + { | ||
219 | + xf86Msg(X_ERROR, "%s: Reading state info failed\n", __FUNCTION__); | ||
220 | + return XvBadAlloc; | ||
221 | + } | ||
222 | |||
223 | if(ioctl(ofb->port->fd, OMAPFB_SETUP_PLANE, | ||
224 | &ofb->port->plane_info) != 0) { | ||
225 | @@ -124,6 +151,8 @@ int OMAPFBXVPutImageGeneric (ScrnInfoPtr pScrn, | ||
226 | DrawablePtr pDraw) | ||
227 | { | ||
228 | OMAPFBPtr ofb = OMAPFB(pScrn); | ||
229 | + short drw_temp; | ||
230 | + short rot_xres, rot_yres; | ||
231 | |||
232 | if (!ofb->port->plane_info.enabled | ||
233 | || ofb->port->update_window.x != src_x | ||
234 | @@ -163,13 +192,6 @@ int OMAPFBXVPutImageGeneric (ScrnInfoPtr pScrn, | ||
235 | return Success; | ||
236 | } | ||
237 | |||
238 | - /* If we don't have the plane running, enable it */ | ||
239 | - if (!ofb->port->plane_info.enabled) { | ||
240 | - ret = OMAPXVAllocPlane(pScrn); | ||
241 | - if (ret != Success) | ||
242 | - return ret; | ||
243 | - } | ||
244 | - | ||
245 | /* Set up the state info, xres and yres will be used for | ||
246 | * scaling to the values in the plane info struct | ||
247 | */ | ||
248 | @@ -179,12 +201,31 @@ int OMAPFBXVPutImageGeneric (ScrnInfoPtr pScrn, | ||
249 | ofb->port->state_info.yres_virtual = 0; | ||
250 | ofb->port->state_info.xoffset = 0; | ||
251 | ofb->port->state_info.yoffset = 0; | ||
252 | - ofb->port->state_info.rotate = 0; | ||
253 | + //ofb->port->state_info.rotate = 0; | ||
254 | ofb->port->state_info.grayscale = 0; | ||
255 | ofb->port->state_info.activate = FB_ACTIVATE_NOW; | ||
256 | ofb->port->state_info.bits_per_pixel = 0; | ||
257 | ofb->port->state_info.nonstd = xv_to_omapfb_format(image); | ||
258 | |||
259 | + /* Plane info does not rotate with state_info */ | ||
260 | + if (ofb->port->state_info.rotate == 1 || | ||
261 | + ofb->port->state_info.rotate == 3) { | ||
262 | + drw_temp = drw_x; | ||
263 | + drw_x = drw_y; | ||
264 | + drw_y = drw_temp; | ||
265 | + | ||
266 | + drw_temp = drw_w; | ||
267 | + drw_w = drw_h; | ||
268 | + drw_h = drw_temp; | ||
269 | + | ||
270 | + rot_xres = ofb->port->state_info.yres; | ||
271 | + rot_yres = ofb->port->state_info.xres; | ||
272 | + } else { | ||
273 | + rot_xres = ofb->port->state_info.xres; | ||
274 | + rot_yres = ofb->port->state_info.yres; | ||
275 | + } | ||
276 | + | ||
277 | + | ||
278 | /* Set up the video plane info */ | ||
279 | ofb->port->plane_info.enabled = 1; | ||
280 | ofb->port->plane_info.pos_x = drw_x; | ||
281 | @@ -193,13 +234,13 @@ int OMAPFBXVPutImageGeneric (ScrnInfoPtr pScrn, | ||
282 | ofb->port->plane_info.out_height = drw_h & ~15; | ||
283 | |||
284 | /* Cap output to screen size */ | ||
285 | - if (ofb->port->plane_info.out_width > ofb->state_info.xres) { | ||
286 | + if (ofb->port->plane_info.out_width > rot_xres) { | ||
287 | ofb->port->plane_info.pos_x = 0; | ||
288 | - ofb->port->plane_info.out_width = ofb->state_info.xres; | ||
289 | + ofb->port->plane_info.out_width = rot_xres; | ||
290 | } | ||
291 | - if (ofb->port->plane_info.out_height > ofb->state_info.yres) { | ||
292 | + if (ofb->port->plane_info.out_height > rot_yres) { | ||
293 | ofb->port->plane_info.pos_y = 0; | ||
294 | - ofb->port->plane_info.out_height = ofb->state_info.yres; | ||
295 | + ofb->port->plane_info.out_height = rot_yres; | ||
296 | } | ||
297 | |||
298 | ret = OMAPXVSetupVideoPlane(pScrn); | ||
299 | @@ -223,6 +264,7 @@ int OMAPFBXVPutImageGeneric (ScrnInfoPtr pScrn, | ||
300 | packed_line_copy(src_w & ~15, | ||
301 | src_h & ~15, | ||
302 | ((src_w + 1) & ~1) * 2, | ||
303 | + ofb->port->fixed_info.line_length, | ||
304 | (uint8_t*)buf, | ||
305 | (uint8_t*)ofb->port->fb); | ||
306 | break; | ||
307 | diff --git a/src/omapfb-xv.c b/src/omapfb-xv.c | ||
308 | index 1df651e..0fee2c6 100644 | ||
309 | --- a/src/omapfb-xv.c | ||
310 | +++ b/src/omapfb-xv.c | ||
311 | @@ -169,8 +169,11 @@ static int OMAPFBXVQueryImageAttributes (ScrnInfoPtr pScrn, | ||
312 | h = *height; | ||
313 | |||
314 | w = (w + 1) & ~1; | ||
315 | + | ||
316 | + /* Can't calculate these here - don't know line length | ||
317 | ofb->port->mem_info.size = w << 1; | ||
318 | ofb->port->mem_info.size *= h; | ||
319 | + */ | ||
320 | |||
321 | return size; | ||
322 | } | ||
323 | -- | ||
324 | 1.7.5.4 | ||
325 | |||
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/omap-blacklist-tv-out.patch b/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/omap-blacklist-tv-out.patch deleted file mode 100644 index 9b1ee06ece..0000000000 --- a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/omap-blacklist-tv-out.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | commit 05efb061f1945425d214ff6b6050883e6d8633bf | ||
2 | Author: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Wed Jan 26 13:21:12 2011 +0100 | ||
4 | |||
5 | blacklist tv out | ||
6 | |||
7 | The tv-out gets added last and the driver tries to reconfigure dvi to TV resolutions, which fails. so blacklist it | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
12 | |||
13 | diff --git a/src/omapfb-output-dss.c b/src/omapfb-output-dss.c | ||
14 | index 6cc52de..83cb711 100644 | ||
15 | --- a/src/omapfb-output-dss.c | ||
16 | +++ b/src/omapfb-output-dss.c | ||
17 | @@ -205,6 +205,10 @@ OMAPFBDSSOutputDetect (xf86OutputPtr output) | ||
18 | if(ofb->timings[idx][0] == '\0') | ||
19 | return XF86OutputStatusDisconnected; | ||
20 | |||
21 | + // Hack to disable the tv out | ||
22 | + if (strncmp(output->name, "tv", 2) == 0) | ||
23 | + return XF86OutputStatusDisconnected; | ||
24 | + | ||
25 | return XF86OutputStatusConnected; | ||
26 | } | ||
27 | |||
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/omap-force-plain-mode.patch b/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/omap-force-plain-mode.patch deleted file mode 100644 index bb298b0e6d..0000000000 --- a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/omap-force-plain-mode.patch +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | commit d28a36bbadc360a9409bf9832f1d4171d7c33dad | ||
2 | Author: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Wed Jan 26 13:20:20 2011 +0100 | ||
4 | |||
5 | force 'plain' mode | ||
6 | |||
7 | The new DSS mode breaks XV, so force plain mode | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
12 | |||
13 | diff --git a/src/omapfb-driver.c b/src/omapfb-driver.c | ||
14 | index 018e040..48aa09c 100644 | ||
15 | --- a/src/omapfb-driver.c | ||
16 | +++ b/src/omapfb-driver.c | ||
17 | @@ -326,7 +326,7 @@ OMAPFBPreInit(ScrnInfoPtr pScrn, int flags) | ||
18 | OMAPFBProbeController(ofb->ctrl_name); | ||
19 | |||
20 | /* Do we have the DSS kernel API? */ | ||
21 | - if (stat(SYSFS_DSS_DIR, &st) == 0) { | ||
22 | + if (0) { //stat(SYSFS_DSS_DIR, &st) == 0) { | ||
23 | ofb->dss = TRUE; | ||
24 | } else { | ||
25 | ofb->dss = FALSE; | ||
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/omap-revert-set-CRTC-limit.patch b/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/omap-revert-set-CRTC-limit.patch deleted file mode 100644 index 97bf022ab0..0000000000 --- a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/omap-revert-set-CRTC-limit.patch +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | commit 031516123d25a12808ab4e56ea8deda74946cdcd | ||
2 | Author: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Wed Jan 26 12:04:36 2011 +0100 | ||
4 | |||
5 | Revert "Set a large CRTC upper limit to not prune larger resolutions" | ||
6 | |||
7 | Picture is garbled after switching resolutions, so revert it. | ||
8 | |||
9 | Virtual size too big, revert the commit 9c4d7592dcb7dc20a48a6f941d9d94bd73d34153. | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | |||
13 | diff --git a/src/omapfb-crtc.c b/src/omapfb-crtc.c | ||
14 | index 9aaa52f..cbeff35 100644 | ||
15 | --- a/src/omapfb-crtc.c | ||
16 | +++ b/src/omapfb-crtc.c | ||
17 | @@ -190,13 +190,13 @@ OMAPFBCRTCInit(ScrnInfoPtr pScrn) | ||
18 | * In practise, this doesn't seem to be supported. | ||
19 | * (no way to setup the overlay offset/base address) | ||
20 | */ | ||
21 | - /* FIXME: figure out what makes sense here. A known max resolution? | ||
22 | - * framebuffer size? | ||
23 | - */ | ||
24 | xf86CrtcSetSizeRange(pScrn, | ||
25 | - 8, 8, 2048, 2048); | ||
26 | + 8, 8, | ||
27 | + ofb->state_info.xres_virtual, | ||
28 | + ofb->state_info.yres_virtual); | ||
29 | |||
30 | ofb->crtc = xf86CrtcCreate(pScrn, &OMAPFBCrtcFuncs); | ||
31 | + | ||
32 | } | ||
33 | |||
34 | |||
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/omap-revert-set-virtual-size.patch b/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/omap-revert-set-virtual-size.patch deleted file mode 100644 index 8a6eef5cc2..0000000000 --- a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/omap-revert-set-virtual-size.patch +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | commit cbae688d7df59938ccb4af534ec2ff75cbbe9221 | ||
2 | Author: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Wed Jan 26 13:27:20 2011 +0100 | ||
4 | |||
5 | Revert "Set virtual size when configuring framebuffer" | ||
6 | |||
7 | Virtual size too big, so revert it. | ||
8 | |||
9 | This reverts commit 2653ef07883fbd1a5e7025f9300cf89b79ba429a. | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | |||
13 | diff --git a/src/omapfb-crtc.c b/src/omapfb-crtc.c | ||
14 | index cbeff35..9655db2 100644 | ||
15 | --- a/src/omapfb-crtc.c | ||
16 | +++ b/src/omapfb-crtc.c | ||
17 | @@ -98,8 +98,6 @@ OMAPFBCrtcCommitChangeMode (xf86CrtcPtr crtc) | ||
18 | v = ofb->state_info; | ||
19 | v.xres = mode->HDisplay; | ||
20 | v.yres = mode->VDisplay; | ||
21 | - v.xres_virtual = crtc->scrn->virtualX; | ||
22 | - v.yres_virtual = crtc->scrn->virtualY; | ||
23 | v.activate = FB_ACTIVATE_NOW; | ||
24 | v.pixclock = KHZ2PICOS(mode->Clock ? mode->Clock : 56000); | ||
25 | v.left_margin = mode->HTotal - mode->HSyncEnd; | ||
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/omapfb-neon.diff b/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/omapfb-neon.diff deleted file mode 100644 index fb3ac8c594..0000000000 --- a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/omapfb-neon.diff +++ /dev/null | |||
@@ -1,148 +0,0 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | --- /tmp/image-format-conversions.h 2009-02-03 10:18:04.000000000 +0100 | ||
4 | +++ git/src/image-format-conversions.h 2009-02-03 10:19:18.000000000 +0100 | ||
5 | @@ -30,6 +30,8 @@ | ||
6 | /* Basic C implementation of YV12/I420 to UYVY conversion */ | ||
7 | void uv12_to_uyvy(int w, int h, int y_pitch, int uv_pitch, uint8_t *y_p, uint8_t *u_p, uint8_t *v_p, uint8_t *dest); | ||
8 | |||
9 | +/* NEON implementation of YV12/I420 to UYVY conversion */ | ||
10 | +void uv12_to_uyvy_neon(int w, int h, int y_pitch, int uv_pitch, uint8_t *y_p, uint8_t *u_p, uint8_t *v_p, uint8_t *dest); | ||
11 | |||
12 | #endif /* __IMAGE_FORMAT_CONVERSIONS_H__ */ | ||
13 | |||
14 | --- /tmp/image-format-conversions.c 2009-02-03 10:18:04.000000000 +0100 | ||
15 | +++ git/src/image-format-conversions.c 2009-02-03 10:16:47.000000000 +0100 | ||
16 | @@ -2,6 +2,7 @@ | ||
17 | * Copyright 2008 Kalle Vahlman, <zuh@iki.fi> | ||
18 | * Ilpo Ruotsalainen, <lonewolf@iki.fi> | ||
19 | * Tuomas Kulve, <tuomas.kulve@movial.com> | ||
20 | + * Ian Rickards, <ian.rickards@arm.com> | ||
21 | * | ||
22 | * | ||
23 | * Permission to use, copy, modify, distribute and sell this software and its | ||
24 | @@ -89,3 +90,104 @@ | ||
25 | } | ||
26 | } | ||
27 | |||
28 | +void uv12_to_uyvy_neon(int w, int h, int y_pitch, int uv_pitch, uint8_t *y_p, uint8_t *u_p, uint8_t *v_p, uint8_t *dest) | ||
29 | +{ | ||
30 | + int x, y; | ||
31 | + uint8_t *dest_even = dest; | ||
32 | + uint8_t *dest_odd = dest + w * 2; | ||
33 | + uint8_t *y_p_even = y_p; | ||
34 | + uint8_t *y_p_odd = y_p + y_pitch; | ||
35 | + | ||
36 | + /*ErrorF("in uv12_to_uyvy, w: %d, pitch: %d\n", w, pitch);*/ | ||
37 | + if (w<16) | ||
38 | + { | ||
39 | + for (y=0; y<h; y+=2) | ||
40 | + { | ||
41 | + for (x=0; x<w; x+=2) | ||
42 | + { | ||
43 | + /* Output two 2x1 macroblocks to form a 2x2 block from input */ | ||
44 | + uint8_t u_val = *u_p++; | ||
45 | + uint8_t v_val = *v_p++; | ||
46 | + | ||
47 | + /* Even row, first pixel */ | ||
48 | + *dest_even++ = u_val; | ||
49 | + *dest_even++ = *y_p_even++; | ||
50 | + | ||
51 | + /* Even row, second pixel */ | ||
52 | + *dest_even++ = v_val; | ||
53 | + *dest_even++ = *y_p_even++; | ||
54 | + | ||
55 | + /* Odd row, first pixel */ | ||
56 | + *dest_odd++ = u_val; | ||
57 | + *dest_odd++ = *y_p_odd++; | ||
58 | + | ||
59 | + /* Odd row, second pixel */ | ||
60 | + *dest_odd++ = v_val; | ||
61 | + *dest_odd++ = *y_p_odd++; | ||
62 | + } | ||
63 | + | ||
64 | + dest_even += w * 2; | ||
65 | + dest_odd += w * 2; | ||
66 | + | ||
67 | + u_p += ((uv_pitch << 1) - w) >> 1; | ||
68 | + v_p += ((uv_pitch << 1) - w) >> 1; | ||
69 | + | ||
70 | + y_p_even += (y_pitch - w) + y_pitch; | ||
71 | + y_p_odd += (y_pitch - w) + y_pitch; | ||
72 | + } | ||
73 | + } | ||
74 | + else | ||
75 | + { | ||
76 | + for (y=0; y<h; y+=2) | ||
77 | + { | ||
78 | + x=w; | ||
79 | + do { | ||
80 | + // avoid using d8-d15 (q4-q7) aapcs callee-save registers | ||
81 | + asm volatile ( | ||
82 | + "1:\n\t" | ||
83 | + "vld1.u8 {d0}, [%[u_p]]!\n\t" | ||
84 | + "sub %[x],%[x],#16\n\t" | ||
85 | + "cmp %[x],#16\n\t" | ||
86 | + "vld1.u8 {d1}, [%[v_p]]!\n\t" | ||
87 | + "vld1.u8 {q1}, [%[y_p_even]]!\n\t" | ||
88 | + "vzip.u8 d0, d1\n\t" | ||
89 | + "vld1.u8 {q2}, [%[y_p_odd]]!\n\t" | ||
90 | + // use 2-element struct stores to zip up y with y&v | ||
91 | + "vst2.u8 {q0,q1}, [%[dest_even]]!\n\t" | ||
92 | + "vmov.u8 q1, q2\n\t" | ||
93 | + "vst2.u8 {q0,q1}, [%[dest_odd]]!\n\t" | ||
94 | + "bhs 1b\n\t" | ||
95 | + : [u_p] "+r" (u_p), [v_p] "+r" (v_p), [y_p_even] "+r" (y_p_even), [y_p_odd] "+r" (y_p_odd), | ||
96 | + [dest_even] "+r" (dest_even), [dest_odd] "+r" (dest_odd), | ||
97 | + [x] "+r" (x) | ||
98 | + : | ||
99 | + : "cc", "memory", "d0","d1","d2","d3","d4","d5" | ||
100 | + ); | ||
101 | + if (x!=0) | ||
102 | + { | ||
103 | + // overlap final 16-pixel block to process requested width exactly | ||
104 | + x = 16-x; | ||
105 | + u_p -= x/2; | ||
106 | + v_p -= x/2; | ||
107 | + y_p_even -= x; | ||
108 | + y_p_odd -= x; | ||
109 | + dest_even -= x*2; | ||
110 | + dest_odd -= x*2; | ||
111 | + x = 16; | ||
112 | + // do another 16-pixel block | ||
113 | + } | ||
114 | + } | ||
115 | + while (x!=0); | ||
116 | + | ||
117 | + dest_even += w * 2; | ||
118 | + dest_odd += w * 2; | ||
119 | + | ||
120 | + u_p += ((uv_pitch << 1) - w) >> 1; | ||
121 | + v_p += ((uv_pitch << 1) - w) >> 1; | ||
122 | + | ||
123 | + y_p_even += (y_pitch - w) + y_pitch; | ||
124 | + y_p_odd += (y_pitch - w) + y_pitch; | ||
125 | + } | ||
126 | + } | ||
127 | +} | ||
128 | + | ||
129 | --- /tmp/omapfb-xv-generic.c 2009-02-03 10:52:18.000000000 +0100 | ||
130 | +++ git/src/omapfb-xv-generic.c 2009-02-03 10:52:24.000000000 +0100 | ||
131 | @@ -240,7 +240,7 @@ | ||
132 | uint8_t *yb = buf; | ||
133 | uint8_t *ub = yb + (src_y_pitch * src_h); | ||
134 | uint8_t *vb = ub + (src_uv_pitch * (src_h / 2)); | ||
135 | - uv12_to_uyvy(src_w & ~15, | ||
136 | + uv12_to_uyvy_neon(src_w & ~15, | ||
137 | src_h & ~15, | ||
138 | src_y_pitch, | ||
139 | src_uv_pitch, | ||
140 | @@ -256,7 +256,7 @@ | ||
141 | uint8_t *yb = buf; | ||
142 | uint8_t *vb = yb + (src_y_pitch * src_h); | ||
143 | uint8_t *ub = vb + (src_uv_pitch * (src_h / 2)); | ||
144 | - uv12_to_uyvy(src_w & ~15, | ||
145 | + uv12_to_uyvy_neon(src_w & ~15, | ||
146 | src_h & ~15, | ||
147 | src_y_pitch, | ||
148 | src_uv_pitch, | ||
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb_git.bb b/meta/recipes-graphics/xorg-driver/xf86-video-omapfb_git.bb deleted file mode 100644 index f16441e8db..0000000000 --- a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb_git.bb +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | require xorg-driver-video.inc | ||
2 | |||
3 | SUMMARY = "X.Org X server -- Texas Instruments OMAP framebuffer driver" | ||
4 | |||
5 | DESCRIPTION = "omapfb driver supports the basic Texas Instruments OMAP \ | ||
6 | framebuffer." | ||
7 | |||
8 | LICENSE = "MIT-X & GPLv2+" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=63e2cbac53863f60e2f43343fb34367f" | ||
10 | DEPENDS += "virtual/libx11" | ||
11 | |||
12 | SRCREV = "28c006c94e57ea71df11ec4fff79d7ffcfc4860f" | ||
13 | PR = "${INC_PR}.6" | ||
14 | PV = "0.1.1+gitr${SRCPV}" | ||
15 | |||
16 | SRC_URI = "git://git.pingu.fi/xf86-video-omapfb;protocol=http \ | ||
17 | file://omap-revert-set-CRTC-limit.patch \ | ||
18 | file://omap-revert-set-virtual-size.patch \ | ||
19 | file://omap-force-plain-mode.patch \ | ||
20 | file://omap-blacklist-tv-out.patch \ | ||
21 | file://0004-Attempt-to-fix-VRFB.patch \ | ||
22 | " | ||
23 | |||
24 | S = "${WORKDIR}/git" | ||
25 | |||
26 | EXTRA_OECONF_armv7a = " --enable-neon " | ||
27 | CFLAGS += " -I${STAGING_INCDIR}/xorg " | ||
28 | |||
29 | # Use overlay 2 on omap3 to enable other apps to use overlay 1 (e.g. dmai or omapfbplay) | ||
30 | do_compile_prepend_armv7a () { | ||
31 | sed -i -e s:fb1:fb2:g ${S}/src/omapfb-xv.c | ||
32 | } | ||