[PATCH 2/2] accel/ivpu: Show NPU frequency in sysfs
Falkowski, Maciej
maciej.falkowski at linux.intel.com
Tue Apr 8 14:55:19 UTC 2025
On 4/4/2025 5:13 PM, Jeff Hugo wrote:
> On 4/1/2025 9:59 AM, Maciej Falkowski wrote:
>> From: Andrzej Kacprowski <Andrzej.Kacprowski at intel.com>
>>
>> Add sysfs files that show maximum and current
>> frequency of the NPU's data processing unit.
>> New sysfs entries:
>> - npu_max_frequency_mhz
>
> Don't you have an ioctl to get this, which is fixed in patch 1 of the
> series? Why duplicate that with a sysfs?
We added this to keep it consistent with sysfs entry for current frequency.
This is more for a convenience but ioctl is still required as user-mode
driver requires this.
Do you think it is justified having this consideration?
>
>> - npu_current_frequency_mhz
>
> Do you have userspace code that consumes these?
We do have a support for two device monitors in a userspace -
resources[1] and btop[2].
I develop myself a btop support and have already frequency included, I
will also include it in resources.
[1]: https://github.com/nokyan/resources/blob/main/src/utils/npu/intel.rs
<https://github.com/nokyan/resources/blob/main/src/utils/npu/intel.rs>[2]:
https://github.com/m-falkowski/btop
>
>>
>> Signed-off-by: Andrzej Kacprowski <Andrzej.Kacprowski at intel.com>
>> Signed-off-by: Maciej Falkowski <maciej.falkowski at linux.intel.com>
>> ---
>> drivers/accel/ivpu/ivpu_hw.h | 5 ++++
>> drivers/accel/ivpu/ivpu_hw_btrs.c | 8 +++++
>> drivers/accel/ivpu/ivpu_hw_btrs.h | 1 +
>> drivers/accel/ivpu/ivpu_sysfs.c | 49 ++++++++++++++++++++++++++++++-
>
> Missing uapi documentation.
>
> Also, should the sysfs maintainers be included in the review?
>
Thank you for point this out. I included recipients using
get_maintainers script.
Best regards,
Maciej
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20250408/db68157a/attachment.htm>
More information about the dri-devel
mailing list