]> git.karo-electronics.de Git - karo-tx-linux.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)
commit3a62234680d86efa0239665ed8a0e908f1aef147
treeda22f4c7c9dac4eb4afb78f6f2cb2ab05771556a
parent7154d76fedf549607afbc0d13db9aaf02da5cebf
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