Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Table of Contents
maxLevel1

...

  • The driver is tested with YUY2, NV16, NV12, RGB, GRAY8, UYVY and BGR Gstreamer formats only.  
  • Please check section below on Stride and Height align.


Kernel Configuration

The following config options should be enabled in order to build Xilinx Multi-Scaler driver

CONFIG_VIDEO_XILINX

CONFIG_VIDEO_DEV

...

CONFIG_VIDEO_XILINX_MULTISCALER


To check if the options are enabled run the following:

Code Block
themeMidnight
petalinux-config -c kernel

When the GUI opens, you can use '/' to search for each config.


The driver is available at,
https://github.com/Xilinx/linux-xlnx/blob/master/drivers/media/platform/xilinx/xilinx-multi-scaler.c

Device Tree Binding

The device tree node will be automatically generated, if the core is configured in the HW design, using the Device Tree BSP.

Steps to generate device-tree is documented here,
http://www.wiki.xilinx.com/Build+Device+Tree+Blob

And a sample binding is shown below and the description of DT property is documented here


Code Block
themeMidnight
v_multi_scaler_1: v_multi_scaler@a0000000 {
          clock-names = "ap_clk";
          clocks = <&misc_clk_0>;
          compatible = "xlnx,v-multi-scaler-1.0", "xlnx,v-multi-scaler-v1.0";
          interrupt-names = "interrupt";
          interrupt-parent = <&gic>;
          interrupts = <0 89 4>;
          reg = <0x0 0xa0000000 0x0 0x20000>;
          reset-gpios = <&gpio 78 1>;
          xlnx,dma-addr-width = <0x20>;
          xlnx,max-chan = <8>;
          xlnx,max-height = <2160>;
          xlnx,max-width = <3840>;
          xlnx,num-taps = <12>;
          xlnx,pixels-per-clock = /bits/ 8 <2>;
          xlnx,vid-formats = "xrgb8888", "bgr888", "xbgr8888", "xbgr2101010", "uyvy", "y8", "y10", "vuy888", "xvuy8888", "yuvx2101010", "yuyv", "nv12", "nv16", "xv20", "xv15";
};                                

...

Code Block
languagebash
themeMidnight
# ls /dev/ | grep video
video0
video1
video2
video3
video4
video5
video6
video7

Multi-Scaler is tested with the generic gstreamer v4l2videotransform plugin which maps device node to v4l2videoNconvert elements. Where N is the number of device node. 

Below is the steps to get the proper gstreamer element for the Multi-Scaler.   

Find the Multi-Scaler devices

Gstreamer device name for Multi-Scaler is xm2msc (Xilinx memory to  memory video multi-scaler).

In below example the IP is configured for 8 channels. 

Code Block
languagebash
themeMidnight
# gst-inspect-1.0 -a | grep xm2msc
v4l2video0convert: String. Default: "xm2msc"
v4l2video1convert: String. Default: "xm2msc"
v4l2video2convert: String. Default: "xm2msc"
v4l2video3convert: String. Default: "xm2msc"
v4l2video4convert: String. Default: "xm2msc"
v4l2video5convert: String. Default: "xm2msc"
v4l2video6convert: String. Default: "xm2msc"
v4l2video7convert: String. Default: "xm2msc"
video0
video1
video2
video3
video4
video5
video6
video7


Multi-Scaler is tested with the generic gstreamer v4l2videotransform plugin which maps device node to v4l2videoNconvert elements. Where N is the number of device node. 

N-N Use Case:

Multi-Scaler is tested with the generic gstreamer v4l2videotransform elements which is part of gst-plugins-good. So no extra library required to run N:N use case.

...

  1. Gstreamer plugins enumerate all the channel/video devices for each of gst command. So, there might be chances that starting all channels with different gst process at same time do not allow the actual process to open the device and the process dedicated for the device does not start. For example, if all channels are opened immediately in a script, all the gst process open and close all the devices for all the channels and if somehow gst process 1 opens channel 2 and at same time if process 2 open channel 2, the 2nd process do not get the channel 2 and returns, despite the process 1 do not require the channel 2 and close the channel 2 afterwards.  Adding sleep after every enumeration is required to make all applications work properly.   

  2. The gstreamer plugins mentioned on this page are developed for Proof of Concept and testing some limited featured only. This plugins are not tested for all possible resolutions, video formats etc. Customers may need to develop their own plugins by using these plugins as example.

...

2018.3

  • Summary:
    • Add first version of driver.
  • Commits:
    • 484cdb2 platform: xilinx: Add mem to mem Multi-Scaler driver (XM2MSC)


Related Links