1 |
maekke 14/08/01 08:56:27 |
2 |
|
3 |
Added: 0004-blacklist-tv-out.patch |
4 |
0002-Revert-Set-virtual-size-when-configuring-framebuffer.patch |
5 |
0001-Revert-Set-a-large-CRTC-upper-limit-to-not-prune-lar.patch |
6 |
0003-force-plain-mode.patch |
7 |
0006-omapfb-port-to-new-xserver-video-API.patch |
8 |
0005-Attempt-to-fix-VRFB.patch |
9 |
Log: |
10 |
version bump by A. Person in bug #515602 |
11 |
|
12 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 072AD062) |
13 |
|
14 |
Revision Changes Path |
15 |
1.1 x11-drivers/xf86-video-omapfb/files/0004-blacklist-tv-out.patch |
16 |
|
17 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/xf86-video-omapfb/files/0004-blacklist-tv-out.patch?rev=1.1&view=markup |
18 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/xf86-video-omapfb/files/0004-blacklist-tv-out.patch?rev=1.1&content-type=text/plain |
19 |
|
20 |
Index: 0004-blacklist-tv-out.patch |
21 |
=================================================================== |
22 |
From cfa46b67f59115f6d8ef9414af60380749ff3eb3 Mon Sep 17 00:00:00 2001 |
23 |
From: Koen Kooi <koen@×××××××××××××××××.net> |
24 |
Date: Wed, 26 Jan 2011 13:21:12 +0100 |
25 |
Subject: [PATCH 4/6] blacklist tv out |
26 |
|
27 |
The tv-out gets added last and the driver tries to reconfigure dvi to TV resolutions, which fails. so blacklist it |
28 |
|
29 |
Upstream-Status: Pending |
30 |
|
31 |
Signed-off-by: Koen Kooi <koen@×××××××××××××××××.net> |
32 |
Signed-off-by: Martin Jansa <Martin.Jansa@×××××.com> |
33 |
--- |
34 |
src/omapfb-output-dss.c | 4 ++++ |
35 |
1 file changed, 4 insertions(+) |
36 |
|
37 |
diff --git a/src/omapfb-output-dss.c b/src/omapfb-output-dss.c |
38 |
index 6cc52de..83cb711 100644 |
39 |
--- a/src/omapfb-output-dss.c |
40 |
+++ b/src/omapfb-output-dss.c |
41 |
@@ -205,6 +205,10 @@ OMAPFBDSSOutputDetect (xf86OutputPtr output) |
42 |
if(ofb->timings[idx][0] == '\0') |
43 |
return XF86OutputStatusDisconnected; |
44 |
|
45 |
+ // Hack to disable the tv out |
46 |
+ if (strncmp(output->name, "tv", 2) == 0) |
47 |
+ return XF86OutputStatusDisconnected; |
48 |
+ |
49 |
return XF86OutputStatusConnected; |
50 |
} |
51 |
|
52 |
-- |
53 |
1.8.0 |
54 |
|
55 |
|
56 |
|
57 |
|
58 |
1.1 x11-drivers/xf86-video-omapfb/files/0002-Revert-Set-virtual-size-when-configuring-framebuffer.patch |
59 |
|
60 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/xf86-video-omapfb/files/0002-Revert-Set-virtual-size-when-configuring-framebuffer.patch?rev=1.1&view=markup |
61 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/xf86-video-omapfb/files/0002-Revert-Set-virtual-size-when-configuring-framebuffer.patch?rev=1.1&content-type=text/plain |
62 |
|
63 |
Index: 0002-Revert-Set-virtual-size-when-configuring-framebuffer.patch |
64 |
=================================================================== |
65 |
From 855c333ac0d16350f895f1d1b9391e9cbb0b6db4 Mon Sep 17 00:00:00 2001 |
66 |
From: Koen Kooi <koen@×××××××××××××××××.net> |
67 |
Date: Wed, 26 Jan 2011 13:27:20 +0100 |
68 |
Subject: [PATCH 2/6] Revert "Set virtual size when configuring framebuffer" |
69 |
|
70 |
Virtual size too big, so revert it. |
71 |
|
72 |
This reverts commit 2653ef07883fbd1a5e7025f9300cf89b79ba429a. |
73 |
|
74 |
Upstream-Status: Pending |
75 |
|
76 |
Signed-off-by: Martin Jansa <Martin.Jansa@×××××.com> |
77 |
--- |
78 |
src/omapfb-crtc.c | 2 -- |
79 |
1 file changed, 2 deletions(-) |
80 |
|
81 |
diff --git a/src/omapfb-crtc.c b/src/omapfb-crtc.c |
82 |
index cbeff35..9655db2 100644 |
83 |
--- a/src/omapfb-crtc.c |
84 |
+++ b/src/omapfb-crtc.c |
85 |
@@ -98,8 +98,6 @@ OMAPFBCrtcCommitChangeMode (xf86CrtcPtr crtc) |
86 |
v = ofb->state_info; |
87 |
v.xres = mode->HDisplay; |
88 |
v.yres = mode->VDisplay; |
89 |
- v.xres_virtual = crtc->scrn->virtualX; |
90 |
- v.yres_virtual = crtc->scrn->virtualY; |
91 |
v.activate = FB_ACTIVATE_NOW; |
92 |
v.pixclock = KHZ2PICOS(mode->Clock ? mode->Clock : 56000); |
93 |
v.left_margin = mode->HTotal - mode->HSyncEnd; |
94 |
-- |
95 |
1.8.0 |
96 |
|
97 |
|
98 |
|
99 |
|
100 |
1.1 x11-drivers/xf86-video-omapfb/files/0001-Revert-Set-a-large-CRTC-upper-limit-to-not-prune-lar.patch |
101 |
|
102 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/xf86-video-omapfb/files/0001-Revert-Set-a-large-CRTC-upper-limit-to-not-prune-lar.patch?rev=1.1&view=markup |
103 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/xf86-video-omapfb/files/0001-Revert-Set-a-large-CRTC-upper-limit-to-not-prune-lar.patch?rev=1.1&content-type=text/plain |
104 |
|
105 |
Index: 0001-Revert-Set-a-large-CRTC-upper-limit-to-not-prune-lar.patch |
106 |
=================================================================== |
107 |
From 8fb7d0f99d4afbb574b30cb4f1e66a8f89d94ad5 Mon Sep 17 00:00:00 2001 |
108 |
From: Koen Kooi <koen@×××××××××××××××××.net> |
109 |
Date: Wed, 26 Jan 2011 12:04:36 +0100 |
110 |
Subject: [PATCH 1/6] Revert "Set a large CRTC upper limit to not prune larger |
111 |
resolutions" |
112 |
|
113 |
Picture is garbled after switching resolutions, so revert it. |
114 |
Virtual size too big, revert the commit 9c4d7592dcb7dc20a48a6f941d9d94bd73d34153. |
115 |
|
116 |
Upstream-Status: Pending |
117 |
|
118 |
Signed-off-by: Martin Jansa <Martin.Jansa@×××××.com> |
119 |
--- |
120 |
src/omapfb-crtc.c | 8 ++++---- |
121 |
1 file changed, 4 insertions(+), 4 deletions(-) |
122 |
|
123 |
diff --git a/src/omapfb-crtc.c b/src/omapfb-crtc.c |
124 |
index 9aaa52f..cbeff35 100644 |
125 |
--- a/src/omapfb-crtc.c |
126 |
+++ b/src/omapfb-crtc.c |
127 |
@@ -190,13 +190,13 @@ OMAPFBCRTCInit(ScrnInfoPtr pScrn) |
128 |
* In practise, this doesn't seem to be supported. |
129 |
* (no way to setup the overlay offset/base address) |
130 |
*/ |
131 |
- /* FIXME: figure out what makes sense here. A known max resolution? |
132 |
- * framebuffer size? |
133 |
- */ |
134 |
xf86CrtcSetSizeRange(pScrn, |
135 |
- 8, 8, 2048, 2048); |
136 |
+ 8, 8, |
137 |
+ ofb->state_info.xres_virtual, |
138 |
+ ofb->state_info.yres_virtual); |
139 |
|
140 |
ofb->crtc = xf86CrtcCreate(pScrn, &OMAPFBCrtcFuncs); |
141 |
+ |
142 |
} |
143 |
|
144 |
|
145 |
-- |
146 |
1.8.0 |
147 |
|
148 |
|
149 |
|
150 |
|
151 |
1.1 x11-drivers/xf86-video-omapfb/files/0003-force-plain-mode.patch |
152 |
|
153 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/xf86-video-omapfb/files/0003-force-plain-mode.patch?rev=1.1&view=markup |
154 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/xf86-video-omapfb/files/0003-force-plain-mode.patch?rev=1.1&content-type=text/plain |
155 |
|
156 |
Index: 0003-force-plain-mode.patch |
157 |
=================================================================== |
158 |
From 252f44c072d3447a32127fc9afe5d0d40f3c510e Mon Sep 17 00:00:00 2001 |
159 |
From: Koen Kooi <koen@×××××××××××××××××.net> |
160 |
Date: Wed, 26 Jan 2011 13:20:20 +0100 |
161 |
Subject: [PATCH 3/6] force 'plain' mode |
162 |
|
163 |
The new DSS mode breaks XV, so force plain mode |
164 |
|
165 |
Upstream-Status: Pending |
166 |
|
167 |
Signed-off-by: Koen Kooi <koen@×××××××××××××××××.net> |
168 |
Signed-off-by: Martin Jansa <Martin.Jansa@×××××.com> |
169 |
--- |
170 |
src/omapfb-driver.c | 2 +- |
171 |
1 file changed, 1 insertion(+), 1 deletion(-) |
172 |
|
173 |
diff --git a/src/omapfb-driver.c b/src/omapfb-driver.c |
174 |
index 018e040..48aa09c 100644 |
175 |
--- a/src/omapfb-driver.c |
176 |
+++ b/src/omapfb-driver.c |
177 |
@@ -326,7 +326,7 @@ OMAPFBPreInit(ScrnInfoPtr pScrn, int flags) |
178 |
OMAPFBProbeController(ofb->ctrl_name); |
179 |
|
180 |
/* Do we have the DSS kernel API? */ |
181 |
- if (stat(SYSFS_DSS_DIR, &st) == 0) { |
182 |
+ if (0) { //stat(SYSFS_DSS_DIR, &st) == 0) { |
183 |
ofb->dss = TRUE; |
184 |
} else { |
185 |
ofb->dss = FALSE; |
186 |
-- |
187 |
1.8.0 |
188 |
|
189 |
|
190 |
|
191 |
|
192 |
1.1 x11-drivers/xf86-video-omapfb/files/0006-omapfb-port-to-new-xserver-video-API.patch |
193 |
|
194 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/xf86-video-omapfb/files/0006-omapfb-port-to-new-xserver-video-API.patch?rev=1.1&view=markup |
195 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/xf86-video-omapfb/files/0006-omapfb-port-to-new-xserver-video-API.patch?rev=1.1&content-type=text/plain |
196 |
|
197 |
Index: 0006-omapfb-port-to-new-xserver-video-API.patch |
198 |
=================================================================== |
199 |
From 803ecf2909949e6152f4a81b6cbb92a4430679ac Mon Sep 17 00:00:00 2001 |
200 |
From: Martin Jansa <Martin.Jansa@×××××.com> |
201 |
Date: Fri, 23 Nov 2012 00:31:06 +0100 |
202 |
Subject: [PATCH 6/6] omapfb: port to new xserver video API |
203 |
|
204 |
Upstream-Status: Pending |
205 |
|
206 |
Signed-off-by: Martin Jansa <Martin.Jansa@×××××.com> |
207 |
--- |
208 |
src/compat-api.h | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++ |
209 |
src/omapfb-driver.c | 41 ++++++++++++----------- |
210 |
2 files changed, 118 insertions(+), 19 deletions(-) |
211 |
create mode 100644 src/compat-api.h |
212 |
|
213 |
diff --git a/src/compat-api.h b/src/compat-api.h |
214 |
new file mode 100644 |
215 |
index 0000000..b1591b1 |
216 |
--- /dev/null |
217 |
+++ b/src/compat-api.h |
218 |
@@ -0,0 +1,96 @@ |
219 |
+/* |
220 |
+ * Copyright 2012 Red Hat, Inc. |
221 |
+ * |
222 |
+ * Permission is hereby granted, free of charge, to any person obtaining a |
223 |
+ * copy of this software and associated documentation files (the "Software"), |
224 |
+ * to deal in the Software without restriction, including without limitation |
225 |
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
226 |
+ * and/or sell copies of the Software, and to permit persons to whom the |
227 |
+ * Software is furnished to do so, subject to the following conditions: |
228 |
+ * |
229 |
+ * The above copyright notice and this permission notice (including the next |
230 |
+ * paragraph) shall be included in all copies or substantial portions of the |
231 |
+ * Software. |
232 |
+ * |
233 |
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
234 |
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
235 |
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
236 |
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
237 |
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
238 |
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
239 |
+ * DEALINGS IN THE SOFTWARE. |
240 |
+ * |
241 |
+ * Author: Dave Airlie <airlied@××××××.com> |
242 |
+ */ |
243 |
+ |
244 |
+/* this file provides API compat between server post 1.13 and pre it, |
245 |
+ it should be reused inside as many drivers as possible */ |
246 |
+#ifndef COMPAT_API_H |
247 |
+#define COMPAT_API_H |
248 |
+ |
249 |
+#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR |
250 |
+#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum] |
251 |
+#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p |
252 |
+#endif |
253 |
+ |
254 |
+#ifndef XF86_HAS_SCRN_CONV |
255 |
+#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum] |
256 |
+#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex] |
257 |
+#endif |
258 |
+ |
259 |
+#ifndef XF86_SCRN_INTERFACE |
260 |
+ |
261 |
+#define SCRN_ARG_TYPE int |
262 |
+#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)] |
263 |
+ |
264 |
+#define SCREEN_ARG_TYPE int |
265 |
+#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)] |
266 |
+ |
267 |
+#define SCREEN_INIT_ARGS_DECL int index, ScreenPtr pScreen, int argc, char **argv |
268 |
+ |
269 |
+#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask |
270 |
+#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask |
271 |
+ |
272 |
+#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen |
273 |
+#define CLOSE_SCREEN_ARGS scrnIndex, pScreen |
274 |
+ |
275 |
+#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags |
276 |
+ |
277 |
+#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags |
278 |
+ |
279 |
+#define FREE_SCREEN_ARGS_DECL int arg, int flags |
280 |
+#define FREE_SCREEN_ARGS(x) (x)->scrnIndex, 0 |
281 |
+ |
282 |
+#define VT_FUNC_ARGS_DECL int arg, int flags |
283 |
+#define VT_FUNC_ARGS(flags) pScrn->scrnIndex, (flags) |
284 |
+ |
285 |
+#define XF86_ENABLEDISABLEFB_ARG(x) ((x)->scrnIndex) |
286 |
+#else |
287 |
+#define SCRN_ARG_TYPE ScrnInfoPtr |
288 |
+#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1) |
289 |
+ |
290 |
+#define SCREEN_ARG_TYPE ScreenPtr |
291 |
+#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1) |
292 |
+ |
293 |
+#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv |
294 |
+ |
295 |
+#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask |
296 |
+#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask |
297 |
+ |
298 |
+#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen |
299 |
+#define CLOSE_SCREEN_ARGS pScreen |
300 |
+ |
301 |
+#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y |
302 |
+#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode |
303 |
+ |
304 |
+#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg |
305 |
+#define FREE_SCREEN_ARGS(x) (x) |
306 |
+ |
307 |
+#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg |
308 |
+#define VT_FUNC_ARGS(flags) pScrn |
309 |
+ |
310 |
+#define XF86_ENABLEDISABLEFB_ARG(x) (x) |
311 |
+ |
312 |
+#endif |
313 |
+ |
314 |
+#endif |
315 |
diff --git a/src/omapfb-driver.c b/src/omapfb-driver.c |
316 |
index 07989f5..486ffa4 100644 |
317 |
--- a/src/omapfb-driver.c |
318 |
+++ b/src/omapfb-driver.c |
319 |
@@ -44,6 +44,8 @@ |
320 |
|
321 |
#include "exa.h" |
322 |
|
323 |
+#include "compat-api.h" |
324 |
+ |
325 |
#ifdef HAVE_XEXTPROTO_71 |
326 |
#include <X11/extensions/dpmsconst.h> |
327 |
#else |
328 |
@@ -70,10 +72,10 @@ |
329 |
|
330 |
static Bool OMAPFBProbe(DriverPtr drv, int flags); |
331 |
static Bool OMAPFBPreInit(ScrnInfoPtr pScrn, int flags); |
332 |
-static Bool OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv); |
333 |
-static Bool OMAPFBEnterVT(int scrnIndex, int flags); |
334 |
-static void OMAPFBLeaveVT(int scrnIndex, int flags); |
335 |
-static Bool OMAPFBSwitchMode(int scrnIndex, DisplayModePtr mode, int flags); |
336 |
+static Bool OMAPFBScreenInit(SCREEN_INIT_ARGS_DECL); |
337 |
+static Bool OMAPFBEnterVT(VT_FUNC_ARGS_DECL); |
338 |
+static void OMAPFBLeaveVT(VT_FUNC_ARGS_DECL); |
339 |
+static Bool OMAPFBSwitchMode(SWITCH_MODE_ARGS_DECL); |
340 |
|
341 |
static Bool |
342 |
OMAPFBEnsureRec(ScrnInfoPtr pScrn) |
343 |
@@ -481,7 +483,7 @@ OMAPFBXvScreenInit(ScreenPtr pScreen) |
344 |
} |
345 |
|
346 |
static Bool |
347 |
-OMAPFBCloseScreen(int scrnIndex, ScreenPtr pScreen) |
348 |
+OMAPFBCloseScreen(CLOSE_SCREEN_ARGS_DECL) |
349 |
{ |
350 |
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; |
351 |
OMAPFBPtr ofb = OMAPFB(pScrn); |
352 |
@@ -490,11 +492,11 @@ OMAPFBCloseScreen(int scrnIndex, ScreenPtr pScreen) |
353 |
|
354 |
pScreen->CloseScreen = ofb->CloseScreen; |
355 |
|
356 |
- return (*pScreen->CloseScreen)(scrnIndex, pScreen); |
357 |
+ return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS); |
358 |
} |
359 |
|
360 |
static Bool |
361 |
-OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) |
362 |
+OMAPFBScreenInit(SCREEN_INIT_ARGS_DECL) |
363 |
{ |
364 |
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; |
365 |
OMAPFBPtr ofb = OMAPFB(pScrn); |
366 |
@@ -516,7 +518,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) |
367 |
PROT_READ | PROT_WRITE, MAP_SHARED, |
368 |
ofb->fd, 0); |
369 |
if (ofb->fb == MAP_FAILED) { |
370 |
- xf86DrvMsg(scrnIndex, X_ERROR, "Mapping framebuffer memory failed, wanted %d bytes.\n", ofb->mem_info.size); |
371 |
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Mapping framebuffer memory failed, wanted %d bytes.\n", ofb->mem_info.size); |
372 |
return FALSE; |
373 |
} |
374 |
|
375 |
@@ -526,7 +528,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) |
376 |
/* Only support TrueColor for now */ |
377 |
if (!miSetVisualTypes(pScrn->depth, TrueColorMask, |
378 |
pScrn->rgbBits, pScrn->defaultVisual)) { |
379 |
- xf86DrvMsg(scrnIndex, X_ERROR, "visual type setup failed" |
380 |
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "visual type setup failed" |
381 |
" for %d bits per pixel [1]\n", |
382 |
pScrn->bitsPerPixel); |
383 |
return FALSE; |
384 |
@@ -534,7 +536,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) |
385 |
|
386 |
/* Set up pixmap depth information */ |
387 |
if (!miSetPixmapDepths()) { |
388 |
- xf86DrvMsg(scrnIndex,X_ERROR,"pixmap depth setup failed\n"); |
389 |
+ xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"pixmap depth setup failed\n"); |
390 |
return FALSE; |
391 |
} |
392 |
|
393 |
@@ -546,7 +548,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) |
394 |
pScrn->virtualY, pScrn->xDpi, |
395 |
pScrn->yDpi, pScrn->displayWidth, |
396 |
pScrn->bitsPerPixel)) { |
397 |
- xf86DrvMsg(scrnIndex, X_ERROR, "fbScreenInit failed\n"); |
398 |
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "fbScreenInit failed\n"); |
399 |
return FALSE; |
400 |
} |
401 |
|
402 |
@@ -567,7 +569,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) |
403 |
|
404 |
/* Initialize XRender fallbacks */ |
405 |
if (!fbPictureInit(pScreen, NULL, 0)) { |
406 |
- xf86DrvMsg(scrnIndex, X_ERROR, "fbPictureInit failed\n"); |
407 |
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "fbPictureInit failed\n"); |
408 |
return FALSE; |
409 |
} |
410 |
|
411 |
@@ -579,7 +581,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) |
412 |
|
413 |
/* Initialize default colormap */ |
414 |
if (!miCreateDefColormap(pScreen)) { |
415 |
- xf86DrvMsg(scrnIndex, X_ERROR, |
416 |
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, |
417 |
"creating default colormap failed\n"); |
418 |
return FALSE; |
419 |
} |
420 |
@@ -589,7 +591,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) |
421 |
/* This is non-fatal since we might be running against older |
422 |
* kernel driver in which case we only do basic 2D stuff... |
423 |
*/ |
424 |
- xf86DrvMsg(scrnIndex, X_ERROR, "Reading plane info failed\n"); |
425 |
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Reading plane info failed\n"); |
426 |
} else if (!ofb->dss) { |
427 |
|
428 |
ofb->plane_info.enabled = 1; |
429 |
@@ -602,7 +604,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) |
430 |
} |
431 |
|
432 |
if (ioctl (ofb->fd, OMAPFB_SETUP_PLANE, &ofb->plane_info)) { |
433 |
- xf86DrvMsg(scrnIndex, X_ERROR, |
434 |
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, |
435 |
"%s: Plane setup failed: %s\n", |
436 |
__FUNCTION__, strerror(errno)); |
437 |
return FALSE; |
438 |
@@ -645,9 +647,10 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) |
439 |
return TRUE; |
440 |
} |
441 |
|
442 |
-static Bool OMAPFBSwitchMode(int scrnIndex, DisplayModePtr mode, int flags) |
443 |
+static Bool OMAPFBSwitchMode(SWITCH_MODE_ARGS_DECL) |
444 |
{ |
445 |
- return xf86SetSingleMode (xf86Screens[scrnIndex], mode, RR_Rotate_0); |
446 |
+ SCRN_INFO_PTR(arg); |
447 |
+ return xf86SetSingleMode (pScrn, mode, RR_Rotate_0); |
448 |
} |
449 |
|
450 |
void |
451 |
@@ -699,14 +702,14 @@ OMAPFBPrintCapabilities(ScrnInfoPtr pScrn, |
452 |
/*** Unimplemented: */ |
453 |
|
454 |
static Bool |
455 |
-OMAPFBEnterVT(int scrnIndex, int flags) |
456 |
+OMAPFBEnterVT(VT_FUNC_ARGS_DECL) |
457 |
{ |
458 |
xf86Msg(X_NOT_IMPLEMENTED, "%s\n", __FUNCTION__); |
459 |
return TRUE; |
460 |
} |
461 |
|
462 |
static void |
463 |
-OMAPFBLeaveVT(int scrnIndex, int flags) |
464 |
+OMAPFBLeaveVT(VT_FUNC_ARGS_DECL) |
465 |
{ |
466 |
xf86Msg(X_NOT_IMPLEMENTED, "%s\n", __FUNCTION__); |
467 |
} |
468 |
-- |
469 |
1.8.0 |
470 |
|
471 |
|
472 |
|
473 |
|
474 |
1.1 x11-drivers/xf86-video-omapfb/files/0005-Attempt-to-fix-VRFB.patch |
475 |
|
476 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/xf86-video-omapfb/files/0005-Attempt-to-fix-VRFB.patch?rev=1.1&view=markup |
477 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/xf86-video-omapfb/files/0005-Attempt-to-fix-VRFB.patch?rev=1.1&content-type=text/plain |
478 |
|
479 |
Index: 0005-Attempt-to-fix-VRFB.patch |
480 |
=================================================================== |
481 |
From 8b1f697a60e35ab82fffdabfaefdb45e9a9df379 Mon Sep 17 00:00:00 2001 |
482 |
From: Eino-Ville Talvala <talvala@××××××××.edu> |
483 |
Date: Tue, 23 Aug 2011 18:37:01 +0200 |
484 |
Subject: [PATCH 5/6] Attempt to fix VRFB |
485 |
|
486 |
Upstream-Status: Pending |
487 |
|
488 |
http://dominion.thruhere.net/git/cgit.cgi/xf86-video-omapfb/commit/?h=koen/fixups&id=6833fc9f795265e4943d248103fbaf3463b515d6 |
489 |
|
490 |
Signed-off-by: Sebastian Krzyszkowiak <dos@×××××××××.net> |
491 |
Signed-off-by: Martin Jansa <Martin.Jansa@×××××.com> |
492 |
--- |
493 |
src/image-format-conversions.c | 4 +-- |
494 |
src/image-format-conversions.h | 2 +- |
495 |
src/omapfb-driver.c | 28 +++++++++++++--- |
496 |
src/omapfb-xv-blizzard.c | 1 + |
497 |
src/omapfb-xv-generic.c | 72 +++++++++++++++++++++++++++++++++--------- |
498 |
src/omapfb-xv.c | 3 ++ |
499 |
6 files changed, 88 insertions(+), 22 deletions(-) |
500 |
|
501 |
diff --git a/src/image-format-conversions.c b/src/image-format-conversions.c |
502 |
index dcefa9b..d43427d 100644 |
503 |
--- a/src/image-format-conversions.c |
504 |
+++ b/src/image-format-conversions.c |
505 |
@@ -38,13 +38,13 @@ |
506 |
#include "image-format-conversions.h" |
507 |
|
508 |
/* Basic line-based copy for packed formats */ |
509 |
-void packed_line_copy(int w, int h, int stride, uint8_t *src, uint8_t *dest) |
510 |
+void packed_line_copy(int w, int h, int src_stride, int dst_stride, uint8_t *src, uint8_t *dest) |
511 |
{ |
512 |
int i; |
513 |
int len = w * 2; |
514 |
for (i = 0; i < h; i++) |
515 |
{ |
516 |
- memcpy(dest + i * len, src + i * stride, len); |
517 |
+ memcpy(dest + i * dst_stride, src + i * src_stride, len); |
518 |
} |
519 |
} |
520 |
|
521 |
diff --git a/src/image-format-conversions.h b/src/image-format-conversions.h |
522 |
index 584896a..ba7caf2 100644 |
523 |
--- a/src/image-format-conversions.h |
524 |
+++ b/src/image-format-conversions.h |
525 |
@@ -27,7 +27,7 @@ |
526 |
#include <stdint.h> |
527 |
|
528 |
/* Basic line-based copy for packed formats */ |
529 |
-void packed_line_copy(int w, int h, int stride, uint8_t *src, uint8_t *dest); |
530 |
+void packed_line_copy(int w, int h, int src_stride, int dst_stride, uint8_t *src, uint8_t *dest); |
531 |
|
532 |
/* Basic C implementation of YV12/I420 to UYVY conversion */ |
533 |
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); |
534 |
diff --git a/src/omapfb-driver.c b/src/omapfb-driver.c |
535 |
index 48aa09c..07989f5 100644 |
536 |
--- a/src/omapfb-driver.c |
537 |
+++ b/src/omapfb-driver.c |
538 |
@@ -66,6 +66,7 @@ |
539 |
#define OMAPFB_VERSION 1000 |
540 |
#define OMAPFB_DRIVER_NAME "OMAPFB" |
541 |
#define OMAPFB_NAME "omapfb" |
542 |
+#define ENFORCE_MODES |
543 |
|
544 |
static Bool OMAPFBProbe(DriverPtr drv, int flags); |
545 |
static Bool OMAPFBPreInit(ScrnInfoPtr pScrn, int flags); |
546 |
@@ -105,11 +106,13 @@ static SymTabRec OMAPFBChipsets[] = { |
547 |
typedef enum { |
548 |
OPTION_ACCELMETHOD, |
549 |
OPTION_FB, |
550 |
+ OPTION_ROTATE, |
551 |
} FBDevOpts; |
552 |
|
553 |
static const OptionInfoRec OMAPFBOptions[] = { |
554 |
{ OPTION_ACCELMETHOD, "AccelMethod", OPTV_STRING, {0}, FALSE }, |
555 |
{ OPTION_FB, "fb", OPTV_STRING, {0}, FALSE }, |
556 |
+ { OPTION_ROTATE, "rotation", OPTV_STRING, {0}, FALSE }, |
557 |
{ -1, NULL, OPTV_NONE, {0}, FALSE } |
558 |
}; |
559 |
|
560 |
@@ -286,6 +289,7 @@ OMAPFBPreInit(ScrnInfoPtr pScrn, int flags) |
561 |
{ |
562 |
OMAPFBPtr ofb; |
563 |
EntityInfoPtr pEnt; |
564 |
+ char *rotate; |
565 |
rgb zeros = { 0, 0, 0 }; |
566 |
struct stat st; |
567 |
|
568 |
@@ -379,6 +383,8 @@ OMAPFBPreInit(ScrnInfoPtr pScrn, int flags) |
569 |
pScrn->progClock = TRUE; |
570 |
pScrn->chipset = "omapfb"; |
571 |
|
572 |
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Rotate test version 0.02\n"); |
573 |
+ |
574 |
/* Start with configured virtual size */ |
575 |
pScrn->virtualX = pScrn->display->virtualX; |
576 |
pScrn->virtualY = pScrn->display->virtualY; |
577 |
@@ -496,12 +502,21 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) |
578 |
ofb->CloseScreen = pScreen->CloseScreen; |
579 |
pScreen->CloseScreen = OMAPFBCloseScreen; |
580 |
|
581 |
+ /* Enforce the default mode (this is silly I guess) */ |
582 |
+#ifdef ENFORCE_MODES |
583 |
+ //xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Enforcing modes\n"); |
584 |
+ //set_mode(ofb, &ofb->default_mode); |
585 |
+ //pScrn->displayWidth = ofb->fixed_info.line_length / |
586 |
+ // (ofb->state_info.bits_per_pixel>>3); //ofb->state_info.xres; |
587 |
+#endif |
588 |
+ |
589 |
/* Map our framebuffer memory */ |
590 |
+ ofb->mem_info.size = ofb->fixed_info.line_length * ofb->state_info.yres; |
591 |
ofb->fb = mmap (NULL, ofb->mem_info.size, |
592 |
PROT_READ | PROT_WRITE, MAP_SHARED, |
593 |
ofb->fd, 0); |
594 |
- if (ofb->fb == NULL) { |
595 |
- xf86DrvMsg(scrnIndex, X_ERROR, "Mapping framebuffer memory failed\n"); |
596 |
+ if (ofb->fb == MAP_FAILED) { |
597 |
+ xf86DrvMsg(scrnIndex, X_ERROR, "Mapping framebuffer memory failed, wanted %d bytes.\n", ofb->mem_info.size); |
598 |
return FALSE; |
599 |
} |
600 |
|
601 |
@@ -578,8 +593,13 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) |
602 |
} else if (!ofb->dss) { |
603 |
|
604 |
ofb->plane_info.enabled = 1; |
605 |
- ofb->plane_info.out_width = ofb->state_info.xres; |
606 |
- ofb->plane_info.out_height = ofb->state_info.yres; |
607 |
+ if (ofb->state_info.rotate == 0 || ofb->state_info.rotate == 2) { |
608 |
+ ofb->plane_info.out_width = ofb->state_info.xres; |
609 |
+ ofb->plane_info.out_height = ofb->state_info.yres; |
610 |
+ } else { |
611 |
+ ofb->plane_info.out_width = ofb->state_info.yres; |
612 |
+ ofb->plane_info.out_height = ofb->state_info.xres; |
613 |
+ } |
614 |
|
615 |
if (ioctl (ofb->fd, OMAPFB_SETUP_PLANE, &ofb->plane_info)) { |
616 |
xf86DrvMsg(scrnIndex, X_ERROR, |
617 |
diff --git a/src/omapfb-xv-blizzard.c b/src/omapfb-xv-blizzard.c |
618 |
index 406ffc6..b71d2aa 100644 |
619 |
--- a/src/omapfb-xv-blizzard.c |
620 |
+++ b/src/omapfb-xv-blizzard.c |
621 |
@@ -220,6 +220,7 @@ int OMAPFBXVPutImageBlizzard (ScrnInfoPtr pScrn, |
622 |
packed_line_copy(src_w & ~3, |
623 |
src_h & ~3, |
624 |
((src_w + 1) & ~1) * 2, |
625 |
+ ofb->port->fixed_info.line_length, |
626 |
(uint8_t*)buf, |
627 |
(uint8_t*)ofb->port->fb); |
628 |
break; |
629 |
diff --git a/src/omapfb-xv-generic.c b/src/omapfb-xv-generic.c |
630 |
index e6f89fe..b33f344 100644 |
631 |
--- a/src/omapfb-xv-generic.c |
632 |
+++ b/src/omapfb-xv-generic.c |
633 |
@@ -62,7 +62,7 @@ int OMAPXVAllocPlane(ScrnInfoPtr pScrn) |
634 |
{ |
635 |
OMAPFBPtr ofb = OMAPFB(pScrn); |
636 |
|
637 |
- /* The memory size is already set in OMAPFBXVQueryImageAttributes */ |
638 |
+ /* The memory size is already set before we get here */ |
639 |
if (ioctl(ofb->port->fd, OMAPFB_SETUP_MEM, &ofb->port->mem_info) != 0) { |
640 |
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, |
641 |
"Failed to allocate video plane memory\n"); |
642 |
@@ -73,19 +73,20 @@ int OMAPXVAllocPlane(ScrnInfoPtr pScrn) |
643 |
ofb->port->fb = mmap (NULL, ofb->port->mem_info.size, |
644 |
PROT_READ | PROT_WRITE, MAP_SHARED, |
645 |
ofb->port->fd, 0); |
646 |
- if (ofb->port->fb == NULL) { |
647 |
+ if (ofb->port->fb == MAP_FAILED) { |
648 |
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, |
649 |
"Mapping video memory failed\n"); |
650 |
return XvBadAlloc; |
651 |
} |
652 |
|
653 |
/* Update the state info */ |
654 |
+ /* Let's not - it's bad |
655 |
if (ioctl (ofb->port->fd, FBIOGET_VSCREENINFO, &ofb->port->state_info)) |
656 |
{ |
657 |
xf86Msg(X_ERROR, "%s: Reading state info failed\n", __FUNCTION__); |
658 |
return XvBadAlloc; |
659 |
} |
660 |
- |
661 |
+ */ |
662 |
return Success; |
663 |
} |
664 |
|
665 |
@@ -93,6 +94,7 @@ int OMAPXVAllocPlane(ScrnInfoPtr pScrn) |
666 |
int OMAPXVSetupVideoPlane(ScrnInfoPtr pScrn) |
667 |
{ |
668 |
OMAPFBPtr ofb = OMAPFB(pScrn); |
669 |
+ int ret; |
670 |
|
671 |
if (ioctl (ofb->port->fd, FBIOPUT_VSCREENINFO, &ofb->port->state_info)) |
672 |
{ |
673 |
@@ -104,6 +106,31 @@ int OMAPXVSetupVideoPlane(ScrnInfoPtr pScrn) |
674 |
xf86Msg(X_ERROR, "%s: Reading state info failed\n", __FUNCTION__); |
675 |
return XvBadAlloc; |
676 |
} |
677 |
+ /* Changing rotation/nonstd flags can change the fixed info! */ |
678 |
+ if (ioctl (ofb->port->fd, FBIOGET_FSCREENINFO, &ofb->port->fixed_info)) |
679 |
+ { |
680 |
+ xf86Msg(X_ERROR, "%s: Reading state info failed\n", __FUNCTION__); |
681 |
+ return XvBadAlloc; |
682 |
+ } |
683 |
+ /* Correct fixed info requires recalculation of needed memory */ |
684 |
+ ofb->port->mem_info.size = ofb->port->fixed_info.line_length * ofb->port->state_info.yres; |
685 |
+ |
686 |
+ /* Allocate buffer memory */ |
687 |
+ ret = OMAPXVAllocPlane(pScrn); |
688 |
+ if (ret != Success) |
689 |
+ return ret; |
690 |
+ |
691 |
+ /* Workaround for reset of mode after memory allo */ |
692 |
+ if (ioctl (ofb->port->fd, FBIOPUT_VSCREENINFO, &ofb->port->state_info)) |
693 |
+ { |
694 |
+ xf86Msg(X_ERROR, "%s: setting state info failed\n", __FUNCTION__); |
695 |
+ return XvBadAlloc; |
696 |
+ } |
697 |
+ if (ioctl (ofb->port->fd, FBIOGET_VSCREENINFO, &ofb->port->state_info)) |
698 |
+ { |
699 |
+ xf86Msg(X_ERROR, "%s: Reading state info failed\n", __FUNCTION__); |
700 |
+ return XvBadAlloc; |
701 |
+ } |
702 |
|
703 |
if(ioctl(ofb->port->fd, OMAPFB_SETUP_PLANE, |
704 |
&ofb->port->plane_info) != 0) { |
705 |
@@ -124,6 +151,8 @@ int OMAPFBXVPutImageGeneric (ScrnInfoPtr pScrn, |
706 |
DrawablePtr pDraw) |
707 |
{ |
708 |
OMAPFBPtr ofb = OMAPFB(pScrn); |
709 |
+ short drw_temp; |
710 |
+ short rot_xres, rot_yres; |
711 |
|
712 |
if (!ofb->port->plane_info.enabled |
713 |
|| ofb->port->update_window.x != src_x |
714 |
@@ -163,13 +192,6 @@ int OMAPFBXVPutImageGeneric (ScrnInfoPtr pScrn, |
715 |
return Success; |
716 |
} |
717 |
|
718 |
- /* If we don't have the plane running, enable it */ |
719 |
- if (!ofb->port->plane_info.enabled) { |
720 |
- ret = OMAPXVAllocPlane(pScrn); |
721 |
- if (ret != Success) |
722 |
- return ret; |
723 |
- } |
724 |
- |
725 |
/* Set up the state info, xres and yres will be used for |
726 |
* scaling to the values in the plane info struct |
727 |
*/ |
728 |
@@ -179,12 +201,31 @@ int OMAPFBXVPutImageGeneric (ScrnInfoPtr pScrn, |
729 |
ofb->port->state_info.yres_virtual = 0; |
730 |
ofb->port->state_info.xoffset = 0; |
731 |
ofb->port->state_info.yoffset = 0; |
732 |
- ofb->port->state_info.rotate = 0; |
733 |
+ //ofb->port->state_info.rotate = 0; |
734 |
ofb->port->state_info.grayscale = 0; |
735 |
ofb->port->state_info.activate = FB_ACTIVATE_NOW; |
736 |
ofb->port->state_info.bits_per_pixel = 0; |
737 |
ofb->port->state_info.nonstd = xv_to_omapfb_format(image); |
738 |
|
739 |
+ /* Plane info does not rotate with state_info */ |
740 |
+ if (ofb->port->state_info.rotate == 1 || |
741 |
+ ofb->port->state_info.rotate == 3) { |
742 |
+ drw_temp = drw_x; |
743 |
+ drw_x = drw_y; |
744 |
+ drw_y = drw_temp; |
745 |
+ |
746 |
+ drw_temp = drw_w; |
747 |
+ drw_w = drw_h; |
748 |
+ drw_h = drw_temp; |
749 |
+ |
750 |
+ rot_xres = ofb->port->state_info.yres; |
751 |
+ rot_yres = ofb->port->state_info.xres; |
752 |
+ } else { |
753 |
+ rot_xres = ofb->port->state_info.xres; |
754 |
+ rot_yres = ofb->port->state_info.yres; |
755 |
+ } |
756 |
+ |
757 |
+ |
758 |
/* Set up the video plane info */ |
759 |
ofb->port->plane_info.enabled = 1; |
760 |
ofb->port->plane_info.pos_x = drw_x; |
761 |
@@ -193,13 +234,13 @@ int OMAPFBXVPutImageGeneric (ScrnInfoPtr pScrn, |
762 |
ofb->port->plane_info.out_height = drw_h & ~15; |
763 |
|
764 |
/* Cap output to screen size */ |
765 |
- if (ofb->port->plane_info.out_width > ofb->state_info.xres) { |
766 |
+ if (ofb->port->plane_info.out_width > rot_xres) { |
767 |
ofb->port->plane_info.pos_x = 0; |
768 |
- ofb->port->plane_info.out_width = ofb->state_info.xres; |
769 |
+ ofb->port->plane_info.out_width = rot_xres; |
770 |
} |
771 |
- if (ofb->port->plane_info.out_height > ofb->state_info.yres) { |
772 |
+ if (ofb->port->plane_info.out_height > rot_yres) { |
773 |
ofb->port->plane_info.pos_y = 0; |
774 |
- ofb->port->plane_info.out_height = ofb->state_info.yres; |
775 |
+ ofb->port->plane_info.out_height = rot_yres; |
776 |
} |
777 |
|
778 |
ret = OMAPXVSetupVideoPlane(pScrn); |
779 |
@@ -223,6 +264,7 @@ int OMAPFBXVPutImageGeneric (ScrnInfoPtr pScrn, |
780 |
packed_line_copy(src_w & ~15, |
781 |
src_h & ~15, |
782 |
((src_w + 1) & ~1) * 2, |
783 |
+ ofb->port->fixed_info.line_length, |
784 |
(uint8_t*)buf, |
785 |
(uint8_t*)ofb->port->fb); |
786 |
break; |
787 |
diff --git a/src/omapfb-xv.c b/src/omapfb-xv.c |
788 |
index 1df651e..0fee2c6 100644 |
789 |
--- a/src/omapfb-xv.c |
790 |
+++ b/src/omapfb-xv.c |
791 |
@@ -169,8 +169,11 @@ static int OMAPFBXVQueryImageAttributes (ScrnInfoPtr pScrn, |
792 |
h = *height; |
793 |
|
794 |
w = (w + 1) & ~1; |
795 |
+ |
796 |
+ /* Can't calculate these here - don't know line length |
797 |
ofb->port->mem_info.size = w << 1; |
798 |
ofb->port->mem_info.size *= h; |
799 |
+ */ |
800 |
|
801 |
return size; |
802 |
} |
803 |
-- |
804 |
1.8.0 |