]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vc4: Use runtime autosuspend to avoid thrashing V3D power state.
authorEric Anholt <eric@anholt.net>
Fri, 4 Nov 2016 22:58:38 +0000 (15:58 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 4 Nov 2016 23:12:35 +0000 (16:12 -0700)
commit7d4283ff6db6bc25f3a018d958d09d5bc49a85bd
treeda22f4c7c9dac4eb4afb78f6f2cb2ab05771556a
parentd80c7d446a5a7e4c660bf209c3f7fcec9659ec31
drm/vc4: Use runtime autosuspend to avoid thrashing V3D power state.

The pm_runtime_put() we were using immediately released power on the
device, which meant that we were generally turning the device off and
on once per frame.  In many profiles I've looked at, that added up to
about 1% of CPU time, but this could get worse in the case of frequent
rendering and readback (as may happen in X rendering).  By keeping the
device on until we've been idle for a couple of frames, we drop the
overhead of runtime PM down to sub-.1%.

Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/vc4/vc4_drv.c
drivers/gpu/drm/vc4/vc4_gem.c
drivers/gpu/drm/vc4/vc4_v3d.c