[PATCH] Frame buffer device driver updates (fwd)

Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be)
Wed, 24 Feb 1999 22:43:36 +0100 (CET)


Mere mortals don't receive large patches by mail, but can download them from

http://www.cs.kuleuven.ac.be/~geert/bin/video-2-2-2.diff.gz

---------- Forwarded message ----------
Date: Wed, 24 Feb 1999 22:41:56 +0100 (CET)
From: Geert Uytterhoeven <geert@thomas.kotnet.org>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Geert Uytterhoeven <Geert.Uytterhoeven@cs.kuleuven.ac.be>
Subject: [PATCH] Frame buffer device driver updates

Hi Linus,

Here are a lot of updates for the frame buffer code. All patches are relative
to Linux 2.2.2. I sorted them in order of decreasing importance, hence the
major showstoppers are listed first.

- Fixes for fatal bugs (system lock up):

o panning.diff

`Brown paper bag' fix from Petr Vandrovec: setting `vyres < 2*yres'
with ypan crashed the system.

o scrollback.diff (please apply _after_ panning.diff!)

The current combination of frame buffer console scrollback code and
penguin logo code is a strange hack. It doesn't work well on some
machines. This patch (by Jakub Jelinek) cleans up that part of the
fbcon code. The patch also solved some mysterious crashes during boot
up on some PowerMac models.

Jakub's original readme:

| I have noticed current vcs* access code does no longer honour the viewed
| argument (ie. /dev/vcs{,a}0 should be visible part, while /dev/vcs{,a}[1-n]
| should be the last vc_rows in the buffer - what is visible if no scrollback
| is active). This is fixed by the first hunk.
|
| Additionally, I've removed the scrolling hacks in fbcon made by K. Garloff,
| which are reported by Geert to cause strange effects on TGA, plus don't
| have the desired effect on any framebuffers where panning/wrapping cannot
| work or is not active (e.g. all SBUS cards, plus several others) and
| implemented a scrollback for fbcon which actually works (in the contrary to
| the hack fbcon has currently where user can sometimes Shift+PgUp upwards
| (depending on what framebuffer he has and what resolution he uses), but
| cannot do selection there nor move mouse.
|
| The software scrollback (adjustable by user on kernel command line,
| defaulting to 32k buffer if fbcon is detected (ie. won't take any memory if
| vgacon is the only one used)) is nearly completely internal to fbcon.c,
| with the exception of the vcs reading/writing, where it had to be changed,
| so that it looks at screenpos at the beginning like it used to, and on
| every line end, as the fbcon scrollback now has contiguos lines, but not
| necessarily different lines following each other are in a contiguous
| buffer. The advantage of this is that a scroll up will cost additionally
| only a copy of one single row of ushorts (that's much less than even the
| actual move of the virtual text screen upwards, and even that's much less
| then redrawing the screen actually).

- Fixes for non-fatal bugs (unusable subsystems, but no system lock up):

o scr_readw_endianness.diff

There exists an endianness bug in the frame buffer console code.

All accesses to the VT buffers by the high level console code are done
using the scr_{read,write}w() inline functions. For performance
reasons, these functions use native byte ordering, except when using
VGA text mode on big endian hardware (we want to keep the VT buffer for
the current VT in the memory on the graphics board, so it has to be in
little endian ordering).

However, the frame buffer console code assumes the VT buffer is always
in native byte ordering. This didn't cause any problems until recently,
when people started using both vgacon and fbcon at the same time on PPC
boxes, causing a corrupted display (character and attribute data
exchanged) and an unusable console.

This updates all frame buffer code to use scr_readw() to access the
passed character/attribute strings in the various *_putcs() functions.
Since 'scr_readw(s)' is an inline equivalent of '*s' in the common
case, this doesn't cause any performance penalty nor change of
behavior. The only exception is the case where both vgacon and fbcon
are used on a big endian machine.

- Other fixes:

o scr_readw_const.diff

This patch adds the `const' keyword to all pointers passed to the read
access functions for VT buffers. This patch is a sanity fix.

o atyfb.diff

Misc updates for the ATI Mach64 frame buffer devices (by Paul
Mackerras, Benjamin Herrenschmidt and me):

o fix table with PCI IDs (copy-'n-paste is evil :-)
o ATI Mach64 RAGE IIC (used in the iMac) needs bit 4 set in DAC_CNTL,
just like the other RAGE chips
o disable/enable backlight on PowerBooks together with screen
blanking

o blanking.diff

Fix `hard' blanking (by clearing the screen) for displays that support
ywrap or ypan. (by Petr Vandrovec)

o cgsixfb.diff

Bug fix: wait for the cgsix when switching modes, no more watchdog
(by Eddie C. Dost)

o controlfb.diff

Fixes for controlfb (PowerMac `Control' video hardware) (by Dan
Jacobowitz)

o creator.diff

Fixes for creatorfb:

- Avoid race condition when VT switching (By David S. Miller)
- Speed optimizations (by Jakub Jelinek)

o m68k.diff

Sync with Jes Sørensen's Linux/m68k tree.

- atafb (Atari frame buffer device) misc updates
- retz3 (Retina Z3 graphics board for Amiga) misc updates (m68k/PPC
only)
- virgefb (Cybervision 64/3D graphics board for Amiga): add support
for 16 bpp (m68k/PPC only)

o phys_to_virt.diff

We must not use phys_to_virt() on memory mapped I/O regions. Hence the
frame buffer device itself must fill in the virtual address of the
frame buffer memory.

o pm2fb.diff

Updates for pm2fb (Permedia 2 frame buffer device):

- Add support for PCI probing. Now it works on ia32 and AXP. More
archs to follow.
- Many misc fixes.
(by Ilario Nardinocchi)

o promcon.diff

Allow promcon to be compiled in when fbcon is not included. (by Jakub
Jelinek)

o sun_accel_id.diff

Add acceleration IDs for various Sun frame buffers (by Jakub Jelinek).

o vesafb.diff

If people try to change the video mode, warn them once that vesafb
doesn't support changing the video mode after boot up. I hope this
makes me get less support calls.

- New frame buffer devices:

o new_fb.diff

- fm2fb: BSC FrameMaster II/Rainbow II video board (Amiga (m68k/PPC)
only) (by Steffen A. Mork and me)

- q40fb: Q40 builtin graphics. The Q40 is a new m68k box (yes, m68k
is alive!) based on the old Sinclair Quantum Leap design, but using
a MC68060 instead of a MC68008. (by Richard Zidlicky)

Thanks for applying these patches to your tree! It took me a lot of time to
split the large patch I had in little pieces and document them.

Greetings,

Geert

--
Geert Uytterhoeven                   Geert.Uytterhoeven@cs.kuleuven.ac.be
Linux/m68k on Amiga, Wavelets        http://www.cs.kuleuven.ac.be/~geert/
KotNET@Thomas Network Administration -- Make your bed part of Cyberspace!!

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/