mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 20:40:09 +01:00
panvk: Add a read-write non-cached memory pool for CSF events
Events cross the device boundary and can be read/written by the host. We could add the necessary cache flush and made those GPU-cached, but it's way simpler to allocate non-cached memory. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Reviewed-by: John Anthony <john.anthony@arm.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
This commit is contained in:
parent
53fb1d99ca
commit
7049d31676
2 changed files with 13 additions and 1 deletions
|
|
@ -69,6 +69,7 @@ struct panvk_device {
|
|||
|
||||
struct {
|
||||
struct panvk_pool rw;
|
||||
struct panvk_pool rw_nc;
|
||||
struct panvk_pool exec;
|
||||
} mempools;
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ panvk_device_init_mempools(struct panvk_device *dev)
|
|||
struct panvk_pool_properties rw_pool_props = {
|
||||
.create_flags = 0,
|
||||
.slab_size = 16 * 1024,
|
||||
.label = "Device RW memory pool",
|
||||
.label = "Device RW cached memory pool",
|
||||
.owns_bos = false,
|
||||
.needs_locking = true,
|
||||
.prealloc = false,
|
||||
|
|
@ -69,6 +69,17 @@ panvk_device_init_mempools(struct panvk_device *dev)
|
|||
|
||||
panvk_pool_init(&dev->mempools.rw, dev, NULL, &rw_pool_props);
|
||||
|
||||
struct panvk_pool_properties rw_nc_pool_props = {
|
||||
.create_flags = PAN_KMOD_BO_FLAG_GPU_UNCACHED,
|
||||
.slab_size = 16 * 1024,
|
||||
.label = "Device RW uncached memory pool",
|
||||
.owns_bos = false,
|
||||
.needs_locking = true,
|
||||
.prealloc = false,
|
||||
};
|
||||
|
||||
panvk_pool_init(&dev->mempools.rw_nc, dev, NULL, &rw_nc_pool_props);
|
||||
|
||||
struct panvk_pool_properties exec_pool_props = {
|
||||
.create_flags = PAN_KMOD_BO_FLAG_EXECUTABLE,
|
||||
.slab_size = 16 * 1024,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue