Skip to content

Latest commit

 

History

History
106 lines (75 loc) · 2.26 KB

README.md

File metadata and controls

106 lines (75 loc) · 2.26 KB

gpuperfcnt

A library to retrieve various GPU information (especially hardware counters exposed by the GPU). gputop is an application based on libgpuperfcnt.

The library is built as a static library and as a shared library. Linking is done by default dynamically. To change that use -DENABLE_STATIC=ON.

Yocto

rm -rf build
mkdir -p build
cd build
. path/to/yocto/sdk/environment-setup-file
cmake -DCMAKE_TOOLCHAIN_FILE=cmake/OEToolchainConfig.cmake [-DVSI_GPU_INCLUDE_PATH=/path/to/gpu-viv6/driver/hal/inc] ..
make
cd -

for mali gpu cmake -DMALI_GPU=1 -DCMAKE_TOOLCHAIN_FILE=../cmake/OEToolchainConfig.cmake .. make


## QNX

rm -rf build mkdir -p build cd build . /path/to/qnx_sdp/qnx_sdp.sh cmake -DCMAKE_TOOLCHAIN_FILE=cmake/QNXToolchain.cmake [-DENABLE_SHARED=ON] .. make cd -


## Android

Must export VSI_GPU_INCLUDE_PATH to driver/hal/inc path.

cd tools

to build it in tools/

export NDK_PROJECT_PATH=.

specify which you want to build i.MX6 or 8 (aarch64)

export TARGET_PLATFORM=armeabi-v7a|arm64-v8a ndk-build NDK_APPLICATION_MK=./Application.mk cd -


Should have the library in obj/local/arm64-v8a/

## HAL Headers

HAL headers are mandatory to be specified, in order to make use of viv6 headers. 
Use *-DVSI_GPU_INCLUDE_PATH* to provide an absolute path. These are located in the driver 
under `driver/hal/inc` or `driver/hal/kernel/inc` or if the driver is built under `build/sdk/include/HAL`
directory.

## Man

pandoc is required.

make man


to re-generate the manual pages. The man pages are currently in git source to
allow easier inclusion in yocto images.

## Installation

For yocto installation you must set CMAKE_INSTALL_PREFIX to "/usr" (by
default is set to "/usr/local").


cmake -DCMAKE_TOOLCHAIN_FILE=cmake/OEToolchainConfig.cmake -DCMAKE_INSTALL_PREFIX=/usr
-DVSI_GPU_INCLUDE_PATH="/home/mvlad/src/nxp/vsi/gpu-viv6/driver/hal/inc/" ..


After the build then issue:

make DESTDIR=/path/to/yocto/root/tree


Would install gputop in /usr/bin, libgpuperfcnt.so in /usr/lib and the manual
pages in /usr/share/man/man8.

### Documentation for libgpuperfcnt 

Doxygen is required.

make doc


## Debug

* If you build with DEBUG, use *-DENABLE_DEBUG=ON* with your cmake.

## Notes

* gpu-viv5 not supported!