freedreno/a6xx: move ubwc clear to blitter
authorRob Clark <robdclark@chromium.org>
Wed, 26 Aug 2020 18:47:02 +0000 (11:47 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 28 Aug 2020 22:24:25 +0000 (22:24 +0000)
commit8d1d0c126fdf4e65cef9d140c3254331549847fa
tree303c0b683281ac00f0ddcea5fe0aeb017d914317
parent8d9ab0a33bb17a7f2eebe4369d8b130548ecbac4
freedreno/a6xx: move ubwc clear to blitter

Avoid having to mmap() unnecessarily by moving UBWC clear/init to
blitter.

Because we don't have a context when the bo is allocated, we need to
lazily initialize UBWC data, so hook into the resource_written()
tracking to do this.  Don't bother with resource_read() because that
would be undefined anyways.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6475>
src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
src/gallium/drivers/freedreno/freedreno_batch.c
src/gallium/drivers/freedreno/freedreno_context.h
src/gallium/drivers/freedreno/freedreno_resource.c
src/gallium/drivers/freedreno/freedreno_resource.h