v3dv: Increase alignment to 16k on CL BO on RPi5
We increase the alignment to 16k for BOs allocated for the CL on RPi5 HW. So we have the same ratio of usable space because of HW readahead as than on RPi4, as readahead has been increased from 256 to 1024 bytes on RPi5. We have also concluded that when the kernel is running with 16k pages that is the default on Raspberry Pi 5 HW, BO allocations are aligned to 16k so this increase has no cost and we would be using memory more efficiently. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29023>
This commit is contained in:

committed by
Marge Bot

parent
e2c624e74e
commit
bb77ac983e
@@ -32,9 +32,11 @@
|
||||
*/
|
||||
#if V3D_VERSION == 42
|
||||
#define V3D_CLE_READAHEAD 256
|
||||
#define V3D_CLE_BUFFER_MIN_SIZE 4096
|
||||
#endif
|
||||
#if V3D_VERSION >= 71
|
||||
#define V3D_CLE_READAHEAD 1024
|
||||
#define V3D_CLE_BUFFER_MIN_SIZE 16384
|
||||
#endif
|
||||
|
||||
void
|
||||
@@ -94,7 +96,7 @@ cl_alloc_bo(struct v3dv_cl *cl, uint32_t space, enum
|
||||
* of allocations with large command buffers. This has a very significant
|
||||
* impact on the number of draw calls per second reported by vkoverhead.
|
||||
*/
|
||||
space = align(space + unusable_space, 4096);
|
||||
space = align(space + unusable_space, V3D_CLE_BUFFER_MIN_SIZE);
|
||||
if (cl->bo)
|
||||
space = MAX2(cl->bo->size * 2, space);
|
||||
|
||||
|
Reference in New Issue
Block a user