OSDN Git Service

drm/vc4: Rework the async update logic
authorBoris Brezillon <boris.brezillon@bootlin.com>
Fri, 30 Nov 2018 09:02:52 +0000 (10:02 +0100)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Fri, 30 Nov 2018 09:34:45 +0000 (10:34 +0100)
commit1d4118ca165e9cf393b29e606b7a3afddc76a3fb
tree41b2130c1825093f81054424e26b7e0cbf007e63
parent8d93844965c3d5a7bb57a80afd915463fa7a0824
drm/vc4: Rework the async update logic

vc4_plane_atomic_async_check() was only based on the
state->{crtc,src}_{w,h} which was fine since scaling was not allowed on
the cursor plane.

We are about to change that to properly support underscan, and, in order
to make the async check more reliable, we call vc4_plane_mode_set()
from there and check that only the pos0, pos2 and ptr0 entries in the
dlist have changed.

In vc4_plane_atomic_async_update(), we no longer call
vc4_plane_atomic_check() since vc4_plane_mode_set() has already been
called in vc4_plane_atomic_async_check(), and we don't need to allocate
a new LBM region (we reuse the one from the current state).

Note that we now have to manually update each field of the current
plane state since it's no longer updated in place (not sure we have
to sync all of them, but it's harmless if we do).
We also drop the vc4_plane_async_set_fb() call (ptr0 dlist entry has
been properly updated in vc4_plane_mode_set())

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20181130090254.594-4-boris.brezillon@bootlin.com
drivers/gpu/drm/vc4/vc4_plane.c