Subject: Re: console mode switching (was:'direct' VRAM access, how ?)
To: Peter Berg <Peter.Berg@ww.tu-freiberg.de>
From: Robert Black <r.black@ic.ac.uk>
List: port-arm32
Date: 03/04/1997 17:35:07
On Mar 1,  1:38pm, Peter Berg wrote:
> Subject: console mode switching (was:'direct' VRAM access, how ?)
> > > But how can I determine the address of the upper left edge of the screen
?
> > > The address I get from the mmap call is somewhere on the screen.
> > > Are there any ioctl's to set a specified video mode e.g. x800y600c36k ?
> >
> > there is in vidcconsle.c - see sys/arch/arm32/dev/console/vidcconsole.c at
> > approx line 1580, and sys/arch/arm32/include/vconsole.h at approx line 250
>
> I did. As far as good, the video mode setting now works, but not correct. It
> has the same problem as the setvideo command. The new video mode is set (if I
> start X then it starts in the mode set by my program) *but* if I don't start
X
> the console *never* switches into the new mode ?!? Why ???
>
> Rob: How do you switch to the video mode set by the ioctl in the X-server ?

Right, you have to issue the mode change ioctl to ttyv? where ? is the number
of your virtual terminal, however you need to mmap /dev/vidcvideo0 (equivalent
to ttyv8). Don't ask me why - IMHO this is broken behaviour.

One extra word of warning on portability. As you have no doubt noticed there
are problems with some video modes not syncing correctly. This problem seems to
get worse in high bpp modes and it affects 1Meg VRAM machines more than 2Meg
VRAM machines. Again, this is because the console code is broken. I have yet to
meet anyone who has managed to get 16bpp X running on a 1Meg VRAM machine.

Cheers

Rob