Re: [Linux-fbdev-devel] [PATCH] fb: hide cursor in graphics mode

From: Risto Suominen
Date: Sun Feb 22 2009 - 04:25:24 EST


Krzysztof, thank you for your efforts.

I've been using PowerMac platform with built-in ATI mach64 and Xorg
server 1.1.1. Kernel options related to frame buffers include:

CONFIG_FB=y
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
CONFIG_FB_DEFERRED_IO=y
CONFIG_FB_MACMODES=y
CONFIG_FB_BACKLIGHT=y
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_TILEBLITTING=y

CONFIG_FB_ATY=y
CONFIG_FB_ATY_CT=y
CONFIG_FB_ATY_GENERIC_LCD=y
CONFIG_FB_ATY_GX=y
CONFIG_FB_ATY_BACKLIGHT=y

CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y

Xfbdev options include:

--disable-static \
--enable-xorg \
--enable-xtrap \
--enable-dmx \
--enable-vfb \
--enable-kdrive \
--enable-xephyr \
--disable-xsdl \
--disable-xfake \
--enable-xfbdev \
--disable-kdrive-vesa \
--disable-lbx \
--disable-xprint \
--disable-xorgconfig \
--disable-xorgcfg \
--disable-misc-utils

In my opinion, Xfbdev assumes that the cursor will disappear when
turning on graphics mode with ioctl(LinuxConsoleFd, KDSETMODE,
KD_GRAPHICS). It's obvious that fbcon is not doing anything to switch
the cursor off when it receives this ioctl, fbcon_is_inactive()
prevents it. The problem comes from that something has made it appear,
i.e. text mode frame buffer console. I have text consoles on VTs 1 to
6 and X on 7.

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 <Risto.Suominen@xxxxxxxxx>
---
The testing is done on version 1.1.1 and linux kernel version 2.6.18.

--- a/hw/kdrive/fbdev/fbdev.c.org 2006-07-05 21:31:39.000000000 +0300
+++ b/hw/kdrive/fbdev/fbdev.c 2009-01-18 15:42:06.000000000 +0200
@@ -215,6 +215,8 @@ fbdevScreenInitialize (KdScreenInfo *scr

/* Now get the new screeninfo */
ioctl (priv->fd, FBIOGET_VSCREENINFO, &priv->var);
+ /* We can get anything into yoffset if fbcon is active */
+ priv->var.yoffset = 0;
depth = priv->var.bits_per_pixel;
gray = priv->var.grayscale;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/