EBC Exercise 19 DSS2 and sysfs

From eLinux.org
Revision as of 19:31, 17 July 2012 by Yoder (Talk | contribs)

Jump to: navigation, search

thumb‎ Embedded Linux Class by Mark A. Yoder


Here are some example DSS2 sysfs commands. Play around and see what you can learn.

Framebuffers

The framebuffers are in /sys/class/graphics/.

beagle$ ls -F /sys/class/graphics/
fb0@  fb1@  fb2@  fbcon@
beagle$ cd /sys/class/graphics/fb0
beagle$ ls -F
bits_per_pixel  dev      modes            pan        rotate_type  subsystem@
blank           device@  name             phys_addr  size         uevent
console         mirror   overlays         power/     state        virt_addr
cursor          mode     overlays_rotate  rotate     stride       virtual_size

Overlays, Managers and Displays

The overlays, managers and displays are in /sys/devices/platform/omapdss/

beagle$ cd /sys/devices/platform/omapdss/
beagle$ ls -F
display0@  manager1/                     overlay0/  subsystem@
display1@  microamps_requested_vdda_dac  overlay1/  uevent
driver@    microamps_requested_vdds_dsi  overlay2/
manager0/  modalias                      power/
beagle$ cd overlay0
beagle$ ls -F
enabled       input_size  name         position
global_alpha  manager     output_size  screen_width
beagle$ cat position
0,0
beagle$ cat manager
lcd
beagle$ cat output_size
640,480

Investigate mplayer

Start BigBuckBunny and discover how it uses DSS

beagle$ cd /sys/devices/platform/omapdss
beagle$ ls
beagle$ cd overlay0
beagle$ cat enabled

Repeat for overlay1 and 2, Which are being used? cd to it.

Play with scale and position

beagle$ cd /sys/devices/platform/omapdss/overlay2
beagle$ cat position
beagle$ echo 100,100 >  position
beagle$ cat output_size
beagle$ echo 320,400 > output_size

Try transparency

beagle$ echo 127 > global_alpha
beagle$ cd ../manager0
beagle$ echo 1 > alpha_blending_enabled
beagle$ echo 1 > trans_key_enabled
beagle$ echo 65535 > trans_key_value

Caution: You may have to disable an overlay before changing some values.

beagle$ echo “0” > $ovl0/enabled

Assignment

Note what you have learned in a short memo.

Challenge

Can you get mplayer to appear in two windows?




thumb‎ Embedded Linux Class by Mark A. Yoder