mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 00:49:33 +02:00
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
This commit is contained in:
@@ -0,0 +1,73 @@
|
|||||||
|
diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c
|
||||||
|
index 86384f0..e27240f 100644
|
||||||
|
--- a/hw/kdrive/fbdev/fbdev.c
|
||||||
|
+++ b/hw/kdrive/fbdev/fbdev.c
|
||||||
|
@@ -38,11 +38,14 @@ fbdevInitialize (KdCardInfo *card, Fbdev
|
||||||
|
{
|
||||||
|
int k;
|
||||||
|
unsigned long off;
|
||||||
|
- if ((priv->fd = open("/dev/fb0", O_RDWR)) < 0 && \
|
||||||
|
- (priv->fd = open("/dev/fb/0", O_RDWR)) < 0) {
|
||||||
|
- perror("Error opening /dev/fb0");
|
||||||
|
- return FALSE;
|
||||||
|
- }
|
||||||
|
+
|
||||||
|
+ if ((priv->fd = open(fbdevDevicePath, O_RDWR)) < 0)
|
||||||
|
+ {
|
||||||
|
+ ErrorF("Error opening framebuffer %s: %s\n",
|
||||||
|
+ fbdevDevicePath, strerror(errno));
|
||||||
|
+ return FALSE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/* quiet valgrind */
|
||||||
|
memset (&priv->fix, '\0', sizeof (priv->fix));
|
||||||
|
if ((k=ioctl(priv->fd, FBIOGET_FSCREENINFO, &priv->fix)) < 0) {
|
||||||
|
diff --git a/hw/kdrive/fbdev/fbdev.h b/hw/kdrive/fbdev/fbdev.h
|
||||||
|
index d37b995..b7951db 100644
|
||||||
|
--- a/hw/kdrive/fbdev/fbdev.h
|
||||||
|
+++ b/hw/kdrive/fbdev/fbdev.h
|
||||||
|
@@ -53,6 +53,7 @@ typedef struct _fbdevScrPriv {
|
||||||
|
} FbdevScrPriv;
|
||||||
|
|
||||||
|
extern KdCardFuncs fbdevFuncs;
|
||||||
|
+extern char* fbdevDevicePath;
|
||||||
|
|
||||||
|
Bool
|
||||||
|
fbdevInitialize (KdCardInfo *card, FbdevPriv *priv);
|
||||||
|
diff --git a/hw/kdrive/fbdev/fbinit.c b/hw/kdrive/fbdev/fbinit.c
|
||||||
|
index ba9d1c6..b7852a8 100644
|
||||||
|
--- a/hw/kdrive/fbdev/fbinit.c
|
||||||
|
+++ b/hw/kdrive/fbdev/fbinit.c
|
||||||
|
@@ -54,16 +54,29 @@ InitInput (int argc, char **argv)
|
||||||
|
void
|
||||||
|
ddxUseMsg (void)
|
||||||
|
{
|
||||||
|
- KdUseMsg();
|
||||||
|
+ KdUseMsg();
|
||||||
|
+ ErrorF("\nXfbdev Device Usage:\n");
|
||||||
|
+ ErrorF("-fb path Framebuffer device to use. Defaults to /dev/fb0\n");
|
||||||
|
+ ErrorF("\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
ddxProcessArgument (int argc, char **argv, int i)
|
||||||
|
{
|
||||||
|
- return KdProcessArgument (argc, argv, i);
|
||||||
|
+ if (!strcmp (argv[i], "-fb"))
|
||||||
|
+ {
|
||||||
|
+ if (i+1 < argc)
|
||||||
|
+ {
|
||||||
|
+ fbdevDevicePath = argv[i+1];
|
||||||
|
+ return 2;
|
||||||
|
+ }
|
||||||
|
+ UseMsg();
|
||||||
|
+ exit(1);
|
||||||
|
+ }
|
||||||
|
+ return KdProcessArgument (argc, argv, i);
|
||||||
|
}
|
||||||
|
|
||||||
|
-
|
||||||
|
+char *fbdevDevicePath = NULL;
|
||||||
|
|
||||||
|
KdCardFuncs fbdevFuncs = {
|
||||||
|
fbdevCardInit, /* cardinit */
|
||||||
@@ -10,6 +10,8 @@ DESCRIPTION_xserver-kdrive-fbdev = "X server from freedesktop.org, supporting ge
|
|||||||
DESCRIPTION_xserver-kdrive-fake = "Fake X server"
|
DESCRIPTION_xserver-kdrive-fake = "Fake X server"
|
||||||
DESCRIPTION_xserver-kdrive-xephyr = "X server in an X window"
|
DESCRIPTION_xserver-kdrive-xephyr = "X server in an X window"
|
||||||
|
|
||||||
|
PR="r1"
|
||||||
|
|
||||||
FILES_xserver-kdrive-fbdev = "${bindir}/Xfbdev"
|
FILES_xserver-kdrive-fbdev = "${bindir}/Xfbdev"
|
||||||
FILES_xserver-kdrive-fake = "${bindir}/Xfake"
|
FILES_xserver-kdrive-fake = "${bindir}/Xfake"
|
||||||
FILES_xserver-kdrive-xephyr = "${bindir}/Xephyr"
|
FILES_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
|
|||||||
file://optional-xkb.patch;patch=1 \
|
file://optional-xkb.patch;patch=1 \
|
||||||
file://disable-xf86-dga-xorgcfg.patch;patch=1 \
|
file://disable-xf86-dga-xorgcfg.patch;patch=1 \
|
||||||
file://enable-tslib.patch;patch=1 \
|
file://enable-tslib.patch;patch=1 \
|
||||||
file://xcalibrate.patch;patch=1"
|
file://xcalibrate.patch;patch=1 \
|
||||||
|
file://xfbdev-fb-opt.patch;patch=1"
|
||||||
|
|
||||||
SRC_URI_append_mnci = " file://onlyfb.patch;patch=1"
|
SRC_URI_append_mnci = " file://onlyfb.patch;patch=1"
|
||||||
SRC_URI_append_poodle = " file://xserver-kdrive-poodle.patch;patch=1"
|
SRC_URI_append_poodle = " file://xserver-kdrive-poodle.patch;patch=1"
|
||||||
|
|||||||
Reference in New Issue
Block a user