summaryrefslogtreecommitdiffstats
path: root/meta/packages
diff options
context:
space:
mode:
authorMatthew Allum <mallum@openedhand.com>2006-08-31 15:55:49 +0000
committerMatthew Allum <mallum@openedhand.com>2006-08-31 15:55:49 +0000
commit1e09fe19b86fea4c9e61dd79649e7986ecea6e36 (patch)
tree6a33deca65a788f19f5fc4be020c1862ffd90110 /meta/packages
parent18117c4390a051b2d3671b2f0e55c6f15ec94e7f (diff)
downloadpoky-1e09fe19b86fea4c9e61dd79649e7986ecea6e36.tar.gz
Add patch for -fb switch support for Xfbdev
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@687 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages')
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive/xfbdev-fb-opt.patch73
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive_X11R7.1-1.1.0.bb5
2 files changed, 77 insertions, 1 deletions
diff --git a/meta/packages/xorg-xserver/xserver-kdrive/xfbdev-fb-opt.patch b/meta/packages/xorg-xserver/xserver-kdrive/xfbdev-fb-opt.patch
new file mode 100644
index 0000000000..9a73b4de7c
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive/xfbdev-fb-opt.patch
@@ -0,0 +1,73 @@
1diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c
2index 86384f0..e27240f 100644
3--- a/hw/kdrive/fbdev/fbdev.c
4+++ b/hw/kdrive/fbdev/fbdev.c
5@@ -38,11 +38,14 @@ fbdevInitialize (KdCardInfo *card, Fbdev
6 {
7 int k;
8 unsigned long off;
9- if ((priv->fd = open("/dev/fb0", O_RDWR)) < 0 && \
10- (priv->fd = open("/dev/fb/0", O_RDWR)) < 0) {
11- perror("Error opening /dev/fb0");
12- return FALSE;
13- }
14+
15+ if ((priv->fd = open(fbdevDevicePath, O_RDWR)) < 0)
16+ {
17+ ErrorF("Error opening framebuffer %s: %s\n",
18+ fbdevDevicePath, strerror(errno));
19+ return FALSE;
20+ }
21+
22 /* quiet valgrind */
23 memset (&priv->fix, '\0', sizeof (priv->fix));
24 if ((k=ioctl(priv->fd, FBIOGET_FSCREENINFO, &priv->fix)) < 0) {
25diff --git a/hw/kdrive/fbdev/fbdev.h b/hw/kdrive/fbdev/fbdev.h
26index d37b995..b7951db 100644
27--- a/hw/kdrive/fbdev/fbdev.h
28+++ b/hw/kdrive/fbdev/fbdev.h
29@@ -53,6 +53,7 @@ typedef struct _fbdevScrPriv {
30 } FbdevScrPriv;
31
32 extern KdCardFuncs fbdevFuncs;
33+extern char* fbdevDevicePath;
34
35 Bool
36 fbdevInitialize (KdCardInfo *card, FbdevPriv *priv);
37diff --git a/hw/kdrive/fbdev/fbinit.c b/hw/kdrive/fbdev/fbinit.c
38index ba9d1c6..b7852a8 100644
39--- a/hw/kdrive/fbdev/fbinit.c
40+++ b/hw/kdrive/fbdev/fbinit.c
41@@ -54,16 +54,29 @@ InitInput (int argc, char **argv)
42 void
43 ddxUseMsg (void)
44 {
45- KdUseMsg();
46+ KdUseMsg();
47+ ErrorF("\nXfbdev Device Usage:\n");
48+ ErrorF("-fb path Framebuffer device to use. Defaults to /dev/fb0\n");
49+ ErrorF("\n");
50 }
51
52 int
53 ddxProcessArgument (int argc, char **argv, int i)
54 {
55- return KdProcessArgument (argc, argv, i);
56+ if (!strcmp (argv[i], "-fb"))
57+ {
58+ if (i+1 < argc)
59+ {
60+ fbdevDevicePath = argv[i+1];
61+ return 2;
62+ }
63+ UseMsg();
64+ exit(1);
65+ }
66+ return KdProcessArgument (argc, argv, i);
67 }
68
69-
70+char *fbdevDevicePath = NULL;
71
72 KdCardFuncs fbdevFuncs = {
73 fbdevCardInit, /* cardinit */
diff --git a/meta/packages/xorg-xserver/xserver-kdrive_X11R7.1-1.1.0.bb b/meta/packages/xorg-xserver/xserver-kdrive_X11R7.1-1.1.0.bb
index cfb1294c09..92857dc62b 100644
--- a/meta/packages/xorg-xserver/xserver-kdrive_X11R7.1-1.1.0.bb
+++ b/meta/packages/xorg-xserver/xserver-kdrive_X11R7.1-1.1.0.bb
@@ -10,6 +10,8 @@ DESCRIPTION_xserver-kdrive-fbdev = "X server from freedesktop.org, supporting ge
10DESCRIPTION_xserver-kdrive-fake = "Fake X server" 10DESCRIPTION_xserver-kdrive-fake = "Fake X server"
11DESCRIPTION_xserver-kdrive-xephyr = "X server in an X window" 11DESCRIPTION_xserver-kdrive-xephyr = "X server in an X window"
12 12
13PR="r1"
14
13FILES_xserver-kdrive-fbdev = "${bindir}/Xfbdev" 15FILES_xserver-kdrive-fbdev = "${bindir}/Xfbdev"
14FILES_xserver-kdrive-fake = "${bindir}/Xfake" 16FILES_xserver-kdrive-fake = "${bindir}/Xfake"
15FILES_xserver-kdrive-xephyr = "${bindir}/Xephyr" 17FILES_xserver-kdrive-xephyr = "${bindir}/Xephyr"
@@ -25,7 +27,8 @@ SRC_URI = "http://ftp.x.org/pub/X11R7.1/src/xserver/xorg-server-X11R7.1-1.1.0.ta
25 file://optional-xkb.patch;patch=1 \ 27 file://optional-xkb.patch;patch=1 \
26 file://disable-xf86-dga-xorgcfg.patch;patch=1 \ 28 file://disable-xf86-dga-xorgcfg.patch;patch=1 \
27 file://enable-tslib.patch;patch=1 \ 29 file://enable-tslib.patch;patch=1 \
28 file://xcalibrate.patch;patch=1" 30 file://xcalibrate.patch;patch=1 \
31 file://xfbdev-fb-opt.patch;patch=1"
29 32
30SRC_URI_append_mnci = " file://onlyfb.patch;patch=1" 33SRC_URI_append_mnci = " file://onlyfb.patch;patch=1"
31SRC_URI_append_poodle = " file://xserver-kdrive-poodle.patch;patch=1" 34SRC_URI_append_poodle = " file://xserver-kdrive-poodle.patch;patch=1"