Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nilawar, Badal" <badal.nilawar@intel.com>
To: Andi Shyti <andi.shyti@linux.intel.com>
Cc: linux-hwmon@vger.kernel.org, linux@roeck-us.net,
	intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [PATCH v3 3/6] drm/xe/hwmon: Expose card reactive critical power
Date: Fri, 4 Aug 2023 19:01:59 +0530	[thread overview]
Message-ID: <f2ccce13-3ad0-3a41-0341-d6b593eb111b@intel.com> (raw)
In-Reply-To: <ZMrmj9PsP4H0b+ZM@ashyti-mobl2.lan>



On 03-08-2023 04:58, Andi Shyti wrote:
> Hi Badal,
> 
> On Wed, Aug 02, 2023 at 07:22:38PM +0530, Badal Nilawar wrote:
>> Expose the card reactive critical (I1) power. I1 is exposed as
>> power1_crit in microwatts (typically for client products) or as
>> curr1_crit in milliamperes (typically for server).
>>
>> v2:
>>    - Move PCODE_MBOX macro to pcode file (Riana)
>> v3:
>>    - %s/hwm_/hwmon_/ (Matt Brost)
>>    - s/IS_DG2/(gt_to_xe(gt)->info.platform == XE_DG2)
>>
>> Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
>> ---
>>   .../ABI/testing/sysfs-driver-intel-xe-hwmon   |  26 +++++
>>   drivers/gpu/drm/xe/xe_hwmon.c                 | 106 +++++++++++++++++-
>>   drivers/gpu/drm/xe/xe_pcode.h                 |   5 +
>>   drivers/gpu/drm/xe/xe_pcode_api.h             |   7 ++
>>   4 files changed, 143 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon b/Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon
>> index d48d98f903ed..ea60add73743 100644
>> --- a/Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon
>> +++ b/Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon
>> @@ -20,3 +20,29 @@ Description:	RO. Card default power limit (default TDP setting).
>>   
>>   		Only supported for particular Intel xe graphics platforms.
>>   
>> +What:		/sys/devices/.../hwmon/hwmon<i>/power1_crit
>> +Date:		August 2023
>> +KernelVersion:	6.4
>> +Contact:	intel-xe@lists.freedesktop.org
>> +Description:	RW. Card reactive critical (I1) power limit in microwatts.
>> +
>> +		Card reactive critical (I1) power limit in microwatts is exposed
>> +		for client products. The power controller will throttle the
>> +		operating frequency if the power averaged over a window exceeds
>> +		this limit.
>> +
>> +		Only supported for particular Intel xe graphics platforms.
>> +
>> +What:		/sys/devices/.../hwmon/hwmon<i>/curr1_crit
>> +Date:		August 2023
>> +KernelVersion:	6.4
>> +Contact:	intel-xe@lists.freedesktop.org
>> +Description:	RW. Card reactive critical (I1) power limit in milliamperes.
>> +
>> +		Card reactive critical (I1) power limit in milliamperes is
>> +		exposed for server products. The power controller will throttle
>> +		the operating frequency if the power averaged over a window
>> +		exceeds this limit.
>> +
>> +		Only supported for particular Intel xe graphics platforms.
>> +
>> diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
>> index ce8dac2168f6..ceab142f6d42 100644
>> --- a/drivers/gpu/drm/xe/xe_hwmon.c
>> +++ b/drivers/gpu/drm/xe/xe_hwmon.c
>> @@ -12,6 +12,8 @@
>>   #include "xe_hwmon.h"
>>   #include "xe_mmio.h"
>>   #include "xe_gt.h"
>> +#include "xe_pcode.h"
>> +#include "xe_pcode_api.h"
>>   
>>   enum hwmon_reg_name {
>>   	REG_PKG_RAPL_LIMIT,
>> @@ -28,8 +30,10 @@ enum hwmon_reg_operation {
>>   /*
>>    * SF_* - scale factors for particular quantities according to hwmon spec.
>>    * - power  - microwatts
>> + * - curr   - milliamperes
> 
> Ah... it's a table...
> 
>>    */
>>   #define SF_POWER	1000000
>> +#define SF_CURR		1000
> 
> ... you could add it on the side
> 
> #define SF_POWER	1000000 /* microwatt */
> #define SF_CURR		   1000 /* milliamperes */
> 
> The rest looks good
Sure, will take this in next revision.

Regards,
Badal
> 
> Andi

  reply	other threads:[~2023-08-04 13:32 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-02 13:52 [Intel-xe] [PATCH v3 0/6] Add HWMON support for DGFX Badal Nilawar
2023-08-02 13:49 ` [Intel-xe] ✓ CI.Patch_applied: success for Add HWMON support for DGFX (rev3) Patchwork
2023-08-02 13:49 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-08-02 13:50 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-08-02 13:52 ` [Intel-xe] [PATCH v3 1/6] drm/xe/hwmon: Add HWMON infrastructure Badal Nilawar
2023-08-02 14:15   ` Guenter Roeck
2023-08-02 22:40   ` Andi Shyti
2023-08-02 23:11     ` Guenter Roeck
2023-08-02 23:34       ` Andi Shyti
2023-08-03  0:06         ` Guenter Roeck
2023-08-02 23:12     ` Guenter Roeck
2023-08-04 13:19       ` Nilawar, Badal
2023-08-04 14:26         ` Guenter Roeck
2023-08-04 14:36           ` Nilawar, Badal
2023-08-08 21:31             ` Rodrigo Vivi
2023-08-08 22:07               ` Guenter Roeck
2023-08-11 16:01                 ` Rodrigo Vivi
2023-08-11 17:39                   ` Guenter Roeck
2023-08-11 18:48                     ` Rodrigo Vivi
2023-08-04 14:43           ` Nilawar, Badal
2023-08-04 13:25     ` Nilawar, Badal
2023-08-02 13:52 ` [Intel-xe] [PATCH v3 2/6] drm/xe/hwmon: Expose power attributes Badal Nilawar
2023-08-02 23:23   ` Andi Shyti
2023-08-04 14:21     ` Nilawar, Badal
2023-08-02 13:52 ` [Intel-xe] [PATCH v3 3/6] drm/xe/hwmon: Expose card reactive critical power Badal Nilawar
2023-08-02 23:28   ` Andi Shyti
2023-08-04 13:31     ` Nilawar, Badal [this message]
2023-08-02 13:52 ` [Intel-xe] [PATCH v3 4/6] drm/xe/hwmon: Expose input voltage attribute Badal Nilawar
2023-08-02 23:32   ` Andi Shyti
2023-08-04 13:30     ` Nilawar, Badal
2023-08-02 13:52 ` [Intel-xe] [PATCH v3 5/6] drm/xe/hwmon: Expose hwmon energy attribute Badal Nilawar
2023-08-02 14:14   ` Guenter Roeck
2023-08-03  6:34     ` Nilawar, Badal
2023-08-03 14:42       ` Guenter Roeck
2023-08-02 13:52 ` [Intel-xe] [PATCH v3 6/6] drm/xe/hwmon: Expose power1_max_interval Badal Nilawar
2023-08-02 13:54 ` [Intel-xe] ✓ CI.Build: success for Add HWMON support for DGFX (rev3) Patchwork
2023-08-02 13:54 ` [Intel-xe] ✗ CI.Hooks: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f2ccce13-3ad0-3a41-0341-d6b593eb111b@intel.com \
    --to=badal.nilawar@intel.com \
    --cc=andi.shyti@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox