[Xorg-driver-geode] Using scaling mode
Jordan Crouse
jordan.crouse at amd.com
Thu Aug 7 11:31:38 PDT 2008
I was asked to say a few words on how to test the panel
scaling feature.
First of all, you need a TFT panel, meaning something not
attached to the VGA port. If you have an XO, then you
have a TFT panel, others, check your hardware.
Scaling is a pretty easy concept - we use a set of static
timings for the panel and modify the source width and height
of the framebuffer as needed. The hardware does the rest.
The caveat here is that we need to establish what the static
timings for the panel are. This is done in one of three ways:
1) It is determined automatically from the BIOS
2) A XO DCON is detected
3) It is manually specified
The first two ways Just Work (TM). The third way involves the
usage of the PanelMode option that I alluded to in my previous
email:
Option "PanelMode" "clock hactive hsstart hsend htotal
vactive vsstart vsend vtotal"
Once the panel mode is specified, then all the modes in X will
be scaled to that mode. You can change the mode with the xrandr
utility. The following is the output from my system with a 1024x768
panel attached:
me at geodelx:~# xrandr
Screen 0: minimum 320 x 240, current 800 x 600, maximum 1024 x 1024
default connected 800x600+0+0 0mm x 0mm
1024x768 60.0
800x600 60.0*
640x480 60.0
512x384 60.0
400x300 60.0
320x240 60.0
1024x1024 60.0
The 1024x768 is the native mode determined automatically. The other modes
are "default" resolutions inserted by the X server. To change a mode,
its as easy as this:
xrandr --output default --mode <mode>
So to scale a 800x600 screen to 1024x768, you do this:
xrandr --output default --mode 800x600
Now, you might not see a mode in the list that meets your fancy. You can
add a "pseudo" mode to xrandr like so:
xrandr --newmode <name> <clock MHz>
<hdisp> <hsync-start> <hsync-end> <htotal>
<vdisp> <vsync-start> <vsync-end> <vtotal>
[+HSync] [-HSync] [+VSync] [-VSync]
And attach them to the default output with:
xrandr --addmode default <name>
You can specify any resolution you want - just specify the width (hdisp)
and height (vdisp) entries - the rest of the entries can be 0.
For now, we only do full screen scaling - later, I might add centering
if people are interested.
That should be plenty to get you started - questions of course are
welcome.
Jordan
--
Jordan Crouse
Systems Software Development Engineer
Advanced Micro Devices, Inc.
More information about the Xorg-driver-geode
mailing list