Attention

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

Getting Started with AMD AMA Video SDK Cards on Premises

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

    sudo update-grub
    
  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 amd_iommu=on iommu=pt
    

    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

  • Ensure that you PPA feed is setup. See Package Feed Setup

  • Ubuntu

    1. Install packages

      sudo apt -y install libhugetlbfs0 libboost-all-dev
      dpkg --get-selections '*ma35*' | awk '{system("sudo apt -y purge " $1)}'
      sudo apt-mark unhold amd-ama-driver amd-ama-core amd-ama-xma amd-ama-ffmpeg amd-ama-gstreamer
      dpkg --get-selections 'amd-ama*' | awk '{system("sudo apt -y purge " $1)}'
      sudo apt update
      sudo apt install amd-ama-driver=1.1.2-* amd-ama-core=1.1.2-* amd-ama-xma=1.1.2-* amd-ama-ffmpeg=1.1.2-* amd-ama-gstreamer=1.1.2-*
      sudo apt-mark hold amd-ama-driver amd-ama-core amd-ama-xma amd-ama-ffmpeg amd-ama-gstreamer
      
    2. Verify packages

      sudo dpkg -l amd-ama*
      

      The expected output is:

      Desired=Unknown/Install/Remove/Purge/Hold
      | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
      |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
      ||/ Name              Version          Architecture Description
      +++-=================-================-============-=================================
      ii  amd-ama-core      1.1.2-2403291822 amd64        Supernova
      ii  amd-ama-driver    1.1.2-2403291822 amd64        Supernova
      ii  amd-ama-ffmpeg    1.1.2-2403291822 amd64        Supernova
      ii  amd-ama-gstreamer 1.1.2-2403291822 amd64        Supernova
      ii  amd-ama-xma       1.1.2-2403291822 amd64        Supernova
      
    3. Insert kernel module

      sudo modprobe ama_transcoder
      

Flash Firmware

Flashing is required for this release:

  1. Flash the security patch firmware:

    sudo /opt/amd/ama/ma35/bin/maflash program -d all  <patch firmware bin>
    

    , where patch firmware bin is /opt/amd/ama/ma35/firmware/ma35d_security_patch.bin.

  2. Cold reboot:

    sudo systemctl poweroff
    

    , and power up.

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

    sudo /opt/amd/ama/ma35/bin/maflash program -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)
    ...
    
  4. 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.0.4
SC Version = 9.7.39
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 setup script

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

Note that this script requires Bash shell to run.

Run Your First Examples

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