All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Set the vga cursor even when hidden
@ 2005-11-05 21:19 Samuel Thibault
  2005-11-05 21:26 ` [PATCH 2.4] " Samuel Thibault
  2005-11-06  0:37 ` [PATCH] " Antonino A. Daplas
  0 siblings, 2 replies; 7+ messages in thread
From: Samuel Thibault @ 2005-11-05 21:19 UTC (permalink / raw)
  To: linux-kernel, akpm, torvalds; +Cc: mlang

Hi,

Some visually impaired people use hardware devices which directly read
the vga screen. When newt for instance asks to hide the cursor for
better visual aspect, the kernel puts the vga cursor out of the screen,
so that the cursor position can't be read by the hardware device. This
is a great loss for such people.

Here is a patch which uses the same technique as CUR_NONE for hiding the
cursor while still moving it.

Mario, you should apply it to the speakup kernel for access floppies
asap. I'll submit a 2.4 patch too.

Signed-off-by: samuel.thibault@ens-lyon.org

--- linux/drivers/video/console/vgacon.c.orig	2005-11-05 21:51:03.000000000 +0100
+++ linux/drivers/video/console/vgacon.c	2005-11-05 21:51:31.000000000 +0100
@@ -448,7 +448,8 @@ static void vgacon_cursor(struct vc_data
 		vgacon_scrolldelta(c, 0);
 	switch (mode) {
 	case CM_ERASE:
-		write_vga(14, (vga_vram_end - vga_vram_base - 1) / 2);
+		write_vga(14, (c->vc_pos - vga_vram_base) / 2);
+		vgacon_set_cursor_size(c->vc_x, 31, 30);
 		break;
 
 	case CM_MOVE:

Regards,
Samuel Thibault

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2.4] Set the vga cursor even when hidden
  2005-11-05 21:19 [PATCH] Set the vga cursor even when hidden Samuel Thibault
@ 2005-11-05 21:26 ` Samuel Thibault
  2005-11-06  0:37 ` [PATCH] " Antonino A. Daplas
  1 sibling, 0 replies; 7+ messages in thread
From: Samuel Thibault @ 2005-11-05 21:26 UTC (permalink / raw)
  To: linux-kernel, marcelo.tosatti; +Cc: mlang

Hi,

Some visually impaired people use hardware devices which directly read
the vga screen. When newt for instance asks to hide the cursor for
better visual aspect, the kernel puts the vga cursor out of the screen,
so that the cursor position can't be read by the hardware device. This
is a great loss for such people.

Here is a patch which uses the same technique as CUR_NONE for hiding the
cursor while still moving it.

Mario, you should apply it to the speakup kernel for access floppies
asap.

--- linux-2.4.31/drivers/video/vgacon.c.orig	2002-08-03 02:39:45.000000000 +0200
+++ linux-2.4.31/drivers/video/vgacon.c	2005-11-05 22:22:12.000000000 +0100
@@ -432,7 +432,8 @@ static void vgacon_cursor(struct vc_data
 	vgacon_scrolldelta(c, 0);
     switch (mode) {
 	case CM_ERASE:
-	    write_vga(14, (vga_vram_end - vga_vram_base - 1)/2);
+	    write_vga(14, (c->vc_pos-vga_vram_base)/2);
+	    vgacon_set_cursor_size(c->vc_x, 31, 30);
 	    break;
 
 	case CM_MOVE:

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Set the vga cursor even when hidden
  2005-11-05 21:19 [PATCH] Set the vga cursor even when hidden Samuel Thibault
  2005-11-05 21:26 ` [PATCH 2.4] " Samuel Thibault
@ 2005-11-06  0:37 ` Antonino A. Daplas
  2005-11-06  0:44   ` Samuel Thibault
  2005-11-06  0:45   ` Linus Torvalds
  1 sibling, 2 replies; 7+ messages in thread
From: Antonino A. Daplas @ 2005-11-06  0:37 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: linux-kernel, akpm, torvalds, mlang

Samuel Thibault wrote:
> Hi,
> 
> Some visually impaired people use hardware devices which directly read
> the vga screen. When newt for instance asks to hide the cursor for
> better visual aspect, the kernel puts the vga cursor out of the screen,
> so that the cursor position can't be read by the hardware device. This
> is a great loss for such people.
> 
> Here is a patch which uses the same technique as CUR_NONE for hiding the
> cursor while still moving it.

Note that this method will produce a split block cursor with EGA, which is
still supported by vgacon, but possibly not used anymore.  Why not use
this method (scanline_end < scanline_start) for VGA, and the default method
(moving the cursor out of the screen) for the rest?

Or why not just set bit 5 of the cursor start register (port 0x0a) to disable
the cursor, and clear to enable? I believe this will also work for the
other types.

Tony

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Set the vga cursor even when hidden
  2005-11-06  0:37 ` [PATCH] " Antonino A. Daplas
@ 2005-11-06  0:44   ` Samuel Thibault
  2005-11-06  2:11     ` Antonino A. Daplas
  2005-11-06  0:45   ` Linus Torvalds
  1 sibling, 1 reply; 7+ messages in thread
From: Samuel Thibault @ 2005-11-06  0:44 UTC (permalink / raw)
  To: Antonino A. Daplas; +Cc: linux-kernel, akpm, torvalds, mlang

Hi,

Antonino A. Daplas, le Sun 06 Nov 2005 08:37:27 +0800, a écrit :
> Why not use this method (scanline_end < scanline_start) for VGA, and
> the default method (moving the cursor out of the screen) for the rest?

Well, visually impaired people might want to use other cards as well.

> Or why not just set bit 5 of the cursor start register (port 0x0a) to disable
> the cursor, and clear to enable? I believe this will also work for the
> other types.

If this works, it would be fine.

Regards,
Samuel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Set the vga cursor even when hidden
  2005-11-06  0:37 ` [PATCH] " Antonino A. Daplas
  2005-11-06  0:44   ` Samuel Thibault
@ 2005-11-06  0:45   ` Linus Torvalds
  2005-11-06  1:40     ` Antonino A. Daplas
  1 sibling, 1 reply; 7+ messages in thread
From: Linus Torvalds @ 2005-11-06  0:45 UTC (permalink / raw)
  To: Antonino A. Daplas; +Cc: Samuel Thibault, linux-kernel, akpm, mlang



On Sun, 6 Nov 2005, Antonino A. Daplas wrote:
> 
> Note that this method will produce a split block cursor with EGA, which is
> still supported by vgacon, but possibly not used anymore.  Why not use
> this method (scanline_end < scanline_start) for VGA, and the default method
> (moving the cursor out of the screen) for the rest?

I do believe that we can ignore EGA controllers these days.

Or at least accept the fact that anybody who owns an EGA system isn't 
actually likely to care about what his screen looks like.

The EGA support was pretty much a joke even when Linux started ;)

		Linus

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Set the vga cursor even when hidden
  2005-11-06  0:45   ` Linus Torvalds
@ 2005-11-06  1:40     ` Antonino A. Daplas
  0 siblings, 0 replies; 7+ messages in thread
From: Antonino A. Daplas @ 2005-11-06  1:40 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Samuel Thibault, linux-kernel, akpm, mlang

Linus Torvalds wrote:
> 
> On Sun, 6 Nov 2005, Antonino A. Daplas wrote:
>> Note that this method will produce a split block cursor with EGA, which is
>> still supported by vgacon, but possibly not used anymore.  Why not use
>> this method (scanline_end < scanline_start) for VGA, and the default method
>> (moving the cursor out of the screen) for the rest?
> 
> I do believe that we can ignore EGA controllers these days.
> 
> Or at least accept the fact that anybody who owns an EGA system isn't 
> actually likely to care about what his screen looks like.
> 
> The EGA support was pretty much a joke even when Linux started ;)
> 

Okay, it was a half-hearted comment in the first place :-)

Tony

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Set the vga cursor even when hidden
  2005-11-06  0:44   ` Samuel Thibault
@ 2005-11-06  2:11     ` Antonino A. Daplas
  0 siblings, 0 replies; 7+ messages in thread
From: Antonino A. Daplas @ 2005-11-06  2:11 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: linux-kernel, akpm, torvalds, mlang

Samuel Thibault wrote:
> Hi,
> 
> Antonino A. Daplas, le Sun 06 Nov 2005 08:37:27 +0800, a écrit :
>> Why not use this method (scanline_end < scanline_start) for VGA, and
>> the default method (moving the cursor out of the screen) for the rest?
> 
> Well, visually impaired people might want to use other cards as well.

See Linus's comments about that :-)

> 
>> Or why not just set bit 5 of the cursor start register (port 0x0a) to disable
>> the cursor, and clear to enable? I believe this will also work for the
>> other types.
> 
> If this works, it would be fine.

No, forget about that.  It sounds simple, but when the cursor is moved, the
cursor is unavoidably reenabled again (in vgacon_set_cursor_size). So this method
will require more work for what's it worth. Your patch is much simpler and uses
known working code. 

Tony



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-11-06  2:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-05 21:19 [PATCH] Set the vga cursor even when hidden Samuel Thibault
2005-11-05 21:26 ` [PATCH 2.4] " Samuel Thibault
2005-11-06  0:37 ` [PATCH] " Antonino A. Daplas
2005-11-06  0:44   ` Samuel Thibault
2005-11-06  2:11     ` Antonino A. Daplas
2005-11-06  0:45   ` Linus Torvalds
2005-11-06  1:40     ` Antonino A. Daplas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.