summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/fbdev_xrandr_ioctl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/fbdev_xrandr_ioctl.patch')
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/fbdev_xrandr_ioctl.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/fbdev_xrandr_ioctl.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/fbdev_xrandr_ioctl.patch
new file mode 100644
index 0000000000..a5c22a5efc
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/fbdev_xrandr_ioctl.patch
@@ -0,0 +1,61 @@
1Index: xorg-server-1.3.0.0/hw/kdrive/fbdev/fbdev.c
2===================================================================
3--- xorg-server-1.3.0.0.orig/hw/kdrive/fbdev/fbdev.c 2008-09-25 21:55:12.000000000 +0100
4+++ xorg-server-1.3.0.0/hw/kdrive/fbdev/fbdev.c 2008-09-25 21:55:46.000000000 +0100
5@@ -498,6 +498,7 @@
6 KdScreenInfo *screen = pScreenPriv->screen;
7 FbdevScrPriv *scrpriv = screen->driver;
8 Bool wasEnabled = pScreenPriv->enabled;
9+ FbdevPriv *priv = screen->card->driver;
10 FbdevScrPriv oldscr;
11 int oldwidth;
12 int oldheight;
13@@ -525,11 +526,46 @@
14 oldheight = screen->height;
15 oldmmwidth = pScreen->mmWidth;
16 oldmmheight = pScreen->mmHeight;
17-
18+
19 /*
20 * Set new configuration
21 */
22-
23+
24+ if (newwidth != oldwidth || newheight != oldheight)
25+ {
26+ struct fb_var_screeninfo var;
27+ int k;
28+
29+ k = ioctl (priv->fd, FBIOGET_VSCREENINFO, &var);
30+
31+ if (k < 0)
32+ {
33+ ErrorF("Error with framebuffer ioctl FBIOGET_VSCREENINFO: %s", strerror (errno));
34+ return FALSE;
35+ }
36+
37+ var.xres = newwidth;
38+ var.yres = newheight;
39+ var.activate = FB_ACTIVATE_NOW;
40+
41+ k = ioctl (priv->fd, FBIOPUT_VSCREENINFO, &var);
42+
43+ if (k >= 0)
44+ {
45+ if ((k=ioctl(priv->fd, FBIOGET_FSCREENINFO, &priv->fix)) < 0)
46+ {
47+ perror("Error with framebuffer ioctl FIOGET_FSCREENINFO");
48+ close (priv->fd);
49+ return FALSE;
50+ }
51+ if ((k=ioctl(priv->fd, FBIOGET_VSCREENINFO, &priv->var)) < 0) {
52+ perror("Error framebuffer ioctl FIOGET_VSCREENINFO");
53+ close (priv->fd);
54+ return FALSE;
55+ }
56+ }
57+ }
58+
59 scrpriv->randr = KdAddRotation (screen->randr, randr);
60
61 KdOffscreenSwapOut (screen->pScreen);