I've found answers for a few questions I asked previously, so I
figured I'd write them up here in case other people are trying the
same things. Some of this is probably obvious to a lot of you, but
since I'm still relatively new to playing with kernels in general and
the DSS in specific, I'm including all the stuff I had to collect and
understand from various documents. If you see anything I got wrong,
please correct me.
I also have a few more questions which I'll post separately.
I've been playing with Tomi's 2.6.29 DSS2 kernel ( from
http://www.bat.org/~tomba/git/linux-omap-dss.git ), and trying to
understand overlays, scaling, and other parts of it. So far, I have it
running at my desired 1024x768 resolution to a DVI monitor, I have
multiple framebuffers and overlays going, and some scaling. Everything
here is specific to that kernel, and will not work on the current
OE/Angstrom 2.6.28 kernel, which (at least right now) has a different
set of sysfs interfaces and kernel arguments.
To get 1024x768 with 3 framebuffers, I built the kernel with these
settings under Device Drivers/Graphics support/OMAP2/3 Display
Subsystem support (and the submenus):
VRAM size of 12 (OMAP2_DSS_VRAM_SIZE=12)
DSI Support=N (OMAP2_DSS_DSI=n)
Minimum FCK/PCK ratio of 0 (OMAP2_DSS_MIN_FCK_PER_PCK=0)
Debug support (OMAP2_DSS_DEBUG=y)
Number of Framebuffers = 3 (FB_OMAP2_NUM_FBS=3)
Debug support for OMAP2/3 FB = Y (FB_OMAP2_DEBUG_SUPPORT=y)
boot args for omap graphics:
omapfb.debug=y omapdss.debug=y omapdss.def_disp=dvi omapfb.test=y
omapfb.mode=dvi:1024x768MR-24@60 omapfb.vram=0:3M,1:3M,2:3M
These (in combination with the "debug" general kernel argument), do
the following:
turn on debugging printouts that are useful (omapfb.debug=y omapdss.debug=y)
make the default display the dvi (omapdss.def_disp=dvi)
turn on a test-pattern display for the framebuffers (omapfb.test=y)
set the video mode for the dvi display to 1024x768 at 60Hz and
tightened timings (omapfb.mode=dvi:1024x768MR-24@60)
allocated 3MB of memory for each of the 3 framebuffers
(omapfb.vram=0:3M,1:3M,2:3M)
Once the system is booted with this set of arguments, you should have
3 framebuffers which are the source bitmaps to be scaled, overlayed,
and placed on screen. You can control the scaling and positioning from
the shell using fbset and the sysfs (/sys) interface. This is
documented in Documentation/arm/OMAP/DSS, but I've added some more
examples below. They assume you start off with the standard connection
of fb0 -> overlay 0 -> manager 0/lcd and fb1 -> overlay 1 -> manager
0/lcd
If you have the test pattern generator turned on (via the
omapfb.test=y bootarg), you will see these effects as scaling and
positioning of the test patterns, or you can write your own data to
the framebuffers (I've been cat-ing raw 24bit bitmaps to the /dev/fb
devices as a quick and dirty way to get images onscreen, although
upside-down and backwards)
#first, define some handy shortcut variables
ovl0=/sys/devices/platform/omapdss/overlay0
ovl1=/sys/devices/platform/omapdss/overlay1
mgr0=/sys/devices/platform/omapdss/manager0
lcd=/sys/devices/platform/omapdss/display0
fb0=/sys/class/graphics/fb0
fb1=/sys/class/graphics/fb1
# turn on the display of fb1 (connected to overlay 1)
echo "1" > $ovl1/enabled
# to set scaling of fb1 to half-width horizontally
echo "512,768" > $ovl1/output_size
# to slide the scaled fb1 to the middle of the screen (so you'll see
it in the middle, with the fb0 image peeking through behind it on both
sides)
echo "256,0" > $ovl1/position
# run mplayer with video going to the scaled, positioned, and overlayed fb1
mplayer -vo fbdev:/dev/fb1 file.avi
You apparently can't scale the fb0/gfx overlay, as the OMAP doesn't
seem to have a scaler attached to it. But you can change the
resolution and position of it:
fbset -fb /dev/fb0 -xres 512 -yres 384
echo "100,100" > $ovl0/position
# to turn off the display, manager, and overlay (maybe required before
doing certain operations)
# also useful if things are messed up, you can fix the parameter that
caused the problem, turn everything off and then back on again
echo "0" > $lcd/enabled
echo "" > $mgr0/display
echo "0" > $ovl1/enabled
# to turn them all back on (useful after you've turned things off)
echo "1" > $ovl1/enabled
echo "dvi" > $mgr0/display
echo "1" > $lcd/enabled
So, that's what I've sorted out so far. I hope it is useful to someone
(or several someones).
Brett