This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

GPU frequency counters not avaliable

rk3399 with GPU : ARM Mali-T860 MP4       DS-5 (V 6.3.0) Ultimate Edition   and I try on a linux host.

Here is my setting: 

menuconfig options (depending on the kernel version, the location of these configuration settings within menuconfig may differ)

  • General Setup
    • Timers subsystem
      • [*] High Resolution Timer Support (enables CONFIG_HIGH_RES_TIMERS)
    • Kernel Performance Events And Counters
      • [*] Kernel performance events and counters (enables CONFIG_PERF_EVENTS)
    • [*] Profiling Support (enables CONFIG_PROFILING)
  • [*] Enable loadable module support (enables CONFIG_MODULES, needed unless the gator driver is built into the kernel)
    • [*] Module unloading (enables MODULE_UNLOAD)
  • Kernel Features
    • [*] Use local timer interrupts (only required for SMP and for version before Linux 3.12, enables CONFIG_LOCAL_TIMERS)
    • [*] Enable hardware performance counter support for perf events (enables CONFIG_HW_PERF_EVENTS)
  • CPU Power Management
    • CPU Frequency scaling
      • [*] CPU Frequency scaling (enables CONFIG_CPU_FREQ)
  • Device Drivers
    • Graphics support
      • ARM GPU Configuration
        • Mali Midgard series support
          • [*] Streamline Debug support (enables CONFIG_MALI_GATOR_SUPPORT needed as part of Mali Midgard support)
  • Kernel hacking
    • [*] Compile the kernel with debug info (optional, enables CONFIG_DEBUG_INFO)
    • [*] Tracers
      • [*] Trace process context switches and events (#)

(#) The "Trace process context switches and events" is not the only option that enables tracing (CONFIG_GENERIC_TRACER or CONFIG_TRACING as well as CONFIG_CONTEXT_SWITCH_TRACER) and may not be visible in menuconfig as an option if other trace configurations are enabled. Other trace configurations being enabled is sufficient to turn on tracing.

And Here is my steps:

firstly:compile the kernel (Android with the linux kernel : Linux version 4.4.52 (gcc version 4.9 20150123 (prerelease) (GCC) ) #154 SMP PREEMPT)

    make ARCH=arm64 x3399_defconfig

    modify the generated .config file according to the config above

    make -j32 ARCH=arm64 Image

    make -j32 ARCH=arm64 x3399-development-board.img

    then generate the kernel.img and resource.img, the kernel src and compile steps are from the RK3399 supplier

secondly:compile the gator daemon

    modify the file Application.mk

    mv daemon jni

    nkd-build

    the generate the file gatord

thirdly:compile the gator driver with the kernel src and the same kernel config

    make -C <kernel_build_dir> M=`pwd` ARCH=arm64 CROSS_COMPILE=<...> modules GATOR_WITH_MALI_SUPPORT=MALI_MIDGARD MALI_DIR_MIDGARD="……/drivers/gpu/arm/midgard"

    if I try to use DDK_DIR instead of MALI_DIR_MIDGARD, it give compiling error:gator/driver/gator_trace_gpu.c:22:36: fatal error: linux/mali_linux_trace.h: No such file or directory

    so I use MALI_DIR_MIDGARD in compiling and generate the file gator.ko

last:start gatord

     replace the  kernel with newly generated kernel.img in the RK3399

     adb push gatord /data/local/tmp/

     adb shell chmod +x /data/local/tmp/gatord

     adb push gator.ko /data/local/tmp/

     then adb shell and get the root Authority, and start the gatord as : ./gatord &, it gives message:

     

     and I can not get the GPU counter as follows: