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