panfrost: Add a panfrost_context_reinit() helper

Will be needed for v10, so we can re-instantiate a context when an
unrecoverable error is reported on a group or VM.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
This commit is contained in:
Boris Brezillon
2023-11-13 15:39:50 +01:00
committed by Marge Bot
parent 5e3771ab5a
commit 5b53db5f60
2 changed files with 9 additions and 0 deletions
@@ -986,3 +986,10 @@ panfrost_create_context(struct pipe_screen *screen, void *priv, unsigned flags)
return gallium;
}
void
panfrost_context_reinit(struct panfrost_context *ctx)
{
pan_screen(ctx->base.screen)->vtbl.context_cleanup(ctx);
pan_screen(ctx->base.screen)->vtbl.context_init(ctx);
}
@@ -523,4 +523,6 @@ void panfrost_track_image_access(struct panfrost_batch *batch,
enum pipe_shader_type stage,
struct pipe_image_view *image);
void panfrost_context_reinit(struct panfrost_context *ctx);
#endif