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