On 09/12/2025 13:01, Nicolas Frattaroli wrote:
> On Monday, 8 December 2025 18:14:53 Central European Standard Time Karunika 
> Choo wrote:
>> On 03/12/2025 13:56, Nicolas Frattaroli wrote:
>>> [... snip ...]
>>> diff --git a/drivers/gpu/drm/panthor/panthor_trace.h 
>>> b/drivers/gpu/drm/panthor/panthor_trace.h
>>> new file mode 100644
>>> index 000000000000..01013f81e68a
>>> --- /dev/null
>>> +++ b/drivers/gpu/drm/panthor/panthor_trace.h
>>> @@ -0,0 +1,38 @@
>>> +/* SPDX-License-Identifier: GPL-2.0 or MIT */
>>> +/* Copyright 2025 Collabora ltd. */
>>> +
>>> +#undef TRACE_SYSTEM
>>> +#define TRACE_SYSTEM panthor
>>> +
>>> +#if !defined(__PANTHOR_TRACE_H__) || defined(TRACE_HEADER_MULTI_READ)
>>> +#define __PANTHOR_TRACE_H__
>>> +
>>> +#include <linux/tracepoint.h>
>>> +#include <linux/types.h>
>>> +
>>> +TRACE_EVENT(gpu_power_active,
>>> +   TP_PROTO(u64 shader_bitmap, u64 tiler_bitmap, u64 l2_bitmap),
>>
>> nit: if you want to add tracing can we also add the device name as
>> well? Something like:
>>
>>   TP_PROTO(struct device *dev, ...),
>>   TP_ARGS(dev, ...),
>>   TP_STRUCT__ENTRY(
>>           __string(dev_name, dev_name(dev))
>>           ...
>>   ).
>>   ...
> 
> This is a great idea, will do. Any specific reason to pass the
> device in the tracepoint rather than a const char*?
> 

Nope, totaly fine to do it that way as well.

Kind regards,
Karunika

>>
>> This will help differentiate the device it is originating from in
>> a multi GPU situation.
> 
> I'll try not to get too excited at the prospect of systems using
> multiple Mali GPUs because I know the likeliest case this happens
> on is Arm evaluation systems with a hard IP and a soft IP loaded to
> the FPGA core. :)
> 
> Kind regards,
> Nicolas Frattaroli
> 
>>
>> Kind regards,
>> Karunika
>>
>>> +   TP_ARGS(shader_bitmap, tiler_bitmap, l2_bitmap),
>>> +   TP_STRUCT__entry(
>>> +           __field(u64, shader_bitmap)
>>> +           __field(u64, tiler_bitmap)
>>> +           __field(u64, l2_bitmap)
>>> +   ),
>>> +   TP_fast_assign(
>>> +           __entry->shader_bitmap  = shader_bitmap;
>>> +           __entry->tiler_bitmap   = tiler_bitmap;
>>> +           __entry->l2_bitmap      = l2_bitmap;
>>> +   ),
>>> +   TP_printk("shader_bitmap=0x%llx tiler_bitmap=0x%llx l2_bitmap=0x%llx",
>>> +             __entry->shader_bitmap, __entry->tiler_bitmap, 
>>> __entry->l2_bitmap
>>> +   )
>>> +);
>>> +
>>> +#endif /* __PANTHOR_TRACE_H__ */
>>> +
>>> +#undef TRACE_INCLUDE_PATH
>>> +#define TRACE_INCLUDE_PATH .
>>> +#undef TRACE_INCLUDE_FILE
>>> +#define TRACE_INCLUDE_FILE panthor_trace
>>> +
>>> +#include <trace/define_trace.h>
>>>
>>
>>
>>
> 
> 
> 
> 

Reply via email to