radeonsi: submit cs to failed context instead of skipping them
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fri, 9 Apr 2021 16:08:44 +0000 (18:08 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 14 Apr 2021 07:00:00 +0000 (07:00 +0000)
commit646c5db06ff3b743ca1684302ee63c16944a2a98
treed5d1db3e1a32dd0cec2509341cf7b56b5ddabbd3
parentbc71f689f1f5224d90f01cb8276b68e56107cb43
radeonsi: submit cs to failed context instead of skipping them

Skipping the submission would trigger asserts in debug builds
or cause memory corruption.

Instead the cs is submitted as ususual but the kernel won't submit
it to the hardware (and will return ECANCELED) if the context
is really lost (= not soft-recovered).

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2491
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10179>
src/gallium/drivers/radeonsi/si_gfx_cs.c