Files
poky/meta/packages/xorg-xserver/xserver-kdrive/fbdev_xrandr_ioctl.patch
Ross Burton 005f63f560 Merged revisions 5203,5235-5236,5278-5279 via svnmerge from
https://svn.o-hand.com/repos/poky/trunk

........
  r5203 | richard | 2008-09-19 18:32:35 +0100 (Fri, 19 Sep 2008) | 1 line
  
  tune-xscale.inc: Compile cairo for armv4 to avoid alighment trap issues with double instruction
........
  r5235 | ross | 2008-09-23 10:54:16 +0100 (Tue, 23 Sep 2008) | 1 line
  
  poky-fixed-revisions.inc: bump matchbox-desktop srvrev to fix icon loading bug
........
  r5236 | ross | 2008-09-23 11:14:38 +0100 (Tue, 23 Sep 2008) | 1 line
  
  poky-fixed-revisions.inc: fix typo
........
  r5278 | ross | 2008-09-25 21:52:29 +0100 (Thu, 25 Sep 2008) | 1 line
  
  dialer: specify revision instead of using autorev
........
  r5279 | richard | 2008-09-25 22:03:38 +0100 (Thu, 25 Sep 2008) | 1 line
  
  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/branches/elroy@5285 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-09-26 09:02:47 +00:00

62 lines
1.6 KiB
Diff

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);