linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Introducing the LCD-Linux project
@ 2010-07-21 12:57 Mattia Jona-Lasinio
  2010-07-21 16:38 ` Ben Pfaff
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Mattia Jona-Lasinio @ 2010-07-21 12:57 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

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 possibility to connect to the computer small alphanumeric as well as graphic
displays, has always attracted some interest. These small devices are connected
to the computer and can be used to display system diagnostics like network
usage, RAM or disk usage or even to replace the usual monitor. Possible
applications can be found in embedded systems or clusters. These displays are
connected to the computer through serial lines, parallel ports and more recently
through USB connections. Appropriate programs in userspace gather the desired
information and output it on the display. However for this to work, the
userspace program has to implement some sort of display management, to determine
what must be displayed where. This has two major disadvantages. First. Every
userspace program willing to drive a display must solve the very same problems
(display scroll and refresh, for instance), resulting in an overall duplication
of code. Second. Display controllers usually require quite strict timings for
proper operation and it is not trivial neither efficient to obtain this in
userspace, whereas it is straightforward in kernel space through the usual delay
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
to some calls to the usual read/write/seek/ioctl routines. At the same time one
has the possibility to implement handling of escape sequences, thus opening the
way to standard applications based on the ncurses library.

LCD-Linux aims to be a complete VT102 terminal emulation in kernel space,
optimized for small alphanumeric and graphic displays. It consists of two
distinct pieces of software.

The first piece is the lcd-linux module in itself, implementing a (hopefully)
complete VT102 terminal with the addition of some custom escape sequences
specific to the world of small LCD displays. Care has been taken to avoid any
conflict between standard and custom escape sequences. A major feature of
lcd-linux is the possibility to define a virtual display geometry larger than
the physical one, so that one can use a small display as a normal 80x25 monitor
in an effective way. The layer takes care about display refresh and keeps the
cursor visible in a smart way. A second feature is the possibility to connect
more than one display (up to 256 different displays). Each display is assigned a
different minor number and is addressed individually. The lcd-linux module also
registers the appropriate major number character device and implements all the
relevant read/write/seek/ioctl functions allowed on the character device.
Finally it creates some /proc files for internal inspection, information and
diagnostics.

The second piece of software is the display driver, implementing all functions
that are controller specific. Each driver registers itself with the lcd-linux
layer and behaves like a 'slave' with respect to it. The interface between
lcd-linux and the display driver is kept as simple as possible and no assumption
is made by any of the two parts on the implementation of the other part. Ideally
there will be one module for each controller. At the current stage, the driver
for the Hitachi HD44780 (and compatibles) controller is fully implemented and
optimized. Drivers for other controllers can be written in an easy way thanks to
the standard interface provided by the lcd-linux layer.

The LCD-Linux project has been under development for several years and has now
reached a stable state. It has been succesfully compiled, tested and used on
different machines running Linux version 2.2, 2.4 and 2.6. The software can be
compiled as a module or compiled statically into the kernel. In the latter case,
the user can pass some parameters at boot time, to configure the display as soon
as possible during the boot sequence. The project comes with Documentation and
examples about how to use it.

LCD-Linux is released under the GNU General Public License version 2. The latest
release is available at the Sourceforge website:

http://lcd-linux.sourceforge.net/
http://prdownloads.sourceforge.net/lcd-linux/lcd-linux-0.13.9.tar.gz?download

The CVS version still includes some partial support for Linux 2.0 but this
support is considered obsolete and now abandoned in the official release.

The LCD4Linux (http://ssl.bulix.org/projects/lcd4linux/) project is known to
support LCD-Linux among the possible connection types.

I would appreciate some comments and feedback on the project. In view of the
potential applications, future developments and improvements of LCD-Linux, I
would also like to propose LCD-Linux for inclusion in the Linux kernel mainline.

Thank you for your attention.

With best regards,

Mattia Jona-Lasinio

(LCD-Linux project developer and maintainer)

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Introducing the LCD-Linux project
@ 2010-07-22 11:00 Mattia Jona-Lasinio
  0 siblings, 0 replies; 9+ messages in thread
From: Mattia Jona-Lasinio @ 2010-07-22 11:00 UTC (permalink / raw)
  To: linux-arm-kernel

Ben Pfaff <blp@cs.stanford.edu> writes:

> When I wanted to solve the same problem for a small
> serial-connected LCD panel (sold under the name EZIO), I wrote a
> program called "ezio-term" that has the same functionality but
> runs entirely in userspace.  It connects to the serial port and
> speaks the EZIO protocol on the serial port, and it creates a pty
> and acts like an ANSI terminal on that pty.  Thus, it translates
> back and forth between the two protocols.
>
> ezio-term also comes with a terminfo description that lets
> programs take advantage of the special features of the LCD panel.
> ezio-term also has the "virtual screen larger than physical
> screen" feature that you mention elsewhere, although it currently
> only implements an extra-wide screen, not an extra-tall one.

This is indeed a possibility. However, in my opinion, it always suffers
the same problems: if you change the display, you have to rewrite everything
from scratch since the protocol for a different display will be different.
The big problem is that there is no standard protocol or connection type for
these small devices; nothing comparable with the VGA standard, for example.
The idea is therefore to write a minimal terminal emulation for a general
abstract display so that the general question about WHAT has to be done
is solved once for all, pushing the question about HOW to do it in a very small
piece of code.

> ezio-term solves the first problem you mention.  I'm not sure I
> understand how the second one would come about across a serial or
> parallel or USB connection.

Hmmmm, you are probably right about serial and USB (which is in any case serial)
connections. But for parallel port connections the situation is
different, since you
speak directly with the display controller, so all timing issues are
up to you. For
instance the hd44780 needs timings in the microsecond range. How would you
obtain this in userspace without doing something like real time scheduling?
Of course you can also increase timing but the display refresh will be obviously
worse. In embedded systems these devices can be connected to GPIO lines. The
access is through memory mapped ports. In some sense this is similar to a
parallel port connection but still you are concerned with timing issues.

I downloaded your program and I'm going through it.

Regards,

Mattia

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

end of thread, other threads:[~2010-07-26 20:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-21 12:57 Introducing the LCD-Linux project Mattia Jona-Lasinio
2010-07-21 16:38 ` Ben Pfaff
2010-07-22 11:21 ` Alan Cox
2010-07-22 11:38   ` Geert Uytterhoeven
2010-07-24 10:31     ` Mattia Jona-Lasinio
2010-07-26 20:08     ` Geert Uytterhoeven
2010-07-22 19:19 ` Miguel Ojeda
2010-07-24  9:52   ` Mattia Jona-Lasinio
  -- strict thread matches above, loose matches on Subject: below --
2010-07-22 11:00 Mattia Jona-Lasinio

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).