These properties, if described in the device tree, will be represented as DRM plane properties. To understand more about these capabilities, please refer to the Video Mixer Product Guide [PG243].
Additionally, the Video Mixer supports generation of solid background color when either the AXI streaming input is not connected or the layer is otherwise disabled. On initialization, this color is programmed to default to blue. The color may be configured using a value representing packed RGB little-endian format via the DRM plane property bg_color. This property is attached to the primary plane.
Test Procedure
To verify the proper configuration and operation of the IP, a suitable hardware design will need to include at a minimum:
1) Video DMA IP to supply an input stream to the Mixer IP (layer 0) (e.g. VDMA or Framebuffer DMA)
2) Video Mixer IP
3) HDMI Tx
modetest
Modetest is a test tool which can be found as part of the libdrm suite of test tools. We will use this tool to ensure proper configuration and operation of the Mixer IP. Modetest can be used to activate overlay layers and alter layer properties (e.g. layer alpha, layer scaling, background color)
Test 1 - Ensure DRM driver has been properly loaded and is configured
root@mixer_proj:~# modetest -M xilinx_drm_mixer
Output should include information about the Encoder, Connector, CRTC (the Mixer), Planes (Mixer layers). All Mixer layers will be deactivate by invoking modetest so the screen should become a solid hue of blue (the default background color).
Sample output (edited for brevity and clarity):
Encoders:
id crtc type possible crtcs possible clones
36 35 TMDS 0x00000001 0xffffffff
Connectors:
id encoder status name size (mm) modes encoders
37 36 connected HDMI-A-1 520x290 40 36
modes:
name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)
3840x2160 30 3840 4016 4104 4400 2160 2168 2178 2250 flags: phsync, pvsync; type: driver
3840x2160 30 3840 4016 4104 4400 2160 2168 2178 2250 flags: phsync, pvsync; type: driver
3840x2160 25 3840 4896 4984 5280 2160 2168 2178 2250 flags: phsync, pvsync; type: driver
<snip>
640x480 60 640 656 752 800 480 490 492 525 flags: nhsync, nvsync; type: driver
720x400 70 720 738 846 900 400 412 414 449 flags: nhsync, pvsync; type: driver
props:
1 EDID:
flags: immutable blob
blobs:
value:
00ffffffffffff004c2dd30c44534d30
131a010380341d782a1255a9544d9f25
0c5054bfef80714f810081c081809500
a9c0b300010108e80030f2705a80b058
8a0009252100001e000000fd00184b1e
873c000a202020202020000000fc0055
3234453539300a2020202020000000ff
00485450483530313132310a2020011b
020334f04d611203130420221f105f60
5d5e23090707830100006d030c002000
803c20106001020367d85dc401788003
e30f0104023a801871382d40582c4500
09252100001e023a80d072382d40102c
458009252100001e011d007251d01e20
6e28550009252100001e565e00a0a0a0
29503020350009252100001a000000a0
2 DPMS:
flags: enum
enums: On=0 Standby=1 Suspend=2 Off=3
value: 0
CRTCs:
id fb pos size
35 44 (0,0) (1024x768)
1024x768 60 1024 1048 1184 1344 768 771 777 806 flags: nhsync, nvsync; type: driver
props:
Planes:
id crtc fb CRTC x,y x,y gamma size possible crtcs
26 0 0 0,0 0,0 0 0x00000001
formats: RA24
props:
5 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 2
23 scale:
flags: range
values: 0 2
value: 0
24 alpha:
flags: range
values: 0 256
value: 256
27 0 0 0,0 0,0 0 0x00000001
formats: YUYV
props:
5 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
23 scale:
flags: range
values: 0 2
value: 0
24 alpha:
flags: range
values: 0 256
value: 256
28 0 0 0,0 0,0 0 0x00000001
formats: UYVY
props:
5 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
23 scale:
flags: range
values: 0 2
value: 0
24 alpha:
flags: range
values: 0 256
value: 256
29 0 0 0,0 0,0 0 0x00000001
formats: AR24
props:
5 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
23 scale:
flags: range
values: 0 2
value: 0
24 alpha:
flags: range
values: 0 256
value: 256
30 0 0 0,0 0,0 0 0x00000001
formats: GREY
props:
5 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
23 scale:
flags: range
values: 0 2
value: 0
24 alpha:
flags: range
values: 0 256
value: 256
31 0 0 0,0 0,0 0 0x00000001
formats: XR24
props:
5 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
23 scale:
flags: range
values: 0 2
value: 0
24 alpha:
flags: range
values: 0 256
value: 256
32 0 0 0,0 0,0 0 0x00000001
formats: NV12
props:
5 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
23 scale:
flags: range
values: 0 2
value: 0
24 alpha:
flags: range
values: 0 256
value: 256
33 0 0 0,0 0,0 0 0x00000001
formats: BG24
props:
5 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
23 scale:
flags: range
values: 0 2
value: 0
24 alpha:
flags: range
values: 0 256
value: 256
34 35 44 0,0 0,0 0 0x00000001
formats: BG24
props:
5 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 1
25 bg_color:
flags: range
values: 0 16777215
value: 16711680
Frame buffers:
id size pitch
Test 2 - Activate an overlay layer
We will activate an overlay plane (RGB in this case) and position it to the top left corner while the background color is being generated using the following command:
root@mixer_proj:~# modetest -M xilinx_drm_mixer -P 35:640x480+0+0@BG24
Output should indicate the plane id that was activated:
testing 640x480@BG24 overlay plane 33
Additionally, the plane should be presented with diagonally stripped color pattern on screen.
Test 3 - Scale the layer (if enabled for the layer)
From within another console window (and/or if the previous test was run in the background), adjust the layer scale property using modetest.
The plane id (33 in case of the example above) will be needed to adjust overlay properties like scale, alpha or background color
root@mixer_proj:~# modetest -M xilinx_drm_mixer -w 33:scale:1
Note that the range of possible values for a property appears in the output of modetest. For example, in the case of plane id 33:
33 0 0 0,0 0,0 0 0x00000001
formats: BG24
props:
5 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
23 scale:
flags: range
values: 0 2
value: 0
24 alpha:
flags: range
values: 0 256
value: 256
Assuming the up-scaled version of the plane image will fit within the screen, the plane data should be doubled in size by setting the scale property to '1'.
Test 4 - Change layer alpha (if enabled for the layer)
Test 5 - Change the background color
vbltest
vbltest is a test tool which is part of the libdrm suite of test tools. It is used to ensure vertical blanking interrupts are properly sent by the DRM driver.