Re: [PATCH v5 1/2] drm/panthor: Expose size of driver internal BO's over fdinfo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.larumbe@xxxxxxxxxxxxx>
>>
>> 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.larumbe@xxxxxxxxxxxxx>
>> Reviewed-by: Liviu Dudau <liviu.dudau@xxxxxxx>
>> ---

[...]

>> +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.price@xxxxxxx>

Thanks,
Steve



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux