Using scaling mode
jordan.crouse at amd.com
Thu Aug 7 14:31:38 EDT 2008
I was asked to say a few words on how to test the panel
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
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
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
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
Systems Software Development Engineer
Advanced Micro Devices, Inc.
More information about the Devel