Hi,
I am attempting to get the Mali hardware counters on the S6 working, however the last information I could find was in a post on this forum, stating that the counters were broken by Samsung.
Since then I believe new Mali drivers have been released (labelled r7p0 in the kernel source), but I am still unable to get the counters to cooperate.
I attempted to use Gator 5.21 (the one included with the kernel source) and get no MobiCore warnings, but the hardware counters report only 0's.
I attempted to use Gator 5.24 which throws an error in streamline and never receives any data, "The gator driver did not start properly." and dmesg output:
MobiCore mcd: b02|VALIDATOR [ERROR]: SPID - 0x00000000 GAF structure checksum is invalid!
MobiCore mcd: b02|VALIDATOR [ERROR]: File ../../../sec_driver/gaf.c, Line 120.
MobiCore mcd: b02|VALIDATOR [ERROR]: SPID - 0x00000000 GAF checksum invalid
MobiCore mcd: b02|VALIDATOR [ERROR]: File ../../../sec_driver/ss_config.c, Line 331.
MobiCore mcd: b02|VALIDATOR [ERROR]: SPID - 0x00000000
MobiCore mcd: b02|VALIDATOR [ERROR]: File ../../../sec_driver/ss_config.c, Line 332.
MobiCore mcd: b02|VALIDATOR [ERROR]: File ../../../sec_driver/ss_config.c, Line 333.
MobiCore mcd: b02|VALIDATOR [ERROR]: SPID - 0x00000000 ===============================================================================
MobiCore mcd: b02|VALIDATOR [ERROR]: File ../../../sec_driver/ss_config.c, Line 334.
MobiCore mcd: b02|VALIDATOR [ERROR]: SPID - 0x00000000 The kernel binary has been changed.
MobiCore mcd: b02|VALIDATOR [ERROR]: File ../../../sec_driver/ss_config.c, Line 335.
MobiCore mcd: b02|VALIDATOR [ERROR]: SPID - 0x00000000 The platform/kernel binaries should be synchronized for running Secure Storage.
MobiCore mcd: b02|VALIDATOR [ERROR]: File ../../../sec_driver/ss_config.c, Line 336.
MobiCore mcd: b02|VALIDATOR [ERROR]: SPID - 0x00000000 Please use the same version of platform/kernel binaries.
MobiCore mcd: b02|VALIDATOR [ERROR]: File ../../../sec_driver/ss_config.c, Line 337.
MobiCore mcd: b02|VALIDATOR [ERROR]: File ../../../sec_driver/ss_config.c, Line 338.
MobiCore mcd: b02|VALIDATOR [ERROR]: File ../../../sec_driver/ss_config.c, Line 339.
MobiCore mcd: b02|VALIDATOR [ERROR]: File ../../../sec_driver/ss_config.c, Line 340.
MobiCore mcd: b02|VALIDATOR [WARN ]: SPID - 0x00000000 Sec Driver::set_config()
MobiCore mcd: b02|VALIDATOR [WARN ]: File ../../../arch/Mobicore/sec_driver/api/../modules/DrValidator.c, Line 669.
Other Setup Info
System: Android Marshmallow 6.0.1
Samsung Stock Kernel: G920FXXS3DPB2
Any information on getting these Mali hardware counters working would be most appreciated.
Hi mcgeagh,
So it looks like I made it to a similar position to you.
I can modify the kernel and flash it.
I can insmod gator.ko, and run gatord.
I can connect DS-5 Streamline to the target, and look and save the hardware counters. (I actually had no idea the hardware counters were pulled from the device, good to know)
Upon attempting to capture, I too got an error message from streamline telling me to check dmesg. So it looks like Samsung still have not fixed the hardware counters.
I tried disabling SELinux like you suggested, but this did not appear to make any difference and those Mobicore warnings still appear.
Notably, I had already disabled TIMA in the kernel (which had spewed similar errors and prevented the module from loading in the first place).
After a little more poking around, I also found that swapping the gpu driver source path that gator.ko is compiled against (by modifying the gator Makefile) gives slightly different results.
Compiling against:
/drivers/gpu/t7xx/r7p0 (The one I presume I am supposed to use)
/drivers/gpu/t7xx/r5p0
/drivers/gpu/t72x/r5p0
All throw an error in DS-5 when attempting to capture.
dmesg throws the Mobicore errors
/drivers/gpu/t7xx/midgard
/drivers/gpu/t7xx/midgard_wk04
All begin capturing without error, but the mali hardware counters only ever report 0's.
All other DS-5 graphs work fine.
dmesg throws the Mobicore errors and repeatly logs "gator: read64 failed for mali_midgard_hw"
Also the 'Mali Job Counter: Pixels' was missing from the DS-5 hardware counter list.
In conclusion, hardware counters don't appear to be working in r7p0 either.
Hi White,
Thank you very much for confirming this.
It is sad to hear Samsung have yet to resolve this issue.
Unfortunately for us, we cannot resolve this on our end as it is an integration problem.
I hope we have better luck with the S7!
Kind Regards,
Michael McGeagh