asahi: decode: Refactor to always copy GPU mem to local buffers
authorAsahi Lina <lina@asahilina.net>
Mon, 10 Jul 2023 15:42:52 +0000 (00:42 +0900)
committerMarge Bot <emma+marge@anholt.net>
Thu, 20 Jul 2023 15:33:28 +0000 (15:33 +0000)
commit56d5db247acfb41f22ac2c61eeca0fc94841247d
tree41c4833ff182f19043bdd886262ab7dea77117cb
parent2c2858c2afda009c35556dad372ec6eb621e0142
asahi: decode: Refactor to always copy GPU mem to local buffers

We want to plug this library into the hypervisor, but there we don't
have all GPU memory already mapped in our address space. Refactor the
GPU mem read function to always allocate local buffers and copy in the
data there.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
src/asahi/lib/decode.c