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

Mali DS-5 Streamline on Samsung Galaxy S5 (G900H)

Hi.

I've been trying to setup the Streamline support for my S5 for graphics debugging purposes.

There were some issues with getting everything compiling and installing, but I think I have everything more or less covered and I have a custom kernel, gator.ko (that loads), gatord working and I can connect to it from DS-5 and I can even get *some* GPU information (like rendered triangles and draw calls and such) in the DS-5, but... I can't get the Mali Job Manager cycles, Mali External Bandwidth etc. figures showing.

They seem to exist on the device:

shell@k3g:/sys/kernel/debug/tracing/events/mali $ ls -la

-rw-r--r-- root     root            0 1969-12-31 16:00 enable

-rw-r--r-- root     root            0 1969-12-31 16:00 filter

drwxr-xr-x root     root              1969-12-31 16:00 mali_job_slots_event

drwxr-xr-x root     root              1969-12-31 16:00 mali_mmu_as_in_use

drwxr-xr-x root     root              1969-12-31 16:00 mali_mmu_as_released

drwxr-xr-x root     root              1969-12-31 16:00 mali_page_fault_insert_pages

drwxr-xr-x root     root              1969-12-31 16:00 mali_pm_power_off

drwxr-xr-x root     root              1969-12-31 16:00 mali_pm_power_on

drwxr-xr-x root     root              1969-12-31 16:00 mali_pm_status

drwxr-xr-x root     root              1969-12-31 16:00 mali_sw_counter

drwxr-xr-x root     root              1969-12-31 16:00 mali_total_alloc_pages_change

The value of enable is '0' even if DS-5 is running. If I force that to '1', it makes no difference.

cat /sys/kernel/debug/tracing/available_events has:

mali_power:mali_utilization_stats

mali:mali_sw_counter

mali:mali_total_alloc_pages_change

mali:mali_mmu_as_released

mali:mali_mmu_as_in_use

mali:mali_page_fault_insert_pages

mali:mali_pm_power_off

mali:mali_pm_power_on

mali:mali_pm_status

mali:mali_job_slots_event

So clearly to some degree the Mali driver has registered it's trace events, but the DS-5 can't get these values. Here is a screenshot of what happens:

Screen Shot 2016-05-20 at 5.41.21 PM.png

when I hover over the GPU cycles.

Any pointers? Is there some way to make DS-5 spill more details as to why it's missing this information?

Cheers,

     Jani

  • So this was just an user error after all :-).

    I didn't realize that you can't switch the tracing template dynamically for the GPU traces.

    It seems that the gator initializes the MALI trace with defaults and then it can't switch to the more detailed trace (template: Mali Midgard) on the fly.

    Everything is working now.

    If someone else is struggling to get the DS-5 working on Galaxy S5 with latest Lollipop firmware from Samsung, here are the steps I did:

    0. Follow the instructions already presented here in general for getting the DS-5 work on Note 4 etc.

    1. Get the kernel from Samsung website (as per normal instructions), version G900HXXU1BOL2

    2. Find the matching firmware, I used G900HXXU1BOL2_G900HODD1BOL1_INS.zip

    3. Do the normal install steps to get the firmware in, recovery in, root it...

    4. The boot.img can be found from:   /dev/block/platform/12200000.dwmmc0/by-name/BOOT       (slightly different folder vs. the instructions)

    5. Do the kernel configuration normally, but disable the TIMA in the kernel config (you can't load module otherwise):

      

    System Type

            [ ] Enable TIMA

    6. I had to patch the "mali_midgard.mk" in the Gator because it wasn't recognizing the in-kernel driver tree properly

        (also, after removing TIMA, code wasn't compiling, so that extra -Idrivers/gud/gud... line has to be added)

    else

          ifneq ($(wildcard $(DDK_DIR)/$(CONFIG_GATOR_MALI_MIDGARD_PATH)),)

            # r4p0/Europium - r4p1/Europium-Inc

            KBASE_DIR = $(DDK_DIR)/$(CONFIG_GATOR_MALI_MIDGARD_PATH)

            OSK_DIR = $(DDK_DIR)/$(CONFIG_GATOR_MALI_MIDGARD_PATH)/osk

            EXTRA_CFLAGS += -DMALI_DIR_MIDGARD=1

      else

            EXTRA_CFLAGS += -DMALI_DIR_MIDGARD=1 -DMALI_GCC_WORKAROUND_MIDCOM_4598=0  -Idrivers/gud/gud-exynos5433/MobiCoreKernelApi/include/

      endif

      endif

       Add the extra else -> endif section

    Beyond this, just follow the normal procedure of getting it running and ... configure the mali tracers *before* starting a capture from DS-5 ;-)

    Cheers,

                   Jani