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

Disable watchdog on Mali

Not sure if this is the right place to ask this question but how do I disable watchdog timer on my Note3 which has a Mali-T628? All I could find was dvfs stuff inside /sys/devices/platform/mali.0. Is there something in the user-mode driver I could modify and recompile?

I am trying to run some GLES 3.0 benchmarks and if I increase the number of iterations inside the pixel shader beyond a certain limit, I get a black framebuffer. I figured it must be related to the watchdog timer.

Parents
  • There is a general assumption in the GPU scheduler that shader programs are "well behaved" - every sane real world use case will be trying to render quickly.

    If a GPU rendering task takes too long to complete and there is other work pending then the Mali kernel driver tries to pre-empt it (a soft-stop); if it does not pre-empt quickly because of very long running threads are still running then that job gets killed (a hard stop). Jobs which are soft-stopped can be scheduled back on to the GPU later once they are assigned a new timeslice, hard-stopped jobs are not restartable.

    If you are getting black rendering that sounds like you either (1) have a Job which is failing to soft-stop quickly enough, and so it is getting hard-stopped by the Mali kernel driver, or (2) the window system down-steam of Mali is timing out the fence used for frame composition.

    If the issue is (1) then the soft-stop and hard-stop timeouts can be configured in the kernel drivers for your platform - just grep for softstop and hardstop and you'll find them (the standard kernel drivers for Mali, excluding any platform configuration from specific vendors, can be found here Home - Mali Developer Center Mali Developer Center) . I'm not sure what Samsung configure these values too, but the defaults are relatively generous (10ms timeslices, 100ms hard stop timeouts if you fail to softstop).

    If the issue is (2) then the problem is not an issue with the Mali drivers; some of the downstream drivers (such as display controller) may be making assumptions on how long a frame may take before it times out and just uses whatever is in memory. For the Note 3 these downstream parts are controlled by Samsung, not by ARM.

    However, I'd generally question the need for very very long running threads in a benchmark. Assuming you are taking longer than 100ms for a single fragment thread (which is what would be needed for Mali to fail to soft-stop cleanly with the default timeouts), then that seems a little overkill; there should be no need for a single GPU thread to run for 50 million cycles to get a good benchmark of the hardware capability. Having shorter running threads and more of them (more vertices and/or more pixels) would seem a more pragmatic change.

    Hope that helps,
    Pete

Reply
  • There is a general assumption in the GPU scheduler that shader programs are "well behaved" - every sane real world use case will be trying to render quickly.

    If a GPU rendering task takes too long to complete and there is other work pending then the Mali kernel driver tries to pre-empt it (a soft-stop); if it does not pre-empt quickly because of very long running threads are still running then that job gets killed (a hard stop). Jobs which are soft-stopped can be scheduled back on to the GPU later once they are assigned a new timeslice, hard-stopped jobs are not restartable.

    If you are getting black rendering that sounds like you either (1) have a Job which is failing to soft-stop quickly enough, and so it is getting hard-stopped by the Mali kernel driver, or (2) the window system down-steam of Mali is timing out the fence used for frame composition.

    If the issue is (1) then the soft-stop and hard-stop timeouts can be configured in the kernel drivers for your platform - just grep for softstop and hardstop and you'll find them (the standard kernel drivers for Mali, excluding any platform configuration from specific vendors, can be found here Home - Mali Developer Center Mali Developer Center) . I'm not sure what Samsung configure these values too, but the defaults are relatively generous (10ms timeslices, 100ms hard stop timeouts if you fail to softstop).

    If the issue is (2) then the problem is not an issue with the Mali drivers; some of the downstream drivers (such as display controller) may be making assumptions on how long a frame may take before it times out and just uses whatever is in memory. For the Note 3 these downstream parts are controlled by Samsung, not by ARM.

    However, I'd generally question the need for very very long running threads in a benchmark. Assuming you are taking longer than 100ms for a single fragment thread (which is what would be needed for Mali to fail to soft-stop cleanly with the default timeouts), then that seems a little overkill; there should be no need for a single GPU thread to run for 50 million cycles to get a good benchmark of the hardware capability. Having shorter running threads and more of them (more vertices and/or more pixels) would seem a more pragmatic change.

    Hope that helps,
    Pete

Children