Gentoo Archives: gentoo-commits

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