summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-09-25 21:03:38 +0000
committerRichard Purdie <richard@openedhand.com>2008-09-25 21:03:38 +0000
commit536e19f772eef4ccb026d2f151f188821f6b02ba (patch)
tree91b97a21fe7f292128ee2d944a9cb360ece360ce /meta
parent59754eed487b58f72e3ab5e01bbf92d8d4ce2386 (diff)
downloadopenembedded-core-536e19f772eef4ccb026d2f151f188821f6b02ba.tar.gz
openembedded-core-536e19f772eef4ccb026d2f151f188821f6b02ba.tar.bz2
openembedded-core-536e19f772eef4ccb026d2f151f188821f6b02ba.zip
xserver-kdrive: Feed xrandr calls to the framebuffer driver in case it can do better than software rotation
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5279 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta')
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive/fbdev_xrandr_ioctl.patch61
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb3
2 files changed, 63 insertions, 1 deletions
diff --git a/meta/packages/xorg-xserver/xserver-kdrive/fbdev_xrandr_ioctl.patch b/meta/packages/xorg-xserver/xserver-kdrive/fbdev_xrandr_ioctl.patch
new file mode 100644
index 0000000000..a5c22a5efc
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive/fbdev_xrandr_ioctl.patch
@@ -0,0 +1,61 @@
+Index: xorg-server-1.3.0.0/hw/kdrive/fbdev/fbdev.c
+===================================================================
+--- xorg-server-1.3.0.0.orig/hw/kdrive/fbdev/fbdev.c 2008-09-25 21:55:12.000000000 +0100
++++ xorg-server-1.3.0.0/hw/kdrive/fbdev/fbdev.c 2008-09-25 21:55:46.000000000 +0100
+@@ -498,6 +498,7 @@
+ KdScreenInfo *screen = pScreenPriv->screen;
+ FbdevScrPriv *scrpriv = screen->driver;
+ Bool wasEnabled = pScreenPriv->enabled;
++ FbdevPriv *priv = screen->card->driver;
+ FbdevScrPriv oldscr;
+ int oldwidth;
+ int oldheight;
+@@ -525,11 +526,46 @@
+ oldheight = screen->height;
+ oldmmwidth = pScreen->mmWidth;
+ oldmmheight = pScreen->mmHeight;
+-
++
+ /*
+ * Set new configuration
+ */
+-
++
++ if (newwidth != oldwidth || newheight != oldheight)
++ {
++ struct fb_var_screeninfo var;
++ int k;
++
++ k = ioctl (priv->fd, FBIOGET_VSCREENINFO, &var);
++
++ if (k < 0)
++ {
++ ErrorF("Error with framebuffer ioctl FBIOGET_VSCREENINFO: %s", strerror (errno));
++ return FALSE;
++ }
++
++ var.xres = newwidth;
++ var.yres = newheight;
++ var.activate = FB_ACTIVATE_NOW;
++
++ k = ioctl (priv->fd, FBIOPUT_VSCREENINFO, &var);
++
++ if (k >= 0)
++ {
++ if ((k=ioctl(priv->fd, FBIOGET_FSCREENINFO, &priv->fix)) < 0)
++ {
++ perror("Error with framebuffer ioctl FIOGET_FSCREENINFO");
++ close (priv->fd);
++ return FALSE;
++ }
++ if ((k=ioctl(priv->fd, FBIOGET_VSCREENINFO, &priv->var)) < 0) {
++ perror("Error framebuffer ioctl FIOGET_VSCREENINFO");
++ close (priv->fd);
++ return FALSE;
++ }
++ }
++ }
++
+ scrpriv->randr = KdAddRotation (screen->randr, randr);
+
+ KdOffscreenSwapOut (screen->pScreen);
diff --git a/meta/packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb b/meta/packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb
index bdc3a1f6f7..b1d654b391 100644
--- a/meta/packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb
+++ b/meta/packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb
@@ -3,7 +3,7 @@ require xserver-kdrive.inc
DEPENDS += "libxkbfile libxcalibrate"
PE = "1"
-PR = "r19"
+PR = "r21"
SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
file://extra-kmodes.patch;patch=1 \
@@ -20,6 +20,7 @@ SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
file://enable-xcalibrate.patch;patch=1 \
file://hide-cursor-and-ppm-root.patch;patch=1 \
file://xcalibrate_coords.patch;patch=1 \
+ file://fbdev_xrandr_ioctl.patch;patch=1 \
file://scheduler.patch;patch=1"
S = "${WORKDIR}/xorg-server-${PV}"