Subject: Re: Pegasos frame buffer (was: map_isa_ioregs)
To: None <frank@hasenbraten.de>
From: Matt Sealey <matt@genesi-usa.com>
List: port-ofppc
Date: 11/11/2007 17:48:37
Frank Wille wrote:
> Tim Rightnour wrote:
> 
>> Well.. thats actually rather useful. You can get genfb somewhat working by
>> just issuing the fb8-install command, and *then* copy the screen-width and
>> screen-height values out with the copyprops() function. (obviously you
>> would check first if they were zero, and if they are, then run
>> fb8-install, that way you can override it at the prom before boot).
>>
>> That will give us a reasonable default that should work for genfb.
> 
> No, unfortunately this will never work, even if we had all the values (where
> is the frame-buffer address?).
> 
> I tried it first with hardcoding width, height, depth and fb-addr in
> genfb_init(), and the driver thinks it is working, but not really. The
> display is still in text mode and not in frame-buffer mode, and I see no way
> to switch that on the Pegasos. :|
> 
> Another problem would have been copyprops(), which thinks that the
> console_node must have "pci" as parent, which is also not the case here.
> console_node is "/bootconsole", which has no parent.

If you must mess around and need a graphical framebuffer, try this;

1) boot the system
2) somewhere in NetBSD, use vesa-set-mode with the correct value for the
    required framebuffer console mode
3) vesa-frame-buffer-adr will report the address, set the framebuffer address
    in the display node if you need to keep it around
4) set the required properties (width, height) in the display node

It's probably best not to use the VESA stuff outside of the OF console
(i.e. ofwboot, or a forth script, or manually typing it) and using it
forfeits your use of the text mode console and the tty emulator so you
must have a framebuffer console (wscons?) available.

By some magic you MAY have something working as a framebuffer here that you
can write pixel data to (if you use 8-bit modes, you will be on easy street
as there is no good way to bring back byte order or DDC/EDID data)

Ignore fb8-install and just write to the framebuffer address, assume that
screen width == line pitch. Attach wscons to it somehow and you are going
to be very happy bunnies.

Alternatively ofcons should Just Work (tm) on a serial console or VGA
console (device_type == serial) and you needn't worry about anything here.
Do the read/write methods not work or something or are you just being
obtuse about how you want to do things?

-- 
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations