On 18/12/2024 19:14, Adrián Larumbe wrote:
> On 19.12.2024 02:18, Adrián Martínez Larumbe wrote:
>> From: Adrián Larumbe <adrian.laru...@collabora.com>
>>
>> This will display the sizes of kenrel BO's bound to an open file, which are
>> otherwise not exposed to UM through a handle.
>>
>> The sizes recorded are as follows:
>>  - Per group: suspend buffer, protm-suspend buffer, syncobjcs
>>  - Per queue: ringbuffer, profiling slots, firmware interface
>>  - For all heaps in all heap pools across all VM's bound to an open file,
>>  record size of all heap chuks, and for each pool the gpu_context BO too.
>>
>> This does not record the size of FW regions, as these aren't bound to a
>> specific open file and remain active through the whole life of the driver.
>>
>> Signed-off-by: Adrián Larumbe <adrian.laru...@collabora.com>
>> Reviewed-by: Liviu Dudau <liviu.du...@arm.com>
>> ---

[...]

>> +size_t panthor_heap_pool_size(struct panthor_heap_pool *pool)
>> +{
>> +    struct panthor_heap *heap;
>> +    unsigned long i;
>> +    size_t size = 0;
>> +
>> +    down_read(&pool->lock);
>> +    xa_for_each(&pool->xa, i, heap)
>> +            size += heap->chunk_size * heap->chunk_count;
>> +    up_write(&pool->lock);
> 
> Oh well, just realised I forgot to change this to up_read() so will do in a 
> final revision.

With that fixed, feel free to add:

Reviewed-by: Steven Price <steven.pr...@arm.com>

Thanks,
Steve

Reply via email to