panvk/csf: Pass a non-zero flush-id to benefit from cache flush reduction
The cache flush reduction mechanism relies on the flush ID to conditionally eliminate cache flush requests if another cache flush happened between the time the flush ID was retrieved and the time the flush operation happens. Store the current flush ID at EndCommandBuffer() time, and pass it back to the submit ioctl(). Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31230>
This commit is contained in:
committed by
Marge Bot
parent
73f7020ade
commit
28e4d22497
@@ -148,6 +148,7 @@ VKAPI_ATTR VkResult VKAPI_CALL
|
||||
panvk_per_arch(EndCommandBuffer)(VkCommandBuffer commandBuffer)
|
||||
{
|
||||
VK_FROM_HANDLE(panvk_cmd_buffer, cmdbuf, commandBuffer);
|
||||
struct panvk_device *dev = to_panvk_device(cmdbuf->vk.base.device);
|
||||
|
||||
emit_tls(cmdbuf);
|
||||
|
||||
@@ -162,6 +163,8 @@ panvk_per_arch(EndCommandBuffer)(VkCommandBuffer commandBuffer)
|
||||
}
|
||||
}
|
||||
|
||||
cmdbuf->flush_id = panthor_kmod_get_flush_id(dev->kmod.dev);
|
||||
|
||||
return vk_command_buffer_end(&cmdbuf->vk);
|
||||
}
|
||||
|
||||
|
||||
@@ -251,7 +251,7 @@ init_subqueue(struct panvk_queue *queue, enum panvk_subqueue_id subqueue)
|
||||
.queue_index = subqueue,
|
||||
.stream_size = cs_root_chunk_size(&b),
|
||||
.stream_addr = cs_root_chunk_gpu_addr(&b),
|
||||
.latest_flush = 0,
|
||||
.latest_flush = panthor_kmod_get_flush_id(dev->kmod.dev),
|
||||
.syncs = DRM_PANTHOR_OBJ_ARRAY(1, &syncop),
|
||||
};
|
||||
struct drm_panthor_group_submit gsubmit = {
|
||||
@@ -568,7 +568,7 @@ panvk_queue_submit(struct vk_queue *vk_queue, struct vk_queue_submit *submit)
|
||||
.queue_index = j,
|
||||
.stream_size = cs_root_chunk_size(&cmdbuf->state.cs[j].builder),
|
||||
.stream_addr = cs_root_chunk_gpu_addr(&cmdbuf->state.cs[j].builder),
|
||||
.latest_flush = 0,
|
||||
.latest_flush = cmdbuf->flush_id,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user