From: Geert Uytterhoeven on
On Thu, Jul 22, 2010 at 13:38, Geert Uytterhoeven <geert(a)linux-m68k.org> wrote:
> On Thu, Jul 22, 2010 at 13:21, Alan Cox <alan(a)lxorguk.ukuu.org.uk> wrote:
>> On Wed, 21 Jul 2010 14:57:54 +0200
>> Mattia Jona-Lasinio <mattia.jona(a)gmail.com> wrote:
>>> this is to introduce the LCD-Linux project (http://lcd-linux.sourceforge.net/),
>>> a kernel level implementation of a VT102 terminal emulator, optimized for small
>>> alphanumeric and graphic displays.
>>
>> The kernel already has a console and that provides an abstract
>> implementation that is used for everything from text mode displays to vga
>> to assorted accelerated hardware platforms.
>>
>> Why do we need a VT102 as well ?
>>
>>> functions. A solution is therefore to provide a sort of minimal terminal
>>> emulation in kernel space, that can be accessed through the standard character
>>> device interface. In this way the problem of the display management is reduced
>>
>> If you use the existing kernel console interfaces then you don't need to
>> worry about vt102 v console or having two terminal emulations running.
>
> Indeed, the kernel already has the console abstraction.
>
> I wrote a LCD console driver (for a HD44780 connected to the parallel
> port) using
> the standard console abstraction several years ago. As it used the standard
> console abstraction, it supported multiple virtual consoles and co-operated with
> the VGA text console out-of-the-box. Just use ALT-Fx to switch between different
> VCs on the LCD or on VGA.
>
> I never published the code, though. Will do so tonight when I get back
> to the machine that holds the code ;-)

And so I did, to prevent it from being lost for mankind:

http://users.telenet.be/geertu/Download/hd44780.tar.gz

This is a Linux console driver for a HD44780 LCD connected to a PC-style
parallel port. It supports both 4-bit and 8-bit interface mode.

The code was developed and used with a 20x4 LCD connected to the parallel port
of a standard PC and a CHRP LongTrail PowerPC box, with Linux kernel 2.2
(early development) and 2.4, from 2000 until 2004. There's no guarantee it will
work with more recent kernels.

The console driver has a comment suggesting to use a 20x4 window on an 80x25
virtual screen, but this has never been implemented.

It consists of 4 modules:
- hd44780: Mid-level HD44780 LCD driver, handling the HD44780 commands
[kernel, user]
- parlcd: Low-level HD44780 driver, defining how to talk to a HD44780 LCD
connected to a PC-style parallel port [kernel, user]
- lcdcon: Standard Linux console driver for a HD44780 LCD [kernel]
- play: Interactive test program to talk to the HD44780 or to the raw
parallel port [user]

Modules marked [kernel] are used inside the Linux kernel only.
Modules marked [user] are used with the userspace test program.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert(a)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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Geert Uytterhoeven on
On Sat, Jul 24, 2010 at 16:43, Florian Tobias Schandinat
<FlorianSchandinat(a)gmx.de> wrote:
> Mattia Jona-Lasinio <mattia.jona <at> gmail.com> writes:
>> Moreover I wanted something that COULD be used as a console but not
>> necessarily, that is
>> something that could run happily in the presence of a normal monitor
>> as well. It seems to me, but I may be
>> wrong, that through the standard console system only the current
>> visible console is actually updated
>> while other consoles are just "software" updated. An external LCD
>> would therefore be updated
>> only when you "switch" to it, so it would not be possible to use it to
>> display diagnostics.
>
> True, that's a general problem one has when multiple framebuffers exist.
> Therefore I'd be very happy if someone could come up with a general solution.

Fixing that was (one of the) goal of the linux-console project. James?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert(a)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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Alan Cox on
> was born. Implementing this in the standard Linux terminal emulation
> would require
> a rewrite of most of the code, which I personally would do only if
> there is some interest from
> the community in improving the standard Linux console

There is a great deal of interest. Most of the console (as in
framebuffer) activity moved to the 3D direct rendering world some time
ago.

Let's start at the beginning. What console layer things need fixing to
make the LCD Linux project able to use them ?

Multiple displays live at once is an obvious one - the 3D graphics folks
also want some of that too.

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Mattia Jona-Lasinio on
On Mon, Jul 26, 2010 at 10:11 PM, Geert Uytterhoeven
<geert(a)linux-m68k.org> wrote:
> On Sat, Jul 24, 2010 at 16:43, Florian Tobias Schandinat
> <FlorianSchandinat(a)gmx.de> wrote:
>> Mattia Jona-Lasinio <mattia.jona <at> gmail.com> writes:
>>> Moreover I wanted something that COULD be used as a console but not
>>> necessarily, that is
>>> something that could run happily in the presence of a normal monitor
>>> as well. It seems to me, but I may be
>>> wrong, that through the standard console system only the current
>>> visible console is actually updated
>>> while other consoles are just "software" updated. An external LCD
>>> would therefore be updated
>>> only when you "switch" to it, so it would not be possible to use it to
>>> display diagnostics.
>>
>> True, that's a general problem one has when multiple framebuffers exist.
>> Therefore I'd be very happy if someone could come up with a general solution.
>
> Fixing that was (one of the) goal of the linux-console project. James?

Hmmm, the linux-console project seems to be dead. There are no file
releases after nearly ten
years and the CVS is three years old.

I downloaded your driver and explored the code a bit. Indeed there are
many similarities
with the very early stages of LCD-Linux. At the beginning I also wrote
something very close to what you did.
But then I realized that
the display management part was very much intertwined with the low
level details of the display
(parallel port, 8 bit and 4 bit and so on....),
and this made the module not so obvious to be ported to different displays.
If you abstract the display management, add a framebuffer, you realize
that basically
you get a terminal emulator (nearly) for free, with the possibility to
add custom features
typical of small displays (like custom character generation). And once
a framebuffer is added,
you can play a bit by adding a virtual display larger than the
physical one, also adding
the code to keep the cursor visible in a smart way. Basically this is
the way LCD-Linux
was born. Implementing this in the standard Linux terminal emulation
would require
a rewrite of most of the code, which I personally would do only if
there is some interest from
the community in improving the standard Linux console, and I don't
think it is the case
looking at the age of the Linux console project. So I decided to keep
it separate.
But never say never! In the future the two consoles could merge in a
single one. ;)

Greetings,

Mattia
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Mattia Jona-Lasinio on
On Wed, Jul 28, 2010 at 9:39 PM, Alan Cox <alan(a)lxorguk.ukuu.org.uk> wrote:
> Let's start at the beginning. What console layer things need fixing to
> make the LCD Linux project able to use them ?

Good to hear that! :) Just give me a few days to write a detailed todo list.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/