Bootargs for enabling display
From OMAPpedia
This articles talks about bootargs required to be added for enabling DSS. Starting with 2.6.34 (or L24.7) although DSS is enabled in defconfig, one needs to add some boot arguments to enable display and see penguin logos at the bootup time (skip to 27 min:14sec)
[edit] Basic usage
[edit] Enabling basic display with bootargs
Note: if using omapdrm instead of omapfb then no bootargs are required. The driver will automatically enable all displays that are detected at boot time, and configure a resolution based on the capabilities of the monitor (ie. for DVI/HDMI, based on the EDID). For more control, see the KernelModeSetting page on the nouveau wiki, in particular scroll down to the 'Forcing Modes' section. It is not recommended to change DSS overlay->manager->dssdev routing via sysfs as described below, as it will likely confuse the driver and/or userspace processes using KMS API. (In fact there should arguably be a kernel build option to make omapdss sysfs read-only.) Instead the drm/kms provided API should be used for configuring display routing.
This should be added, if display is to be enabled. By default this value is set to zero:
vram=10M
The size of each frambuffer device can be specified:
omapfb.vram=0:2M,1:5M
In this case fb0 = 2M and fb1 = 5M. A maximum of 3 fb devices can be created. If the size is not specified, frame buffers with default size are created. Each fb device will have a size of display resolution * 4 (32 bpp).
[edit] Advanced users
Sysfs entries and bootargs provided by DSS2.
OMAP Display OMAP-FRAMEBUFFER
[edit] General sysfs entries for FB[edit] Mirrorring and Rotation of OMAPFBTo use these sysfs we need to allocate VRFB in OMAP3 and TILER in OMAP4. This must be specified at the boot time through bootargs. For example: Please pass omapfb.tiler=y through bootargs if you wish to use rotation feature through bootargs.
echo "1" > /sys/class/graphics/fb0/mirror
echo "0" > /sys/class/graphics/fb0/mirror
cat /sys/class/graphics/fb0/rotate_type
[edit] Blanking and unblanking FB
echo "1" > /sys/class/graphics/fb0/blank
echo "0" > /sys/class/graphics/fb0/blank [edit] Setting fb0 to more than one overlays
echo "0" > /sys/class/graphics/fb0/overlays
echo "1" > /sys/class/graphics/fb0/overlays
echo "0,1" > /sys/class/graphics/fb0/overlays [edit] Cloning contents of fb0 to LCD and 2LCD
[edit] Reading fb attributes
cat /sys/class/graphics/fb0/phys_addr - If we are using normal SDRAM buffer the address is generally of the range: 0x8XXXXXXX - If we pass omapfb.tiler=y in bootargs, TILER buffer is allocated. And we get phys_addr = 0x68000000 to 0x7FFFFFFF
cat /sys/class/graphics/fb0/virt_addr
cat /sys/class/graphics/fb0/size |
OMAP Display OVERLAYS
Overlay here means a software overlay. In hardware it is called as pipeline. -- Number of overlays for OMAP4: 4 [edit] Set overlay properties
echo "1" > /sys/devices/platform/omapdss/overlay0/enabled
echo "0" > /sys/devices/platform/omapdss/overlay0/enabled An overlay should be enabled if you want to see something on it. [edit] Reading overlay properties
cat /sys/devices/platform/omapdss/overlay0/input_size
cat /sys/devices/platform/omapdss/overlay0/name
cat /sys/devices/platform/omapdss/overlay0/output_size
cat /sys/devices/platform/omapdss/overlay0/position
cat /sys/devices/platform/omapdss/overlay0/screen_width
cat /sys/devices/platform/omapdss/overlay0/global_alpha [edit] Set overlay's manager
echo "0" > /sys/devices/platform/omapdss/overlay0/enabled echo "lcd" > /sys/devices/platform/omapdss/overlay0/manager echo "1" > /sys/devices/platform/omapdss/overlay0/enabled |
OMAP Display MANAGER
-- Number of managers for OMAP3 = 2 manager0: lcd manager1: tv -- Number of managers for OMAP4 = 3 manager0: lcd manager1: tv manager2: 2lcd [edit] Read manager attributes
cat /sys/devices/platform/omapdss/manager0/display cat /sys/devices/platform/omapdss/manager0/name This would give a name from the list above (lcd, tv) [edit] Set manager properties alpha-blending, transparency key
echo "1" > /sys/devices/platform/omapdss/manager0/alpha_blending_enabled
echo "1" > /sys/devices/platform/omapdss/manager0/trans_key_enabled [edit] Setting alpha-blending for seeing three videos simultaneously one over the otherBy default all overlays are pointing to the manager lcd
echo "1" > /sys/devices/platform/omapdss/manager0/alpha_blending_enabled
echo "50" > /sys/devices/platform/omapdss/overlay1/global_alpha echo "150" > /sys/devices/platform/omapdss/overlay2/global_alpha echo "200" > /sys/devices/platform/omapdss/overlay3/global_alpha Then run the video.
echo 1 > /sys/devices/platform/omapdss/manager0/trans_key_enabled echo |
[edit] Zorder of an overlay [Specific to OMAP4 Not Applicable to OMAP3]
An object with a Z-order of 1 would be visually "underneath" an object with a Z-order of 2 or greater.
The default zorders are:
- Overlay 0 -> 0
- Overlay 1 -> 1
- Overlay 2 -> 2
- Overlay 3 -> 3
To change the zorder the following command can be used:
# Make GFX topmost: echo "3" > /sys/devices/platform/omapdss/overlay0/zorder
[edit] Enabling/Disabling display
- Enable or disable display (0=off, 1=on):
echo "1" > /sys/devices/platform/omapdss/display0/enabled
- Reading the name of display0:
cat /sys/devices/platform/omapdss/display0/name
- Setting rotation angle of display0 (0=0°; 1=90°; 2=180°; 3=270°)
# Set rotation to 180: echo "2" > /sys/devices/platform/omapdss/display0/rotate
- Reading timing values of display0:
Display timings include: pixclock,xres/hfp/hbp/hsw,yres/vfp/vbp/vsw.
cat /sys/devices/platform/omapdss/display0/timings
- Reading panel-name of display0:
cat /sys/devices/platform/omapdss/display0/panel_name
[edit] Setting tear-elimination of display0 to ON or OFF [Specific to OMAP4 DSI]
echo "0" > /sys/devices/platform/omapdss/display0/tear_elim
[edit] Scenario for moving contents from primary LCD to secondary LCD [Specific to OMAP4]
By default overlay0 is connected to display0 (primary LCD), and overlay1 is connected to display1 which is secondary LCD.
# Enable secondary LCD echo "1" > /sys/devices/platform/omapdss/display1/enabled # Disable overlay1 which is connected to secondary LCD echo "0" > /sys/devices/platform/omapdss/overlay1/enabled # Disable overlay0 (an overlay must be disabled before changing its properties) echo "0" > /sys/devices/platform/omapdss/overlay0/enabled # Set the manager of overlay0 to display1 which is secondary LCD echo "2lcd" > /sys/devices/platform/omapdss/overlay0/manager # Enable overlay0 which is now directed to the secondary LCD echo "1" > /sys/devices/platform/omapdss/overlay0/enabled
And content on primary LCD would be transferred to secondary LCD.
- Sample script to allow movement of video overlays across different displays is shared here.
[edit] Scenario for swapping contents between primary LCD and secondary LCD [Specific to OMAP4]
By default overlay0 is connected to display0 (primary lcd) and overlay1 is connected to display1 which is (secondary lcd)
# Enable primary LCD: echo "1" > /sys/devices/platform/omapdss/display0/enabled # Enable secondary LCD: echo "1" > /sys/devices/platform/omapdss/display1/enabled # Disable overlay0 (n overlay must be disabled before changing its properties): echo "0" > /sys/devices/platform/omapdss/overlay0/enabled # Set the manager of overlay0 to display1 which is secondary LCD: echo "2lcd" > /sys/devices/platform/omapdss/overlay0/manager # Enable overlay0: echo "1" > /sys/devices/platform/omapdss/overlay0/enabled # Disable overlay1 (an overlay must be disabled before changing its properties): echo "0" > /sys/devices/platform/omapdss/overlay1/enabled # Set the manager of overlay1 to display0 which is primary LCD: echo "lcd" > /sys/devices/platform/omapdss/overlay0/manager # Enable overlay1: echo "1" > /sys/devices/platform/omapdss/overlay0/enabled # Turn off primary display (display0) echo "0" > /sys/devices/platform/omapdss/display0/enabled
And content on primary LCD would be transferred to secondary LCD.
- example C program for swapping overlays is available
[edit] Standard Display Resolutions
[edit] Scenario for switching contents from secondary LCD to Pico-DLP [Specific to OMAP4]
(This needs to be done till 24.10 do not enable this option for L24.11)
This is needed in kernel configuration (with `make menuconfig`):
Device Drivers ---> Graphics support ---> -*- OMAP2/3/4 Display Subsystem support (EXPERIMENTAL) ----> [*] Use DSI PLL for PCLK (EXPERIMENTAL)
# Disable secondary LCD if enabled. echo "0" > /sys/devices/platform/omapdss/display1/enabled # Set the secondary manager to Pico-DLP echo "pico_DLP" > /sys/devices/platform/omapdss/manager2/display # Enable Pico-DLP echo "1" > /sys/devices/platform/omapdss/display3/enabled
This will switch all the overlay associated with secondary LCD to Pico-DLP.
[edit] OMAP4 HDMI
[edit] Scenario for moving contents from primary-lcd to HDMI
# Enable HDMI echo "1" > /sys/devices/platform/omapdss/display2/enabled # Disable overlay0 (an overlay must be disabled before changing its properties) echo "0" > /sys/devices/platform/omapdss/overlay0/enabled # Set the manager of overlay0 to display2 which is HDMI echo "tv" > /sys/devices/platform/omapdss/overlay0/manager # Enable overlay0 echo "1" > /sys/devices/platform/omapdss/overlay0/enabled
And content on overlay 0 of primary lcd would be transferred to HDMI.It works similarly for all other overlay's.
[edit] How to enable HDMI in hot-plug detect mode
Enable HDMI in hot-plug detect mode:
echo 1 > /sys/devices/platform/omapdss/display2/hpd_enabled
Once you do this you should be able to plug in or plug out the HDMI cable and when plugged in it will detect and set the timing to default value ie set.
[edit] How to read and set EDID timings for HDMI
kernel before 3.0 Display all the supported EDID timings and audio/video formats supported (if extended bit is present):
cat /sys/devices/platform/omapdss/display2/custom_edid_timing
Set one of the displayed EDID timing supported by the TV:
echo 41 > /sys/devices/platform/omapdss/display2/custom_edid_timing
In order to set HDMI timing 4 then set 41, append 0 or 1 based on whether it is a DVI/HDMI respectively.
echo 160 > /sys/devices/platform/omapdss/display2/custom_edid_timings
To set the timing to 1280 1024 for a DVI monitor code will be 16 (hexadecimal value of 0x10) and mode will be 0 for DVI.
For kernel after 3.0
Set one of the timing supported by the TV:
echo "pixel_clock,x_res/hfp/hbp/hsw,y_res/vfp/vbp/vsw" > /sys/devices/platform/omapdss/display1/timings
For ex: To set 640 * 480 VGA resolution.
echo " 25175,640/16/48/96,480/11/31/2" > /sys/devices/platform/omapdss/display1/timings
Find the timing information in the HDMI 1.3 specification.For some of the VESA resolution refer to the below mentioned details
Code Mode Timing values Refresh Rate 4(0x4) 0 {640, 480, 25175, 96, 16, 48, 2 , 11, 31} 60Hz 9(0x9) 0 {800, 600, 40000, 128, 40, 88, 4 , 1, 23} 60Hz 14(0xE) 0 {848, 480, 33750, 112, 16, 112, 8 , 6, 23} 60Hz 23(0x17) 0 {1280, 768, 71000, 128, 64, 192, 7 , 3, 20} 60Hz 28(0x1C) 0 {1280, 800, 83500, 128, 72, 200, 6 , 3, 22} 60Hz 39(0x27) 0 {1360, 768, 85500, 112, 64, 256, 6 , 3, 18} 60Hz 32(0x20) 0 {1280, 960, 108000, 112, 96, 312, 3 , 1, 36} 60Hz 35(0x23) 0 {1280, 1024, 108000, 112, 48, 248, 3 , 1, 38} 60Hz 16(0x10) 0 {1024, 768, 65000, 136, 24, 160, 6, 3, 29} 60Hz 42(0x2A) 0 {1400, 1050, 121750, 144, 88, 232, 4, 3, 32} 60Hz 47(0x2F) 0 {1440, 900, 106500, 152, 80, 232, 6, 3, 25} 60Hz 58(0x3A) 0 {1680, 1050, 146250, 176 , 104, 280, 6, 3, 30} 60Hz 81(0x51) 0 {1366, 768, 85500, 143, 70, 213, 3, 3, 24} 60Hz 82(0x52) 0 {1920, 1080, 148500, 44, 88, 80, 5, 4, 36} 60Hz 22(0x16) 0 {1280, 768, 68250, 32, 48, 80, 7, 3, 12} 60Hz 41(0x29) 0 {1400, 1050, 101000, 32, 48, 80, 4, 3, 23} 60Hz 57(0x39) 0 {1680, 1050, 119000, 32, 48, 80, 6, 3, 21} 60Hz 1 1 {640, 480, 25200, 96, 16, 48, 2, 10, 33} 60Hz 19 1 {1280, 720, 74250, 40, 440, 220, 5, 5, 20} 50Hz 4 1 {1280, 720, 74250, 40, 110, 220, 5, 5, 20} 59.94HZ 2 1 {720, 480, 27000, 62, 16, 60, 6, 9, 30} 59.94HZ 37 1 {2880, 576, 108000, 256, 48, 272, 5, 5, 39} 50HZ 6 1 {1440, 480, 27000, 124, 38, 114, 3, 4, 15} 59.94Hz 21 1 {1440, 576, 27000, 126, 24, 138, 3, 2, 19} 50Hz 20 1 {1920, 1080, 74250, 44, 528, 148, 2, 5, 15} 50Hz 5 1 {1920, 1080, 74250, 44, 88, 148, 2, 5, 15} 60Hz 16 1 {1920, 1080, 148500, 44, 88, 148, 5, 4, 36} 60Hz 17 1 {720, 576, 27000, 64, 12, 68, 5, 5, 39} 50Hz 29 1 {1440, 576, 54000, 128, 24, 136, 5, 5, 39} 50Hz 31 1 {1920, 1080, 148500, 44, 528, 148, 5, 4, 36} 50Hz 35 1 {2880, 480, 108000, 248, 64, 240, 6, 9, 30} 59.94Hz
- Please Note that mode is equally important in setting the timing thus mode has to be appended to the code while setting the timing value through sysfs.*
[edit] How to profile HDMI EVENSYNC
Apply this patch and enable and disable HDMI , When disabled it will print the statistics of Number of framedone EVENSYNC IRQ's recieved in the us displayed: HDMI profiling patch
- Trans color key
echo 1 > /sys/devices/platform/omapdss/manager0/trans_key_enabled echo> sys/devices/platform/omapdss/manager0/trans_key_type echo 16777215 > sys/devices/platform/omapdss/manager0/trans_key_ value (16777215 for white )(FF0000 to get red)
There are also some debugfs files at
[edit] OMAP3 HDMI
Work In Progress
[edit] How to deal with display blanking
- Unblanking display
echo "0" > /sys/class/graphics/fb0/blank echo "0" > /sys/class/graphics/fb1/blank
- Disabling blanking with Penguin UI
Append consoleblank=0 in your booargs
- Disabling blanking with Ubuntu UI
killall gnome-screensaver export DISPLAY=:0.0 xset s off xset –dpms
- More on display Blanking (From Ubuntu wiki)
http://omappedia.org/wiki/Ubuntu_Known_Issues#Screen_Blanking
[edit] DSS specific bootargs
DSS specific bootargs
consoleblank=
vram=
omapfb.mode=
omapfb.vram=
omapfb.debug=
omapfb.test=
omapfb.vrfb=
omapfb.rotate=
omapfb.mirror=
omapdss.def_disp=
omapdss.debug=
panel-taal.dsi_te_sync=<1|0> - Enables synchronization with Panel-Taal's tearing interrupt. The value is 1 by default.
This holds only for L24.8 release or earlier. Auto detection for TV is enabled post L24.8. omapdss.hdmicode = {Timing value supported by the TV} omapdss.hdmimode = {Mode DVI or HDMI depending on the timing} - By default the value of hdmicode = 16 {1080p} and hdmimode = 1 {HDMI mode} is taken. |