[Intel-gfx] [PATCH 3/3] drm/i915/gt: Clear SET_PREDICATE_RESULT prior to executing the ring
Matthew Auld
matthew.william.auld at gmail.com
Fri Apr 29 13:51:42 UTC 2022
On Mon, 25 Apr 2022 at 16:22, Ramalingam C <ramalingam.c at intel.com> wrote:
>
> From: Chris Wilson <chris.p.wilson at intel.com>
>
> Userspace may leave predication enabled upon return from the batch
> buffer, which has the consequent of preventing all operation from the
> ring from being executed, including all the synchronisation, coherency
> control, arbitration and user signaling. This is more than just a local
> gpu hang in one client, as the user has the ability to prevent the
> kernel from applying critical workarounds and can cause a full GT reset.
>
> We could simply execute MI_SET_PREDICATE upon return from the user
> batch, but this has the repercussion of modifying the user's context
> state. Instead, we opt to execute a fixup batch which by mixing
> predicated operations can determine the state of the
> SET_PREDICATE_RESULT register and restore it prior to the next userspace
> batch. This allows us to protect the kernel's ring without changing the
> uABI.
>
> Suggested-by: Zbigniew Kempczynski <zbigniew.kempczynski at intel.com>
> Signed-off-by: Chris Wilson <chris.p.wilson at intel.com>
> Cc: Zbigniew Kempczynski <zbigniew.kempczynski at intel.com>
> Cc: Thomas Hellstrom <thomas.hellstrom at intel.com>
> Signed-off-by: Ramalingam C <ramalingam.c at intel.com>
Reviewed-by: Matthew Auld <matthew.auld at intel.com>
More information about the Intel-gfx
mailing list