freedreno/replay: Allocated maximum available size for cs overriding

We pessimistically allocate 1MB per IB when overriding cs. There could
be lots of small IBs, so we should allocate as much space as possible
for overriding.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28276>
This commit is contained in:
Danylo Piliaiev 2024-03-19 17:01:17 +01:00 committed by Marge Bot
parent df3ba95a24
commit 74a1564aed

View file

@ -1259,11 +1259,8 @@ override_cmdstream(struct device *dev, struct cmdstream *cs,
/* Find a free space for the new cmdstreams and resources we will use
* when overriding existing cmdstream.
*/
/* TODO: should the size be configurable? */
uint64_t hole_size = 32 * 1024 * 1024;
dev->vma.alloc_high = true;
uint64_t hole_iova = util_vma_heap_alloc(&dev->vma, hole_size, 4096);
dev->vma.alloc_high = false;
uint64_t hole_size = util_vma_heap_get_max_free_continuous_size(&dev->vma);
uint64_t hole_iova = util_vma_heap_alloc(&dev->vma, hole_size, 1);
util_vma_heap_free(&dev->vma, hole_iova, hole_size);
char cmd[2048];