[SunHELP] How to change resolution on SUN

Dave Garten sunhelp at sunhelp.org
Tue Oct 23 07:52:43 CDT 2001


Joe Pampel <joe at ardsley.com> said:

> How can I tell what frame buffer I'm using?  Any help would be greatly 
appreciated!
> 

Joe,
This is dated realtive to more recent model frame buffers, but Sun has a 
tendancy to remain consistent over time with these techniques.  From the 
Frame Buffer FAQ (www.sunhelp.org/faq/FrameBuffer.html)...

How do I find what frame buffers I have available?
You can usually find out what frame buffers are available by looking in the 
directory /dev/fbs, or examining the output from dmesg. Most frame buffers 
announce themselves as cgnumber0, eg cgthree0, cgsix0, cgtwelve0. A digit 
other than zero indicates that either a second frame buffer is present or it 
has been moved from its original sbus slot.
cgthree Boring old unaccelerated cgthree. May also be a symlink to a more 
sophisticated device that is masquerading as a cgthree for backward 
compatibility.
cgsix GX family. See below.
cgtwelve GS. Older 24 bit frame buffer
cgfourteen SX. Newer, on-board 24 bit frame buffer
There are others, such as the cgeight, but they are by and large obsolete.
....
Another option is to use fbinfo, the Frame Buffer Info script. This uses the 
prtconf program to interrogate the system configuration. It displays 
information about all the frame buffers that the system knows about.
....
A third option is to interrogate the frame buffer using IOCTL calls.
WARNING! This is not recommended for several reasons: 

Any application that needs to know what kind of framebuffer it is running on 
is very likely broken, or will break in the future when new framebuffers come 
out. 
Not all ioctls defined in fbio.h are implemented for all sun framebuffers. 
Programs which call these should act as gracefully as possible when they 
fail. 
If you still want to go ahead, the approved method is to call 
VIS_GETIDENTIFIER to identify framebuffer. If VIS_GETIDENTIFIER fails you 
have an older framebuffer. Call FBIOGATTR or FBIOGTYPE and use the type field 
to identify the framebuffer using the #defines in fbio.h. Here is a sample 
program. Use at your own risk.

How do I work out if I have a GX, GX+, TGX or TGX+?
Run the following command: 
 dmesg | grep cg

You should see messages similar to this: 
cgsix0 at sbus0: SBus slot 2 0x0 SBus level 5 sparc ipl 9
cgsix0 is /iommu at f,e0000000/sbus at f,e0001000/cgsix at 2,0
cgsix0: screen 1152x900, single buffered, 1M mappable, rev 11
cgsix1 at sbus0: SBus slot 1 0x0 SBus level 5 sparc ipl 9
cgsix1 is /iommu at f,e0000000/sbus at f,e0001000/cgsix at 1,0
cgsix1: screen 1152x900, double buffered, 4M mappable, rev 6

If the rev number of the board is 11 or more then the board is a TGX/TGX+
If the rev number is 9 or less, then it is a GX/GX+
If you see the text single buffered, 1M mappable then it is a GX/TGX
if you see double buffered, 4M mappable then it is a GX+/TGX+
Thus, in the example above, cgsix0 is a TGX, while cgsix1 is a GX+

V/R

DG

-- 
Dave Garten
dgarten at nova dot org
dgarten at totalimage dot org





More information about the SunHELP mailing list