SPRADI3 June   2024 AM625 , AM62P , AM67 , AM67A , AM68 , AM68A , AM69 , AM69A , DRA829J , DRA829J-Q1 , DRA829V , DRA829V-Q1 , TDA4AEN-Q1 , TDA4AH-Q1 , TDA4AL-Q1 , TDA4AP-Q1 , TDA4VE-Q1 , TDA4VEN-Q1 , TDA4VH-Q1 , TDA4VL-Q1 , TDA4VM , TDA4VM-Q1 , TDA4VP-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Common Issues with Graphics Applications
    1. 2.1 System or Application Freeze
      1. 2.1.1 Typical Kernel Panic Logs
    2. 2.2 Screen Tearing
    3. 2.3 Artifacts or Corruption in the Screen
    4. 2.4 Blank Screen
    5. 2.5 Low Frame Rate
    6. 2.6 GPU Driver Logs and Hardware Recoveries
      1. 2.6.1 Typical GPU HWR Logs
  6. 3Support Flow for Graphics Issues
    1. 3.1 Submit Preliminary Description
    2. 3.2 Determine if the Issue Reproduces on TI EVM
    3. 3.3 Provide Follow-Up Testing and Logs
  7. 4Tools for GPU Driver Debug
    1. 4.1 Driver Status in Linux® DebugFS
    2. 4.2 Driver AppHints
    3. 4.3 PVR Log Dump Collection
    4. 4.4 Adding Log Groups to Firmware Traces
    5. 4.5 Disabling the Driver After Hardware Recovery
    6. 4.6 Disable Autoloading of the GPU Driver
  8. 5Integrating Patched GPU Drivers
    1. 5.1 UM Libraries Installation
    2. 5.2 KM Libraries Installation
    3. 5.3 Post-Installation Steps
  9. 6Summary

KM Libraries Installation

The KM driver is provided in TI's SDK under the following directory: ti-processor-sdk-linux-adas-j721s2-evm-09_02_00_05/board-support/extra-drivers/ti-img-rogue-driver-23.3.6512818

The driver is also posted in TI's public repository: https://git.ti.com/cgit/graphics/ti-img-rogue-driver/.

The build instructions can be extracted from TI's SDK build infrastructure, but the instructions are added here for clarity. The environment variables, which can be set in the shell or passed on the make command, are as follows:

Table 5-1 Build Environment Variables for KM Driver
Environment Variable NameValueDescription
ARCHarm64Architecture of target CPU
CROSS_COMPILEaarch64-none-linux-gnu-The cross compiler being used
KERNELDIR<absolute path to linux kernel on the system>Path to the Linux kernel source directory
RGX_BVNC36.53.104.796 - TDA4VL, TDA4VH, TDA4AEN, AM62P
22.104.208.318 - TDA4VM
33.15.11.3 - AM62x
Version of GPU to use, particular version of hardware revision
BUILDrelease or debugBuild profile to use
PVR_BUILD_DIR<soc>_linuxWhich build directory to use within the driver, each SOC has a directory
WINDOW_SYSTEMlws-genericWhich window system to use, only lws-generic is supported after SDK 9.0.

With these variables set, the make command ought to work. Build within the ti-processor-sdk-linux-adas-j721s2-evm-09_02_00_05/board-support/extra-drivers/ti-img-rogue-driver-23.3.6512818/build/linux/j721s2_linux in the SDK or the ti-img-rogue-driver/build/linux/j721s2_linux, if manually cloned.

To install on the target filesystem, the SDK runs the following make command from the create binary directory: binary_j721s2_linux_wayland_release/target_aarch64/kbuild

make -C ${LINUXKERNEL_INSTALL_DIR} INSTALL_MOD_PATH=${DESTDIR} INSTALL_MOD_STRIP=${INSTALL_MOD_STRIP} M=`pwd` modules_install

If installing from the build directory, one or more environment variable is required: DISCIMAGE=<path-to-rootfs-root-directory>

Example:

export DISCIMAGE=/media/user/rootfs

sudo -E env PATH=$PATH make install

Another way to install the KM library is to use the install.sh script in the output directory:

Example:

cd binary_j721s2_linux_lws-generic_release

sudo ./install.sh --root <path-to-rootfs-directory>

Note: If you rebuild the Linux kernel, the version can change and the GPU Kernel driver must be reinstalled.

Always check that you rebuild and reinstall the GPU kernel driver when rebuilding the Linux kernel if the Linux kernel version changes. Most notably, when installing the Linux kernel modules, a folder is created in the filesystem such as /lib/modules/6.1.80-ti-g2e423244f8c0. Modifying a kernel usually introduces the suffix -dirty which causes a new modules directory to be created. Thus, the GPU kernel driver must be reinstalled as well into the new kernel module directory.

Example: Manual Build of GPU Kernel Driver for AM62

make \
ARCH=arm64 CROSS_COMPILE=/home/toolchains/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- \
KERNELDIR=/home//am625_sdk/ti-processor-sdk-linux-am62xx-evm-09.01.00.08/board-support/ti-linux-kernel-6.1.46+gitAUTOINC+247b2535b2-g247b2535b2 \
BUILD=release PVR_BUILD_DIR=am62_linux

Example: Manual Installation of GPU Kernel Driver

cd binary_j721s2_linux_lws-generic_release
sudo install.sh -root <path to rootfs>