|
From: Krzysztof H. <krz...@po...> - 2009-02-22 15:36:03
|
On Sun, 22 Feb 2009 11:25:04 +0200
Risto Suominen <ris...@gm...> wrote:
>
> One maybe unusual property of atyfb is that the frame buffer is higher
> than the screen. To make Xfbdev work correctly I needed the patch
> below.
>
> Risto
>
> If virtual resolution is higher than the screen (as in atyfb), and yoffset
> given by the framebuffer driver happens to be non-zero (fbcon changes it on-
> the-fly), Xfbdev places its image starting above the displayed part of the
> framebuffer. This patch makes sure that the whole picture is visible.
>
> Signed-off-by: Risto Suominen <Ris...@gm...>
> ---
The fix to the problem above is needed inside the kdrive not inside
the kernel. The kdrive ask for a new mode with somehow random
yoffset and xoffset values. The patch which fixes it is below (for the
xserver 1.3.0 but it is very simple).
Ok. The kdrive fbdev server is little "strange". I traced it a little
and here is how it starts:
1. It changes mode (resolution, depth) on a current console and reads
fb settings from it (e.g. yoffset, screen start address).
2. It switches to a new vt.
3. It prints some messages on a new console (the xoffset/yoffset
can change inside the fb layer)
3. It switches a new mode with settings got from the step 1.
As a results, the console you have started the Xfbdev from
is left set to new mode after Xfbdev started and it is never
restored.
In comparison, the Xorg server with fbdev driver starts like this:
1. It switches to a new vt.
2. It tries various modes (all possible defined inside the config)
but without setting them (only check_var() is called).
3. It switches a new mode with settings got from the step 2.
That's why the Xorg works ok, because it gets settings from
a proper console. It also leaves the current console untouched.
I have tried with xserver 1.3.0 only. I will try to reproduce the
cursor problem with the same xserver version as yours.
Regards,
Krzysztof
PS. Feel free to forward this patch to anybody (including
Xorg guys). The patch just set all offsets to 0 before the last
mode setting ioctl (after the vt switch).
--- hw/kdrive/fbdev/fbdev.c~ 2009-02-22 16:21:13.861294390 +0100
+++ hw/kdrive/fbdev/fbdev.c 2009-02-22 16:21:08.421172666 +0100
@@ -670,6 +670,8 @@ fbdevEnable (ScreenPtr pScreen)
priv->var.activate = FB_ACTIVATE_NOW|FB_CHANGE_CMAP_VBL;
+ priv->var.xoffset = 0;
+ priv->var.yoffset = 0;
/* display it on the LCD */
k = ioctl (priv->fd, FBIOPUT_VSCREENINFO, &priv->var);
if (k < 0)
----------------------------------------------------------------------
Strzelec, Byk, a moze Panna? Wszystkich 12 znakow zodiaku!
Sprawd¼ swoj horoskop na dzis >> http://link.interia.pl/f2051
|