Subject: Re: set resolution on secondary fb (cgsix)
To: NetBSD port-sparc mailing list <port-sparc@netbsd.org>
From: Julian Coleman <jdc@coris.demon.co.uk>
List: port-sparc
Date: 08/31/2002 20:28:27
On Thu, Jul 11, 2002, Lubomir Sedlacik wrote:
> since cgsix framebuffers can be configured only in OBP, i searched the
> web for hints how to set resolution on secondary framebuffer and found
> something in well known Framebuffer FAQ:. the example looks this way:
> any hints how to set nvramrc properly to achieve $SUBJ are appreciated.
I thought I'd have a play with this [#], so I put a second framebuffer
in a Sparc 5 clone (Cycle 5 IP). Both framebuffers default to 1152x900,
so I tried to set the second to 1024x768. After about an hour, I came up
with (from the PROM prompt) :
nvedit
probe-all
" /iommu/sbus/cgsix@1" select-dev
r1024x768x60
" /iommu/sbus/cgsix@1" " set-resolution" execute-device-method
end-device
install-console
banner
^C
nvstore
setenv use-nvramrc? true
reset
On boot, it now shows :
cgsix0 at sbus0 slot 0 offset 0x0 level 9: SUNW, 501-2325, 1152x900, rev 11 (console)
cgsix0: attached to /dev/fb
cgsix1 at sbus0 slot 1 offset 0x0 level 9: SUNW, 501-2325, 1024x768, rev 11
While trying to get this working, I noticed :
you can type the commands at the PROM prompt to test them out
the nvrun command didn't appear to do anything, so you have to reset to
test any changes
the value of "fcode-debug?" doesn't affect running the contents of nvramrc
if you've made an error, you'll see the command with the error followed by
a '?' when you reset.
the double-quotes and the spaces before the device names and commands are
important.
when it's working, you'll know, as the reset will take longer (well, it
does on this machine, as there is a pause of a few seconds when setting a
resolution).
Explanation of nvramrc commands above :
probe-all
Probe all the devices, in order that you can select the framebuffer on
the next line ("probe-sbus" would probably suffice for this).
" /iommu/sbus/cgsix@1" select-dev
Select the relevant framebuffer device in the device tree. You must
be at a framebuffer node in order to run the command on the next line
r1024x768x60
Select a resolution
" /iommu/sbus/cgsix@1" " set-resolution" execute-device-method
Call the set-resolution method for this (framebuffer) device
end-device
Finished with device nodes
install-console
Setup the console
banner
Display the banner
Quick summary of nvedit commands :
^A move to beginning of line
^B move back one character
^C finish editing
^E move to end of line
^F move forward one character
^H delete previous character
^J insert new blank line after cursor position and move to new line
^K delete to end of line (at end of line, joins current and next lines)
^L display all lines
^M as ^J above
^N move to next line
^O insert new blank line after cursor position and stay on current line
^P move to previous line
Backspace as ^H above
Delete as ^H above
Return as ^M above
J
[#] because at some point I want to run with both cgfourteen @ 1280x1024 and
cgsix @ 1280x1024 on my 20.
--
My other computer also runs NetBSD
http://www.netbsd.org/