struct pvr_device_runtime_info {
uint64_t min_free_list_size;
+ uint64_t max_free_list_size;
uint64_t reserved_shared_size;
uint64_t total_reserved_partition_size;
uint64_t num_phantoms;
#ifndef PVR_ROGUE_FW_H
#define PVR_ROGUE_FW_H
-/**
- * Maximum PB free list size supported by RGX and Services.
- *
- * Maximum PB free list size must ensure that no PM address space can be fully
- * used, because if the full address space was used it would wrap and corrupt
- * itself. Since there are two freelists (local is always minimum sized) this
- * can be described as following three conditions being met:
- *
- * Minimum PB + Maximum PB < ALIST PM address space size (16GB)
- * Minimum PB + Maximum PB < TE PM address space size (16GB) / NUM_TE_PIPES
- * Minimum PB + Maximum PB < VCE PM address space size (16GB) / NUM_VCE_PIPES
- *
- * Since the max of NUM_TE_PIPES and NUM_VCE_PIPES is 4, we have a hard limit
- * of 4GB minus the Minimum PB. For convenience we take the smaller power-of-2
- * value of 2GB. This is far more than any normal application would request
- * or use.
- */
-#define ROGUE_FREE_LIST_MAX_SIZE (2ULL * 1024ULL * 1024ULL * 1024ULL)
-
/* FIXME: This will change based on the firmware configuration, which will vary
* depending on the BVNC and firmware version. The powervr KM driver allows this
* information to be queried, but the pvrsrvkm KM driver doesn't. This
struct pvr_free_list *parent_free_list,
struct pvr_free_list **const free_list_out)
{
+ const struct pvr_device_runtime_info *runtime_info =
+ &device->pdevice->dev_runtime_info;
struct pvr_winsys_free_list *parent_ws_free_list =
parent_free_list ? parent_free_list->ws_free_list : NULL;
const uint64_t bo_flags = PVR_BO_ALLOC_FLAG_GPU_UNCACHED |
/* Make sure the 'max' size doesn't exceed what the firmware supports and
* adjust the other sizes accordingly.
*/
- if (max_size > ROGUE_FREE_LIST_MAX_SIZE) {
- max_size = ROGUE_FREE_LIST_MAX_SIZE;
+ if (max_size > runtime_info->max_free_list_size) {
+ max_size = runtime_info->max_free_list_size;
assert(align64(max_size, size_alignment) == max_size);
}
/* Amount of space used to hold sync prim values (in bytes). */
#define PVR_SRV_SYNC_PRIM_VALUE_SIZE 4U
+/**
+ * Maximum PB free list size supported by RGX and Services.
+ *
+ * Maximum PB free list size must ensure that no PM address space can be fully
+ * used, because if the full address space was used it would wrap and corrupt
+ * itself. Since there are two freelists (local is always minimum sized) this
+ * can be described as following three conditions being met:
+ *
+ * Minimum PB + Maximum PB < ALIST PM address space size (16GB)
+ * Minimum PB + Maximum PB < TE PM address space size (16GB) / NUM_TE_PIPES
+ * Minimum PB + Maximum PB < VCE PM address space size (16GB) / NUM_VCE_PIPES
+ *
+ * Since the max of NUM_TE_PIPES and NUM_VCE_PIPES is 4, we have a hard limit
+ * of 4GB minus the Minimum PB. For convenience we take the smaller power-of-2
+ * value of 2GB. This is far more than any normal application would request
+ * or use.
+ */
+#define PVR_SRV_FREE_LIST_MAX_SIZE (2ULL * 1024ULL * 1024ULL * 1024ULL)
+
static VkResult pvr_srv_heap_init(
struct pvr_srv_winsys *srv_ws,
struct pvr_srv_winsys_heap *srv_heap,
}
runtime_info->min_free_list_size = pvr_srv_get_min_free_list_size(dev_info);
+ runtime_info->max_free_list_size = PVR_SRV_FREE_LIST_MAX_SIZE;
runtime_info->reserved_shared_size =
pvr_srv_get_reserved_shared_size(dev_info);
runtime_info->total_reserved_partition_size =