"Dump the contents of the control stream buffer on every job submit." },
{ "bo_track", PVR_DEBUG_TRACK_BOS,
"Track all buffer objects with at least one reference." },
- { "bo_zero", PVR_DEBUG_ZERO_BOS,
- "Zero all buffer objects at allocation to make them deterministic." },
{ "vk_desc", PVR_DEBUG_VK_DUMP_DESCRIPTOR_SET_LAYOUT,
"Dump descriptor set and pipeline layouts." },
{ "info", PVR_DEBUG_INFO,
* implies another it should be set here.
*/
- if (PVR_IS_DEBUG_SET(DUMP_CONTROL_STREAM)) {
+ if (PVR_IS_DEBUG_SET(DUMP_CONTROL_STREAM))
PVR_DEBUG_SET(TRACK_BOS);
- PVR_DEBUG_SET(ZERO_BOS);
- }
}
#define PVR_DEBUG_DUMP_CONTROL_STREAM BITFIELD_BIT(0)
#define PVR_DEBUG_TRACK_BOS BITFIELD_BIT(1)
-#define PVR_DEBUG_ZERO_BOS BITFIELD_BIT(2)
-#define PVR_DEBUG_VK_DUMP_DESCRIPTOR_SET_LAYOUT BITFIELD_BIT(3)
-#define PVR_DEBUG_INFO BITFIELD_BIT(4)
+#define PVR_DEBUG_VK_DUMP_DESCRIPTOR_SET_LAYOUT BITFIELD_BIT(2)
+#define PVR_DEBUG_INFO BITFIELD_BIT(3)
void pvr_process_debug_variable(void);
if (flags & PVR_BO_ALLOC_FLAG_PM_FW_PROTECT)
ws_flags |= PVR_WINSYS_BO_FLAG_PM_FW_PROTECT;
- if (flags & PVR_BO_ALLOC_FLAG_ZERO_ON_ALLOC)
- ws_flags |= PVR_WINSYS_BO_FLAG_ZERO_ON_ALLOC;
-
return ws_flags;
}
struct pvr_bo *pvr_bo;
VkResult result;
- if (PVR_IS_DEBUG_SET(ZERO_BOS))
- flags |= PVR_BO_ALLOC_FLAG_ZERO_ON_ALLOC;
-
pvr_bo = pvr_bo_alloc_bo(device);
if (!pvr_bo) {
result = vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY);
if (result != VK_SUCCESS)
goto err_buffer_destroy;
- if (flags & PVR_BO_ALLOC_FLAG_ZERO_ON_ALLOC)
- VG(VALGRIND_MAKE_MEM_DEFINED(pvr_bo->bo->map, pvr_bo->bo->size));
+ VG(VALGRIND_MAKE_MEM_DEFINED(pvr_bo->bo->map, pvr_bo->bo->size));
}
result = device->ws->ops->heap_alloc(heap, size, alignment, &pvr_bo->vma);
* firmware processor.
*/
#define PVR_BO_ALLOC_FLAG_PM_FW_PROTECT BITFIELD_BIT(3U)
-/**
- * \brief Flag passed to #pvr_bo_alloc() to indicate that the buffer should be
- * zeroed at allocation time.
- */
-#define PVR_BO_ALLOC_FLAG_ZERO_ON_ALLOC BITFIELD_BIT(4U)
VkResult pvr_bo_alloc(struct pvr_device *device,
struct pvr_winsys_heap *heap,
struct pvr_rt_dataset *rt_dataset,
uint32_t layers)
{
- const uint64_t bo_flags = PVR_BO_ALLOC_FLAG_GPU_UNCACHED |
- PVR_BO_ALLOC_FLAG_ZERO_ON_ALLOC;
uint64_t vheap_size;
uint32_t alignment;
uint64_t rtc_size;
device->heaps.general_heap,
vheap_size + rtc_size,
alignment,
- bo_flags,
+ PVR_BO_ALLOC_FLAG_GPU_UNCACHED,
&rt_dataset->vheap_rtc_bo);
if (result != VK_SUCCESS)
return result;
const struct pvr_rt_mtile_info *mtile_info,
uint32_t layers)
{
- const uint64_t bo_flags = PVR_BO_ALLOC_FLAG_GPU_UNCACHED |
- PVR_BO_ALLOC_FLAG_ZERO_ON_ALLOC;
uint64_t tpc_size;
pvr_rt_get_tail_ptr_stride_size(device,
device->heaps.general_heap,
tpc_size,
PVRX(CR_TE_TPC_ADDR_BASE_ALIGNMENT),
- bo_flags,
+ PVR_BO_ALLOC_FLAG_GPU_UNCACHED,
&rt_dataset->tpc_bo);
}
* accessible to the Parameter Manager unit and firmware processor.
*/
#define PVR_WINSYS_BO_FLAG_PM_FW_PROTECT BITFIELD_BIT(2U)
-/**
- * \brief Flag passed to #pvr_winsys_ops.buffer_create to indicate that the
- * buffer should be zeroed at allocation time.
- */
-#define PVR_WINSYS_BO_FLAG_ZERO_ON_ALLOC BITFIELD_BIT(3U)
struct pvr_winsys_bo {
struct pvr_winsys *ws;
* userspace mappings. Check to see if there's any situations where we
* wouldn't want this to be the case.
*/
- uint64_t srv_flags = PVR_SRV_MEMALLOCFLAG_GPU_READABLE |
- PVR_SRV_MEMALLOCFLAG_GPU_WRITEABLE |
- PVR_SRV_MEMALLOCFLAG_KERNEL_CPU_MAPPABLE |
- PVR_SRV_MEMALLOCFLAG_CPU_UNCACHED_WC;
+ uint64_t srv_flags =
+ PVR_SRV_MEMALLOCFLAG_GPU_READABLE | PVR_SRV_MEMALLOCFLAG_GPU_WRITEABLE |
+ PVR_SRV_MEMALLOCFLAG_KERNEL_CPU_MAPPABLE |
+ PVR_SRV_MEMALLOCFLAG_CPU_UNCACHED_WC | PVR_SRV_MEMALLOCFLAG_ZERO_ON_ALLOC;
if (ws_flags & PVR_WINSYS_BO_FLAG_CPU_ACCESS) {
srv_flags |= PVR_SRV_MEMALLOCFLAG_CPU_READABLE |
if (ws_flags & PVR_WINSYS_BO_FLAG_PM_FW_PROTECT)
srv_flags |= PVR_SRV_MEMALLOCFLAG_DEVICE_FLAG(PM_FW_PROTECT);
- if (ws_flags & PVR_WINSYS_BO_FLAG_ZERO_ON_ALLOC)
- srv_flags |= PVR_SRV_MEMALLOCFLAG_ZERO_ON_ALLOC;
-
return srv_flags;
}
return result;
}
- VG(VALGRIND_MALLOCLIKE_BLOCK(bo->map,
- bo->size,
- 0,
- srv_bo->flags &
- PVR_SRV_MEMALLOCFLAG_ZERO_ON_ALLOC));
+ VG(VALGRIND_MALLOCLIKE_BLOCK(bo->map, bo->size, 0, true));
buffer_acquire(srv_bo);