Hi there,
I am using the Community Edition of Streamline and am connecting to an EXYNOS5422 with a ARM Mail-T628 on board.
I'm trying to view the Mali counters for the GPU, but I cannot see the option in my Streamline counter configuration. When I try to add the Mali Midgard via "Add counters from a template", it says that my target does not support them.
Can I get some information on which configs I should be turning on? I suppose I may have missed something, but I turned on :
~$ zcat /proc/config.gz | grep MALI
CONFIG_MALI_MIDGARD=y
# CONFIG_MALI_TIMELINE_DISABLED is not set
CONFIG_MALI_GATOR_SUPPORT=y
# CONFIG_MALI_MIPE_ENABLED is not set
CONFIG_MALI_MIDGARD_DVFS=y
CONFIG_MALI_MIDGARD_ENABLE_TRACE=y
# CONFIG_MALI_DEVFREQ is not set
CONFIG_MALI_EXPERT=y
# CONFIG_MALI_DEBUG_SHADER_SPLIT_FS is not set
CONFIG_MALI_PLATFORM_FAKE=y
# CONFIG_MALI_PLATFORM_DEVICETREE is not set
CONFIG_MALI_PLATFORM_THIRDPARTY=y
CONFIG_MALI_PLATFORM_THIRDPARTY_NAME="5422"
# CONFIG_MALI_DEBUG is not set
# CONFIG_MALI_NO_MALI is not set
# CONFIG_MALI_TRACE_TIMELINE is not set
# CONFIG_MALI_SYSTEM_TRACE is not set
# CONFIG_MALI_GPU_TRACEPOINTS is not set
Should I try turning on all of the configs for Mali?
I think I'm building the gator module incorrectly.
Whenever I try to do the make command, it mentions that it cannot find certain '.c' or '.h' files but they are in the GPU kernel driver directory. For example, I had this error:
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:30:41: fatal error: kbase/src/common/mali_kbase.h: No such file or directory
To fix these, I manually copied over the '.c' and '.h' files from my kernel directory to the gator driver directory (the gator driver directory is where I issued the make command).
Now, I'm getting these errors below and I'm not entirely sure why:
prateekmohan@prateekmohan-HP-15-Notebook-PC:~/EEE598/gator/gator/driver$ make -C /home/prateekmohan/EEE598/build/ M=`pwd` ARCH=arm CROSS_COMPILE=arm-eabi- GATOR_WITH_MALI_SUPPORT=MALI_MIDGARD KCFLAGS="-I/home/prateekmohan/EEE598/odroid-kernel/drivers/gpu/arm/midgard/" DDK_DIR="/home/prateekmohan/EEE598/odroid-kernel/drivers/gpu/arm/midgard/" modules
make: Entering directory `/home/prateekmohan/EEE598/build'
CHK /home/prateekmohan/EEE598/gator/gator/driver/gator_src_md5.h
CC [M] /home/prateekmohan/EEE598/gator/gator/driver/gator_main.o
CC [M] /home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.o
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:71:20: error: expected declaration specifiers or '...' before '*' token
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:72:20: error: expected declaration specifiers or '...' before '*' token
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:73:20: error: expected declaration specifiers or '...' before '*' token
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:74:20: error: expected declaration specifiers or '...' before '*' token
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:75:19: error: expected declaration specifiers or '...' before '*' token
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c: In function 'init_symbols':
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:483:5: warning: assignment from incompatible pointer type [enabled by default]
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:484:5: warning: assignment from incompatible pointer type [enabled by default]
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:485:1: error: 'kbase_instr_hwcnt_enable_symbol' undeclared (first use in this function)
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:485:1: note: each undeclared identifier is reported only once for each function it appears in
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:486:1: error: 'kbase_instr_hwcnt_clear_symbol' undeclared (first use in this function)
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:487:1: error: 'kbase_instr_hwcnt_dump_irq_symbol' undeclared (first use in this function)
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:487:5: error: 'kbase_instr_hwcnt_dump_irq' undeclared (first use in this function)
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:488:1: error: 'kbase_instr_hwcnt_dump_complete_symbol' undeclared (first use in this function)
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:489:1: error: 'kbase_instr_hwcnt_disable_symbol' undeclared (first use in this function)
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:490:5: warning: assignment from incompatible pointer type [enabled by default]
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c: In function 'clean_symbols':
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:511:1: error: 'kbase_instr_hwcnt_enable_symbol' undeclared (first use in this function)
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:512:1: error: 'kbase_instr_hwcnt_clear_symbol' undeclared (first use in this function)
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:513:1: error: 'kbase_instr_hwcnt_dump_irq_symbol' undeclared (first use in this function)
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:514:1: error: 'kbase_instr_hwcnt_dump_complete_symbol' undeclared (first use in this function)
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:515:1: error: 'kbase_instr_hwcnt_disable_symbol' undeclared (first use in this function)
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c: In function 'start':
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:527:5: error: unknown type name 'mali_error'
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:613:34: error: 'struct kbase_device' has no member named 'shader_present_bitmap'
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:641:14: error: 'struct kbase_uk_hwcnt_setup' has no member named 'l3_cache_bm'
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:644:9: error: implicit declaration of function 'kbase_instr_hwcnt_enable_symbol' [-Werror=implicit-function-declaration]
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:645:20: error: 'MALI_ERROR_NONE' undeclared (first use in this function)
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:650:9: error: implicit declaration of function 'kbase_instr_hwcnt_clear_symbol' [-Werror=implicit-function-declaration]
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c: In function 'stop':
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:712:9: error: implicit declaration of function 'kbase_instr_hwcnt_disable_symbol' [-Werror=implicit-function-declaration]
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c: In function 'read':
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:833:5: error: implicit declaration of function 'kbase_instr_hwcnt_dump_complete_symbol' [-Werror=implicit-function-declaration]
/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.c:866:9: error: implicit declaration of function 'kbase_instr_hwcnt_dump_irq_symbol' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [/home/prateekmohan/EEE598/gator/gator/driver/gator_events_mali_midgard_hw.o] Error 1
make[2]: *** [_module_/home/prateekmohan/EEE598/gator/gator/driver] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
make: Leaving directory `/home/prateekmohan/EEE598/build'
Hi Prateekmohan1,
I will try and answer some of the points you have made:
"It doesn't really mention anything about the build time option you described (ie. "GATOR_WITH_MALI_SUPPORT=MALI_MIDGARD DDK_DIR=".../path/to/Mali_DDK_kernel_files"). Can you explain that to me again? Perhaps that is why it is not working."
In the gator github entry there is a file called Readme.md. There should be a seperate section in that readme labelled Mali GPU hopefully that will give you some more information. But Pete is right the Streamline documentation online is also a good source of information.
"Thanks dynamic, I tried that but I got the same error as I posted below. Another thing I'm wondering is what the <kernel_build_dir> is in the command
"make -C <kernel_build_dir> M=`pwd` ARCH=arm CROSS_COMPILE=<...> modules""
make -C <kernel_build_dir> M=`pwd` ARCH=arm CROSS_COMPILE=<...> modules""
Where are you passing the DDK_DIR information have you edited the makefile instead? I wouldn't copy the kernel files over to the directory I would just specify the path just in case anything is missing?
Are you using the stock hardkernel provided kernel on your OdroidXU4? If you are I can take a quick look and see if there is anything sticks out as to why you would be seeing issues?
Kind regards,
Stephen
Thanks for the detailed reply Stephen - appreciate it.
I in fact got it working, and for others with this problem, I was building my kernel into a different directory than the source. Normally, if you just run the "make" command in the kernel source, it will build it in the same directory. I was building it in a separate directory which was causing issues when gator was being built.
After you build it in the same directory and the kernel successfully builds the way that I built gator.ko (that worked) was:
make -C /home/prateekmohan/EEE598/build/ M=`pwd` ARCH=arm CROSS_COMPILE=arm-eabi- GATOR_WITH_MALI_SUPPORT=MALI_MIDGARD KCFLAGS="-I/home/prateekmohan/EEE598/odroid-kernel/drivers/gpu/arm/midgard/" MALI_DIR_MIDGARD="/home/prateekmohan/EEE598/odroid-kernel/drivers/gpu/arm/midgard/" modules
The directory I bolded should be your kernel source directory. Because you have built the kernel in the same directory it has all the files that gator requires to build gator.ko.
Thanks for all the help guys! Really appreciate it!