* Console text selection bug
@ 2001-03-03 17:09 Giuliano Pochini
2001-03-05 21:35 ` Benjamin Herrenschmidt
2001-03-05 23:48 ` Hollis R Blanchard
0 siblings, 2 replies; 7+ messages in thread
From: Giuliano Pochini @ 2001-03-03 17:09 UTC (permalink / raw)
To: linuxppc-dev
When I select text in console it's scrambled. I looked at the
aty128 sources, but I didn't find anything about it. Where is
the code that manages selection/cut/paste ?
The selected text is scrambled in this way: every char has
the bits 1,2,3 swapped with bits 5,6,7 respectively (bits
numbered left to right). I don't know what can cause this
strange behaviour... I thought the console screen was a
simple array of char/colour pairs.
[b/w G3, r128, all kernels]
Bye.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Console text selection bug
2001-03-03 17:09 Console text selection bug Giuliano Pochini
@ 2001-03-05 21:35 ` Benjamin Herrenschmidt
2001-03-06 6:18 ` Timothy A. Seufert
2001-03-05 23:48 ` Hollis R Blanchard
1 sibling, 1 reply; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2001-03-05 21:35 UTC (permalink / raw)
To: Giuliano Pochini, linuxppc-dev
>When I select text in console it's scrambled. I looked at the
>aty128 sources, but I didn't find anything about it. Where is
>the code that manages selection/cut/paste ?
>
>The selected text is scrambled in this way: every char has
>the bits 1,2,3 swapped with bits 5,6,7 respectively (bits
>numbered left to right). I don't know what can cause this
>strange behaviour... I thought the console screen was a
>simple array of char/colour pairs.
It's an endian bug in fbcon when accessing the text/attribute buffer.
I think someone posted a fix for it, You may have more luck asking on
the fbdev mailing list to the fbdev maintainers what's up.
I think it's related to fbcon_invert_region() not using the access
macros and directly tapping the buffer, causing attributes & text
to be messed up.
Ben.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Console text selection bug
2001-03-05 21:35 ` Benjamin Herrenschmidt
@ 2001-03-06 6:18 ` Timothy A. Seufert
2001-03-06 6:52 ` Geert Uytterhoeven
0 siblings, 1 reply; 7+ messages in thread
From: Timothy A. Seufert @ 2001-03-06 6:18 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Giuliano Pochini, linuxppc-dev
At 10:35 PM +0100 3/5/01, Benjamin Herrenschmidt wrote:
>>When I select text in console it's scrambled. I looked at the
>>aty128 sources, but I didn't find anything about it. Where is
>>the code that manages selection/cut/paste ?
>>
>>The selected text is scrambled in this way: every char has
>>the bits 1,2,3 swapped with bits 5,6,7 respectively (bits
>>numbered left to right). I don't know what can cause this
>>strange behaviour... I thought the console screen was a
>>simple array of char/colour pairs.
>
>It's an endian bug in fbcon when accessing the text/attribute buffer.
>
>I think someone posted a fix for it, You may have more luck asking on
>the fbdev mailing list to the fbdev maintainers what's up.
>
>I think it's related to fbcon_invert_region() not using the access
>macros and directly tapping the buffer, causing attributes & text
>to be messed up.
I saw this problem in 2.4.x until I turned off the config option for
VGA consoles. Then it went away.
Tim Seufert
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Console text selection bug
2001-03-06 6:18 ` Timothy A. Seufert
@ 2001-03-06 6:52 ` Geert Uytterhoeven
2001-03-07 20:29 ` Giuliano Pochini
0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2001-03-06 6:52 UTC (permalink / raw)
To: Timothy A. Seufert; +Cc: Benjamin Herrenschmidt, Giuliano Pochini, linuxppc-dev
On Mon, 5 Mar 2001, Timothy A. Seufert wrote:
> At 10:35 PM +0100 3/5/01, Benjamin Herrenschmidt wrote:
> >>When I select text in console it's scrambled. I looked at the
> >>aty128 sources, but I didn't find anything about it. Where is
> >>the code that manages selection/cut/paste ?
> >>
> >>The selected text is scrambled in this way: every char has
> >>the bits 1,2,3 swapped with bits 5,6,7 respectively (bits
> >>numbered left to right). I don't know what can cause this
> >>strange behaviour... I thought the console screen was a
> >>simple array of char/colour pairs.
> >
> >It's an endian bug in fbcon when accessing the text/attribute buffer.
> >
> >I think someone posted a fix for it, You may have more luck asking on
> >the fbdev mailing list to the fbdev maintainers what's up.
> >
> >I think it's related to fbcon_invert_region() not using the access
> >macros and directly tapping the buffer, causing attributes & text
> >to be messed up.
>
> I saw this problem in 2.4.x until I turned off the config option for
> VGA consoles. Then it went away.
Nevertheless, it's a bug. Can someone please change fbcon_invert_region() to
use scr_{read,write}w() to access the shadow screen buffer and see whether it
works? Patches are accepted at linux-fbdev-devel@lists.sourceforge.net :-)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Console text selection bug
2001-03-06 6:52 ` Geert Uytterhoeven
@ 2001-03-07 20:29 ` Giuliano Pochini
2001-03-10 8:18 ` Geert Uytterhoeven
0 siblings, 1 reply; 7+ messages in thread
From: Giuliano Pochini @ 2001-03-07 20:29 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Timothy A. Seufert, Benjamin Herrenschmidt, linuxppc-dev
>> It's an endian bug in fbcon when accessing the text/attribute buffer.
> Nevertheless, it's a bug. Can someone please change fbcon_invert_region() to
> use scr_{read,write}w() to access the shadow screen buffer and see whether it
> works? Patches are accepted at linux-fbdev-devel@lists.sourceforge.net :-)
Yes, it's an endianess bug. scr_{read,write}w() are defined as normal
assignments in vt_buffer.h, so I wonder where is the bug. Is the shadow buffer
supposed to be native endian ?
Bye.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Console text selection bug
2001-03-07 20:29 ` Giuliano Pochini
@ 2001-03-10 8:18 ` Geert Uytterhoeven
0 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2001-03-10 8:18 UTC (permalink / raw)
To: Giuliano Pochini; +Cc: Timothy A. Seufert, Benjamin Herrenschmidt, linuxppc-dev
On Wed, 7 Mar 2001, Giuliano Pochini wrote:
> >> It's an endian bug in fbcon when accessing the text/attribute buffer.
>
> > Nevertheless, it's a bug. Can someone please change fbcon_invert_region() to
> > use scr_{read,write}w() to access the shadow screen buffer and see whether it
> > works? Patches are accepted at linux-fbdev-devel@lists.sourceforge.net :-)
>
> Yes, it's an endianess bug. scr_{read,write}w() are defined as normal
> assignments in vt_buffer.h, so I wonder where is the bug. Is the shadow buffer
No, their definition in vt_buffer.h depends on VT_BUF_HAVE_RW. If that is
defined in <asm/vga.h>, vga.h must provide its own definitions.
> supposed to be native endian ?
It doesn't really matter, since all accesses must be done using
scr_{read,write}w() anyway. For performance reasons we chose native endianness.
Except when VGA (CONFIG_VGA_CONSOLE || CONFIG_MDA_CONSOLE) is defined, since on
VGA/MDA the shadow buffer _is_ the screen image and must be little endian.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Console text selection bug
2001-03-03 17:09 Console text selection bug Giuliano Pochini
2001-03-05 21:35 ` Benjamin Herrenschmidt
@ 2001-03-05 23:48 ` Hollis R Blanchard
1 sibling, 0 replies; 7+ messages in thread
From: Hollis R Blanchard @ 2001-03-05 23:48 UTC (permalink / raw)
To: Giuliano Pochini; +Cc: linuxppc-dev
On Sat, 3 Mar 2001, Giuliano Pochini wrote:
>
> When I select text in console it's scrambled. I looked at the
> aty128 sources, but I didn't find anything about it. Where is
> the code that manages selection/cut/paste ?
>
> The selected text is scrambled in this way: every char has
> the bits 1,2,3 swapped with bits 5,6,7 respectively (bits
> numbered left to right). I don't know what can cause this
> strange behaviour... I thought the console screen was a
> simple array of char/colour pairs.
>
> [b/w G3, r128, all kernels]
I don't see this (B&W G3, 2.2.19pre14). I understand this is only a problem if
you enable VGA console (which I don't have enabled).
-Hollis
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2001-03-10 8:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-03 17:09 Console text selection bug Giuliano Pochini
2001-03-05 21:35 ` Benjamin Herrenschmidt
2001-03-06 6:18 ` Timothy A. Seufert
2001-03-06 6:52 ` Geert Uytterhoeven
2001-03-07 20:29 ` Giuliano Pochini
2001-03-10 8:18 ` Geert Uytterhoeven
2001-03-05 23:48 ` Hollis R Blanchard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).