* [PATCH] vt - fb: hide cursor in graphics mode
@ 2009-01-22 18:23 Risto Suominen
2009-01-22 19:04 ` Alan Cox
0 siblings, 1 reply; 6+ messages in thread
From: Risto Suominen @ 2009-01-22 18:23 UTC (permalink / raw)
To: adaplas; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 740 bytes --]
Xserver Xfbdev (kdrive) uses linux framebuffer in graphics mode. It doesn't
need the text mode cursor, it's a bit annoying to have it there sitting in a
corner. This patch disables the cursor when switching to graphics mode.
Signed-off-by: Risto Suominen <Risto.Suominen@gmail.com>
---
The testing is done on kernel version 2.6.18.
--- a/drivers/char/vt_ioctl.c.org 2006-09-20 06:42:06.000000000 +0300
+++ b/drivers/char/vt_ioctl.c 2009-01-22 12:42:38.000000000 +0200
@@ -491,6 +491,10 @@ int vt_ioctl(struct tty_struct *tty, str
return -EPERM;
switch (arg) {
case KD_GRAPHICS:
+ /*
+ * hide H/W (text) cursor in graphics mode
+ */
+ vc->vc_sw->con_cursor(vc, CM_ERASE);
break;
case KD_TEXT0:
case KD_TEXT1:
[-- Attachment #2: vt_ioctl-graphics-nocursor.diff --]
[-- Type: text/x-diff, Size: 740 bytes --]
Xserver Xfbdev (kdrive) uses linux framebuffer in graphics mode. It doesn't
need the text mode cursor, it's a bit annoying to have it there sitting in a
corner. This patch disables the cursor when switching to graphics mode.
Signed-off-by: Risto Suominen <Risto.Suominen@gmail.com>
---
The testing is done on kernel version 2.6.18.
--- a/drivers/char/vt_ioctl.c.org 2006-09-20 06:42:06.000000000 +0300
+++ b/drivers/char/vt_ioctl.c 2009-01-22 12:42:38.000000000 +0200
@@ -491,6 +491,10 @@ int vt_ioctl(struct tty_struct *tty, str
return -EPERM;
switch (arg) {
case KD_GRAPHICS:
+ /*
+ * hide H/W (text) cursor in graphics mode
+ */
+ vc->vc_sw->con_cursor(vc, CM_ERASE);
break;
case KD_TEXT0:
case KD_TEXT1:
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] vt - fb: hide cursor in graphics mode
2009-01-22 18:23 [PATCH] vt - fb: hide cursor in graphics mode Risto Suominen
@ 2009-01-22 19:04 ` Alan Cox
2009-01-22 19:53 ` Risto Suominen
0 siblings, 1 reply; 6+ messages in thread
From: Alan Cox @ 2009-01-22 19:04 UTC (permalink / raw)
To: Risto Suominen; +Cc: adaplas, linux-kernel
On Thu, 22 Jan 2009 20:23:05 +0200
Risto Suominen <risto.suominen@gmail.com> wrote:
> Xserver Xfbdev (kdrive) uses linux framebuffer in graphics mode. It doesn't
> need the text mode cursor, it's a bit annoying to have it there sitting in a
> corner. This patch disables the cursor when switching to graphics mode.
>
> Signed-off-by: Risto Suominen <Risto.Suominen@gmail.com>
NAK. You need to work out what your real problem is I think. When we
enter graphics mode we hide the cursor automatically and always have done.
See set_cursor() and also do_blank_screen(1)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] vt - fb: hide cursor in graphics mode
2009-01-22 19:04 ` Alan Cox
@ 2009-01-22 19:53 ` Risto Suominen
2009-01-22 20:23 ` Risto Suominen
2009-01-22 20:54 ` Alan Cox
0 siblings, 2 replies; 6+ messages in thread
From: Risto Suominen @ 2009-01-22 19:53 UTC (permalink / raw)
To: Alan Cox; +Cc: adaplas, linux-kernel
2009/1/22 Alan Cox <alan@lxorguk.ukuu.org.uk>:
>
> NAK. You need to work out what your real problem is I think. When we
> enter graphics mode we hide the cursor automatically and always have done.
>
> See set_cursor() and also do_blank_screen(1)
>
Could it be that console != fg_console, and we never reach do_blank_screen?
Risto
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] vt - fb: hide cursor in graphics mode
2009-01-22 19:53 ` Risto Suominen
@ 2009-01-22 20:23 ` Risto Suominen
2009-01-23 12:22 ` Risto Suominen
2009-01-22 20:54 ` Alan Cox
1 sibling, 1 reply; 6+ messages in thread
From: Risto Suominen @ 2009-01-22 20:23 UTC (permalink / raw)
To: Alan Cox; +Cc: adaplas, linux-kernel
2009/1/22 Risto Suominen <risto.suominen@gmail.com>:
> 2009/1/22 Alan Cox <alan@lxorguk.ukuu.org.uk>:
>>
>> NAK. You need to work out what your real problem is I think. When we
>> enter graphics mode we hide the cursor automatically and always have done.
>>
>> See set_cursor() and also do_blank_screen(1)
>>
> Could it be that console != fg_console, and we never reach do_blank_screen?
>
> Risto
>
Wait, I have a better theory: fbcon_is_inactive() hinders
fbcon_cursor() from doing anything, if the vc is already in graphics
mode.
Risto
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] vt - fb: hide cursor in graphics mode
2009-01-22 20:23 ` Risto Suominen
@ 2009-01-23 12:22 ` Risto Suominen
0 siblings, 0 replies; 6+ messages in thread
From: Risto Suominen @ 2009-01-23 12:22 UTC (permalink / raw)
To: Alan Cox; +Cc: adaplas, linux-kernel
2009/1/22 Risto Suominen <risto.suominen@gmail.com>:
> 2009/1/22 Risto Suominen <risto.suominen@gmail.com>:
>> 2009/1/22 Alan Cox <alan@lxorguk.ukuu.org.uk>:
>>>
>>> NAK. You need to work out what your real problem is I think. When we
>>> enter graphics mode we hide the cursor automatically and always have done.
>>>
>>> See set_cursor() and also do_blank_screen(1)
>>>
>> Could it be that console != fg_console, and we never reach do_blank_screen?
>>
>> Risto
>>
> Wait, I have a better theory: fbcon_is_inactive() hinders
> fbcon_cursor() from doing anything, if the vc is already in graphics
> mode.
>
> Risto
>
Well, looks like this theory holds. I'll send another patch, this time
for fbcon.c, that demonstrates this by fixing the problem.
Risto
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] vt - fb: hide cursor in graphics mode
2009-01-22 19:53 ` Risto Suominen
2009-01-22 20:23 ` Risto Suominen
@ 2009-01-22 20:54 ` Alan Cox
1 sibling, 0 replies; 6+ messages in thread
From: Alan Cox @ 2009-01-22 20:54 UTC (permalink / raw)
To: Risto Suominen; +Cc: adaplas, linux-kernel
On Thu, 22 Jan 2009 21:53:45 +0200
Risto Suominen <risto.suominen@gmail.com> wrote:
> 2009/1/22 Alan Cox <alan@lxorguk.ukuu.org.uk>:
> >
> > NAK. You need to work out what your real problem is I think. When we
> > enter graphics mode we hide the cursor automatically and always have done.
> >
> > See set_cursor() and also do_blank_screen(1)
> >
> Could it be that console != fg_console, and we never reach do_blank_screen?
console != fg_console means that the console you are updating is not the
one displayed - so won't have the cursor on it anyway
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-01-23 12:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-22 18:23 [PATCH] vt - fb: hide cursor in graphics mode Risto Suominen
2009-01-22 19:04 ` Alan Cox
2009-01-22 19:53 ` Risto Suominen
2009-01-22 20:23 ` Risto Suominen
2009-01-23 12:22 ` Risto Suominen
2009-01-22 20:54 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®