mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-20 14:20:36 +02:00
v3d: Rename cle_buffer_min_size to page_size
The variable doesn't store a granularity specific to CLE buffers. It stores the granularity that the OS imposes on buffer allocations (that is, the OS page size). Therefore, rename the variable to best reflect its meaning. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Signed-off-by: Maíra Canal <mcanal@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40496>
This commit is contained in:
parent
bfe92d50ce
commit
4db32305ec
4 changed files with 6 additions and 7 deletions
|
|
@ -78,7 +78,7 @@ v3d_get_device_info(int fd, struct v3d_device_info* devinfo, v3d_ioctl_fun drm_i
|
|||
uint64_t os_page_size;
|
||||
os_get_page_size(&os_page_size);
|
||||
assert(os_page_size <= UINT32_MAX);
|
||||
devinfo->cle_buffer_min_size = (uint32_t)os_page_size;
|
||||
devinfo->page_size = (uint32_t)os_page_size;
|
||||
|
||||
switch (devinfo->ver) {
|
||||
case 42:
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@ struct v3d_device_info {
|
|||
*/
|
||||
uint32_t cle_readahead;
|
||||
|
||||
/** Minimum size for a buffer storing the Control List Executor (CLE) */
|
||||
uint32_t cle_buffer_min_size;
|
||||
/** OS page size. It's the minimum allocation size for a v3d buffer. */
|
||||
uint32_t page_size;
|
||||
};
|
||||
|
||||
/* TFU has a 64-bytes readhead. To avoid the unit reading unmaped memory
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@ cl_alloc_bo(struct v3dv_cl *cl, uint32_t space, enum
|
|||
uint32_t unusable_space = 0;
|
||||
struct v3d_device_info *devinfo = &cl->job->device->devinfo;
|
||||
uint32_t cle_readahead = devinfo->cle_readahead;
|
||||
uint32_t cle_buffer_min_size = devinfo->cle_buffer_min_size;
|
||||
switch (chain_type) {
|
||||
case V3D_CL_BO_CHAIN_WITH_BRANCH:
|
||||
unusable_space = cle_readahead + cl_packet_length(BRANCH);
|
||||
|
|
@ -92,7 +91,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, cle_buffer_min_size);
|
||||
space = align(space + unusable_space, devinfo->page_size);
|
||||
if (cl->bo)
|
||||
space = MAX2(cl->bo->size * 2, space);
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ v3d_cl_ensure_space(struct v3d_cl *cl, uint32_t space, uint32_t alignment)
|
|||
/* If we are growing, double the BO allocation size to reduce the
|
||||
* number of allocations with large command buffers.
|
||||
*/
|
||||
space = align(space, devinfo->cle_buffer_min_size);
|
||||
space = align(space, devinfo->page_size);
|
||||
if (cl->bo)
|
||||
space = MAX2(cl->bo->size * 2, space);
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ v3d_cl_ensure_space_with_branch(struct v3d_cl *cl, uint32_t space)
|
|||
/* If we are growing, double the BO allocation size to reduce the
|
||||
* number of allocations with large command buffers.
|
||||
*/
|
||||
space = align(space + unusable_size, devinfo->cle_buffer_min_size);
|
||||
space = align(space + unusable_size, devinfo->page_size);
|
||||
if (cl->bo)
|
||||
space = MAX2(cl->bo->size * 2, space);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue