Subject: Re: DEC Multia/166 Video Shift
To: The Terminator rAT <rat@cynical.org>
From: Chris G Demetriou <Chris_G_Demetriou@ux2.sp.cs.cmu.edu>
List: port-alpha
Date: 08/04/1996 19:05:53
> Greetings! I am the proud owner of a DEC Multia/166 running NetBSD 1.2A.
> The machine runs well, but the video output has three distinct horizontal
> offsets and widths. The Alpha is connected to a MAG 19" multisync monitor.
> I have adjusted the horizontal width and offset on the monitor to display
> the console correctly (i.e. full width and height and centered).
>
> When the machine is booted, the SRM console prompt appears offset to the
> left of the screen by several character widths, as is the initial boot
> loader output.
>
> After the NetBSD kernel changes the console to "Sun" mode, the text is
> shifted to the right a bit. The text of the boot messages is correctly
> centered on the screen (because I've adjusted the monitor to do so).
>
> Upon starting X, the X server screen extends off the left and right of the
> monitor screen. The change is large enough that I cannot adjust my monitor
> to fit the entire screen into the phosphor area.
>
> The vertical height/offset seems to remain unchanged through these three
> changes. The actual horizontal offset seems to vary slightly each time the
> machine is booted.
>
> I have tried playing with the '-dpi xxx' flag on the Xserver to attempt to
> fix this problem, without success. Without a '-dpi 100' switch, xdpyinfo
> returns a 90x90 dpi. This problem occurred both with my own machine, and
> also with the machine Jason Thorpe lent me (thanks!).
>
> Is anyone else seeing this problem? Can anyone suggest a fix for it? I'm
> really getting tired of playing with the offsets on the monitor everytime
> I switch between X, the console and the boot ROM.
I'm not entirely sure that I understand your problems, but the
difference between the way the kernel/X server and the console think
of the frame buffer is (from tga.c):
if ((dc->dc_regs[TGA_REG_VHCR] & 0x00000001) != 0 && /* XXX */
(dc->dc_regs[TGA_REG_VHCR] & 0x80000000) != 0) { /* XXX */
dc->dc_wid -= 4;
/*
* XXX XXX turning off 'odd' shouldn't be necesssary,
* XXX XXX but i can't make X work with the weird size.
*/
dc->dc_regs[TGA_REG_VHCR] &= ~0x80000001;
dc->dc_rowbytes =
dc->dc_wid * (dc->dc_tgaconf->tgac_phys_depth / 8);
}
The TGA has this nifty feature that apparently gains some speedups for
vertical lines (i think) by offsetting each row by 32 bits (4 pixels),
by including 4 pixels at the end of each row of frame buffer memory
that doen't appear on the screen.
The console firmware uses this feature. I couldn't figure out how to
get the generic CFB code in the X server to accomodate it on a 64-bit
system (it wanted the row size to be a multiple of 64 bits on a 64 bit
system), so i disabled it.
X and the kernel share the same space; adjust it for the X server (if
you can) and it should be fine for the kernel. (note that the sun
console font area MIGHT NOT reach the left and right sides of your
screen!)
As far as i know, changing the 'dpi' setting on the X server has no
real effect. (it may change font selection, or something, but i
dunno.) Your X server screen size will always be the size reported in
your boot messages, i.e. probably 1280 x 1024, if i remember your
dmesg output correctly.
I suppose the 'right way' to calibrate your monitor is something like:
(1) make the SRM console/boot block messages be close to the
left side of the screen (i.e. by adjusting left/right),
and then,
(2) make the kernel message window centered in the screen,
i.e. by using horizontal shrink/expand.
(3) repeat (1) and (2) until both are fine w/o adjustment.
Once both of those conditions are true at the same time (i figure that
2 might screw up 1, depending on your monitor), things should be
'right', and the X root weave should be more or less centered on your
display, and occupy the whole width of the display. "tweak to taste."
8-)
chris