Attention

This version of the SDK has been superseded by the latest release of the SDK.

Getting Started with AMD AMA Video SDK Cards

Chassis Setup

  1. BIOS setting:

    1. Ensure that chassis's BIOS is set to performance mode, e.g., sleep states, clock throttling, etc. are disabled.

    2. 4x4 PCIe bifurcation must be enabled on each slot with a MA35 card.

    3. Enable Single Root IO/Virtualization (SR-IOV).

    4. Secure boot must be disabled.

    5. Enable Above 4G Decoding.

    6. Enable Access Control Services (ACS)

    7. Enable virtualization.

  2. Install a compatible kernel, e.g., see Linux VM Guest, Step 2, for details on how to install kernel 5.15 and other required packages. Note that if you are installing on kernel 6.5, gcc-12 is required.

  3. Enable IOMMU by updating /etc/default/grub file to include

    • GRUB_CMDLINE_LINUX_DEFAULT="quiet splash amd_iommu=on iommu=pt", for AMD based systems

    • GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_iommu=on iommu=pt", for Intel based chassis

  4. Update Grub

    For Ubuntu and Debian:

    sudo update-grub
    

    For Fedora:

    sudo grub2-mkconfig -o /boot/grub2/grub.cfg
    
  5. Allocate at least 4GB of huge pages, per device, plus an extra 96 huge pages, e.g., a single card with 2 devices requires 2*2048+96=4192 huge pages

    sudo sh -c "echo 'vm.nr_hugepages=4192' >> /etc/sysctl.conf"
    

    Note that if a chassis is being configured to host VMs, then the total number of huge pages, on the host, needs to be the sum of allocated RAM of all VM instances plus 96. As an example, running 6 VMs, each with 12GB of RAM, requires 6*12GB/2MB+96=36960 huge pages. (See Virtualization for details.)

  6. Reboot

    sudo reboot
    
  7. Verify settings

    cat /proc/cmdline
    BOOT_IMAGE=/vmlinuz-5.15.0-50-generic root=/dev/mapper/vg00-rootlv ro quiet splash CPU_iommu=on iommu=pt
    

    , where CPU is one of amd or intel, as per Step 3.

    and

    cat /proc/meminfo | grep -i huge
    

    , should return:

    HugePages_Total:    4192
    HugePages_Free:     4192
    HugePages_Rsvd:        0
    Hugepagesize:       2048 kB
    

Check Cards

To establish whether deployed cards have proper firmware installed, proceed as follows:

  1. List AMD AMA Video SDK PCIe devices

    sudo lspci -vvvd 10ee:
    

    If devices are not listed as Multimedia controller and/or Region 4 size is not 512MB, a flash update is required. Refer to Flash Firmware section, for instructions.

Install the AMD AMA Video SDK

  • Ubuntu & Debian 12

    1. Install packages

      sudo apt -y install libhugetlbfs0 libboost-all-dev
      dpkg --get-selections 'amd-ama*' | awk '{system("sudo apt -y purge " $1)}'
      sudo apt update
      sudo apt install amd-ama-driver amd-ama-core amd-ama-xma amd-ama-ffmpeg amd-ama-gstreamer
      
  • Fedora

    1. Install packages

      sudo yum update
      sudo yum remove amd-ama-DRIVER amd-ama-core amd-ama-xma amd-ama-ffmpeg amd-ama-gstreamer
      sudo yum install amd-ama-DRIVER amd-ama-core amd-ama-xma amd-ama-ffmpeg amd-ama-gstreamer
      
  • Insert kernel module

    sudo modprobe ama_transcoder
    

Note

Use apt-mark or yum-plugin-versionlock to lock to a specific version of SDK, e.g., sudo apt install amd-ama-driver=1.2.0-* followed by sudo apt-mark hold amd-ama-driver, if you wish to prevent accidental updates to the SDK.

Flash Firmware

Flashing is required for this release:

  1. To flash all devices, in parallel, issue the following:

    sudo /opt/amd/ama/ma35/bin/mamgmt flash -d all -p <firmware bin>
    

    , where firmware bin is /opt/amd/ama/ma35/firmware/ma35_firmware.bin.

    Ignore warning messages that state:

    ...
    Warning: SC update is not supported from ASIC 1 (skipping)
    ...
    
  2. Cold reboot:

    sudo systemctl poweroff
    

    , and power up.

For more details on flashing, refer to Programing a Device.

Installation Verification

After each reboot or SDK update execute the following command:

  1. Confirm driver's successful installation by:

    cat /sys/class/misc/ama_transcoder0/version_information
    

    It should return:

ZSP Version = 2.1.0
SC Version = 9.8.5
eSecure Version = 1.0.0
PCIe FW Version = 2.1.0
PCIe CTRL Patch Version = 1.0.3
PCIe PHY Patch A Version = 1.0.0

If the observed version numbers are older than the above, flashing is required. Refer to Flash Firmware section, for instructions.

Set Up the Runtime Environment

  1. Run the setup script:

    source /opt/amd/ama/ma35/scripts/setup.sh
    

    Note that this script requires Bash shell to run.

  2. Prior to running any video processing pipeline, run the following command:

    mautil validate -d all
    
  3. Ensure that all tests have passed.

Run Your First Examples

See the tutorials and examples page to learn how to run jobs on your system.