drm/vc4: plane: Prevent async update if we don't have a dlist
authorMaxime Ripard <maxime@cerno.tech>
Wed, 16 Mar 2022 15:44:45 +0000 (16:44 +0100)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Wed, 11 May 2022 15:33:21 +0000 (16:33 +0100)
commitda1758b1df59d52db5ddad796a7c7c4e407ca158
tree41b25f3fce5ee434c26087deea1b908bedfe9e14
parente38ef8f21af1d3a8044cd74f8255efff970da37f
drm/vc4: plane: Prevent async update if we don't have a dlist

The vc4 planes are setup in hardware by creating a hardware descriptor
in a dedicated RAM. As part of the process to setup a plane in KMS, we
thus need to allocate some part of that dedicated RAM to store our
descriptor there.

The async update path will just reuse the descriptor already allocated
for that plane and will modify it directly in RAM to match whatever has
been asked for.

In order to do that, it will compare the descriptor for the old plane
state and the new plane state, will make sure they fit in the same size,
and check that only the position or buffer address have changed.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/gpu/drm/vc4/vc4_plane.c