Please note that User Registration has been temporarily disabled due to a recent increase in automated registrations. If anyone needs an account, please request one here: RequestAccount. Thanks for your patience!--Wmat (talk)
Please email User:Wmat if you experience any issues with the Request Account form.

Difference between revisions of "EBC Exercise 19 DSS2 and sysfs"

From eLinux.org
Jump to: navigation, search
m (Initial page)
 
m (Added 3.2 Boris)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Category:ECE497]]
 
[[Category:ECE497]]
 +
{{YoderHead}}
  
* DSS2 uses sysfs
+
{{EBC3.2}}Here are some example DSS2 sysfs commands that run on the Beagle xM running the 3.2 kernel. (No BeagleBone Black version yet.)
* The framebuffers are in /sys/class/graphics/
+
 
 +
Play around and see what you can learn.
 +
 
 +
=== Framebuffers ===
 +
 
 +
The framebuffers are in '''/sys/class/graphics/'''.
 
  beagle$ '''ls -F /sys/class/graphics/'''
 
  beagle$ '''ls -F /sys/class/graphics/'''
 
  fb0@  fb1@  fb2@  fbcon@
 
  fb0@  fb1@  fb2@  fbcon@
Line 12: Line 18:
 
  cursor          mode    overlays_rotate  rotate    stride      virtual_size
 
  cursor          mode    overlays_rotate  rotate    stride      virtual_size
  
 +
===  Overlays, Managers and Displays ===
 
The overlays, managers and displays are in '''/sys/devices/platform/omapdss/'''
 
The overlays, managers and displays are in '''/sys/devices/platform/omapdss/'''
 
  beagle$ '''cd /sys/devices/platform/omapdss/'''
 
  beagle$ '''cd /sys/devices/platform/omapdss/'''
Line 24: Line 31:
 
  enabled      input_size  name        position
 
  enabled      input_size  name        position
 
  global_alpha  manager    output_size  screen_width
 
  global_alpha  manager    output_size  screen_width
  beagle$ cat position
+
  beagle$ '''cat position'''
0,0
+
0,0
# cat manager
+
beagle$ '''cat manager'''
lcd
+
lcd
# cat output_size
+
beagle$ '''cat output_size'''
640,480
+
640,480
 +
 
 +
=== Investigate mplayer ===
 +
 
 +
Load Big Buck Bunny.  This took some 3 minutes for me.
 +
beagle$ '''cd exercises/gstreamer'''
 +
beagle$ '''git clone git://github.com/MarkAYoder/esc-media.git'''
 +
beagle$ '''cd esc-media'''
 +
 
 +
Now, start Big Buck Bunny and discover how it uses DSS
 +
beagle$ '''mplayer BigBuckBunny_640x360.m4v'''
 +
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'''
 +
 
 +
=== <span style="color:green">Assignment</span> ===
 +
<span style="color:green">Note what you have learned in a short memo.</span>
 +
 
 +
==== Challenge ====
 +
 
 +
Can you get mplayer to appear in two windows?
 +
 
 +
{{YoderFoot}}

Latest revision as of 15:15, 1 August 2013

thumb‎ Embedded Linux Class by Mark A. Yoder


3.2 Kernel‎

Here are some example DSS2 sysfs commands that run on the Beagle xM running the 3.2 kernel. (No BeagleBone Black version yet.)

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

Load Big Buck Bunny. This took some 3 minutes for me.

beagle$ cd exercises/gstreamer
beagle$ git clone git://github.com/MarkAYoder/esc-media.git
beagle$ cd esc-media

Now, start Big Buck Bunny and discover how it uses DSS

beagle$ mplayer BigBuckBunny_640x360.m4v
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