freedreno/fence: Hold a strong ref to batch
We don't want a unflushed fence to outlive it's batch, otherwise we run into trouble when it comes time to wait on the fence. For ex:
- Create a fence before framebuffer state is set, with the PIPE_FLUSH_DEFERRED flags. This creates a new batch, to which the ctx holds the only reference (unless the fence also holds a ref)
- set_framebuffer_state() creates a new batch and drops the ctx->batch reference.
- Later something tries to wait on the fence
Closes: #8621 (closed) Signed-off-by: Rob Clark robdclark@chromium.org