drm: vc4: Free the dlist alloc immediately if it never hit the hw
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Wed, 22 Nov 2023 18:36:54 +0000 (18:36 +0000)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:35:15 +0000 (11:35 +0000)
commitc9e86e22d14a6c4b3bf8f389f9140ee71ee96c71
treebd2be4ed18fffe7a0dcebab978aa64076e4c7666
parent54e4947c63da3256c4bbce35c2a0d6045f270edc
drm: vc4: Free the dlist alloc immediately if it never hit the hw

atomic_check creates a state, and allocates the dlist memory for
it such that atomic_flush can not fail.

On destroy that dlist allocation was being put in the stale list,
even though it had never been programmed into the hardware,
therefore doing lots of atomic_checks could consume all the dlist
memory and fail.

If the dlist has never been programmed into the hardware, then
free it immediately.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/gpu/drm/vc4/vc4_drv.h
drivers/gpu/drm/vc4/vc4_hvs.c