tu: Pass real size of prime buffers to allocator
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 24 Aug 2023 04:48:54 +0000 (07:48 +0300)
committerMarge Bot <emma+marge@anholt.net>
Thu, 24 Aug 2023 16:35:43 +0000 (16:35 +0000)
commit2fdcc00b0154cb094a5fd2c9253904fc9073d96e
tree0414a1fb01ecf4326c8f06c202a4365ae50c2861
parentcda196183578bbc0871c863ff8ec37771f3b4baa
tu: Pass real size of prime buffers to allocator

The msm driver reserves the actual DMABUF size in the memory map, while
TU can request smaller memory chunk to be allocated. This potentially
can lead to a situation when next allocation IOVA will be in the middle
of the address space which is reserved for the DMABUF. Pass the
`real_size' to TU allocator instead, so that kernel and userspace have
the same picture of memory allocations.

Cc: mesa-stable
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24861>
src/freedreno/vulkan/tu_knl_drm_msm.cc