Lines Matching refs:bo_labels
48 if (!vc4->bo_labels[i].num_allocated) in vc4_bo_stats_dump()
52 vc4->bo_labels[i].name, in vc4_bo_stats_dump()
53 vc4->bo_labels[i].size_allocated / 1024, in vc4_bo_stats_dump()
54 vc4->bo_labels[i].num_allocated); in vc4_bo_stats_dump()
79 if (!vc4->bo_labels[i].num_allocated) in vc4_bo_stats_debugfs()
83 vc4->bo_labels[i].name, in vc4_bo_stats_debugfs()
84 vc4->bo_labels[i].size_allocated / 1024, in vc4_bo_stats_debugfs()
85 vc4->bo_labels[i].num_allocated); in vc4_bo_stats_debugfs()
118 if (!vc4->bo_labels[i].name) { in vc4_get_user_label()
120 } else if (strcmp(vc4->bo_labels[i].name, name) == 0) { in vc4_get_user_label()
127 WARN_ON(vc4->bo_labels[free_slot].num_allocated != 0); in vc4_get_user_label()
128 vc4->bo_labels[free_slot].name = name; in vc4_get_user_label()
133 krealloc(vc4->bo_labels, in vc4_get_user_label()
143 vc4->bo_labels = new_labels; in vc4_get_user_label()
146 vc4->bo_labels[free_slot].name = name; in vc4_get_user_label()
147 vc4->bo_labels[free_slot].num_allocated = 0; in vc4_get_user_label()
148 vc4->bo_labels[free_slot].size_allocated = 0; in vc4_get_user_label()
162 vc4->bo_labels[label].num_allocated++; in vc4_bo_set_label()
163 vc4->bo_labels[label].size_allocated += gem_obj->size; in vc4_bo_set_label()
166 vc4->bo_labels[bo->label].num_allocated--; in vc4_bo_set_label()
167 vc4->bo_labels[bo->label].size_allocated -= gem_obj->size; in vc4_bo_set_label()
169 if (vc4->bo_labels[bo->label].num_allocated == 0 && in vc4_bo_set_label()
176 kfree(vc4->bo_labels[bo->label].name); in vc4_bo_set_label()
177 vc4->bo_labels[bo->label].name = NULL; in vc4_bo_set_label()
427 vc4->bo_labels[VC4_BO_TYPE_KERNEL].num_allocated++; in vc4_create_object()
428 vc4->bo_labels[VC4_BO_TYPE_KERNEL].size_allocated += size; in vc4_create_object()
1029 vc4->bo_labels = kcalloc(VC4_BO_TYPE_COUNT, sizeof(*vc4->bo_labels), in vc4_bo_cache_init()
1031 if (!vc4->bo_labels) in vc4_bo_cache_init()
1037 vc4->bo_labels[i].name = bo_type_names[i]; in vc4_bo_cache_init()
1060 if (vc4->bo_labels[i].num_allocated) { in vc4_bo_cache_destroy()
1063 vc4->bo_labels[i].num_allocated, in vc4_bo_cache_destroy()
1064 vc4->bo_labels[i].name); in vc4_bo_cache_destroy()
1068 kfree(vc4->bo_labels[i].name); in vc4_bo_cache_destroy()
1070 kfree(vc4->bo_labels); in vc4_bo_cache_destroy()