]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vc4: Add a load tracker to prevent HVS underflow errors
authorBoris Brezillon <boris.brezillon@bootlin.com>
Wed, 20 Feb 2019 15:51:23 +0000 (16:51 +0100)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Wed, 6 Mar 2019 13:48:03 +0000 (14:48 +0100)
commit217dc70ced0db634db1cb860f0e5f036dd4d65d7
tree6f2e71d7a72d1c667fc67de947ddec100cc04977
parent18aa749c489304827a1d118f578fcd60a1f5ff91
drm/vc4: Add a load tracker to prevent HVS underflow errors

The HVS block is supposed to fill the pixelvalve FIFOs fast enough to
meet the requested framerate. The problem is, the HVS and memory bus
bandwidths are limited, and if we don't take these limitations into
account we might end up with HVS underflow errors.

This patch is trying to model the per-plane HVS and memory bus bandwidth
consumption and take a decision at atomic_check() time whether the
estimated load will fit in the HVS and membus budget.

Note that we take an extra margin on the memory bus consumption to let
the system run smoothly when other blocks are doing heavy use of the
memory bus. Same goes for the HVS limit, except the margin is smaller in
this case, since the HVS is not used by external components.

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190220155124.25022-3-paul.kocialkowski@bootlin.com
drivers/gpu/drm/vc4/vc4_drv.c
drivers/gpu/drm/vc4/vc4_drv.h
drivers/gpu/drm/vc4/vc4_kms.c
drivers/gpu/drm/vc4/vc4_plane.c