All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: "Gupta, Anshuman" <anshuman.gupta@intel.com>
Cc: "Nilawar, Badal" <badal.nilawar@intel.com>,
	intel-gfx@lists.freedesktop.org, riana.tauro@intel.com,
	jon.ewins@intel.com, linux-hwmon@vger.kernel.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 3/7] drm/i915/hwmon: Power PL1 limit and TDP setting
Date: Thu, 22 Sep 2022 19:26:19 -0700	[thread overview]
Message-ID: <87a66qn7w4.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <c5c19826-2163-e473-24b6-5ff90ee07c33@intel.com>

On Thu, 22 Sep 2022 00:08:46 -0700, Gupta, Anshuman wrote:
>

Hi Anshuman,

> On 9/21/2022 8:23 PM, Nilawar, Badal wrote:
> >
> > On 21-09-2022 17:15, Gupta, Anshuman wrote:
> >>
> >>> +static int
> >>> +hwm_power_read(struct hwm_drvdata *ddat, u32 attr, int chan, long *val)
> >>> +{
> >>> +    struct i915_hwmon *hwmon = ddat->hwmon;
> >>> +
> >>> +    switch (attr) {
> >>> +    case hwmon_power_max:
> >>> +        *val = hwm_field_read_and_scale(ddat,
> >>> +                        hwmon->rg.pkg_rapl_limit,
> >>> +                        PKG_PWR_LIM_1,
> >>> +                        hwmon->scl_shift_power,
> >>> +                        SF_POWER);
> >>> +        return 0;
> >>> +    case hwmon_power_rated_max:
> >>> +        *val = hwm_field_read_and_scale(ddat,
> >>> +                        hwmon->rg.pkg_power_sku,
> >>> +                        PKG_PKG_TDP,It seems a dead code,
> >>> pkg_power_sky register in initialized with
> >> INVALID_MMMIO_REG, why are we exposing this, unless i am missing
> >> something ?
> > Agree that for platforms considered in this series does not support
> > hwmon_power_rated_max. In fact hwm_power_is_visible will not allow to
> > create sysfs entry if pkg_power_sku is not supported. Considering future
> > dgfx platforms we didn't remove this entry. In future for supported
> > platforms we just need to assign valid register to pkg_power_sku.
>
> AFAIU PACKAGE_POWER_SKU reg is valid for both DG1 and DG2 from BSpec:51862
> So we need to define the register.
> See once more comment below,

Thanks for pointing out, I didn't know where to look for it. We will add
it. Thanks to Badal for locating the register too.

> >
> > Regards,
> > Badal
> >> Br,
> >> Anshuman.
> >>> +                        hwmon->scl_shift_power,
> >>> +                        SF_POWER);
> >>> +        return 0;
> >>> +    default:
> >>> +        return -EOPNOTSUPP;
> >>> +    }
> >>> +}
> >>> +
> >>> +static int
> /snip
> >>> diff --git a/drivers/gpu/drm/i915/i915_reg.h
> >>> b/drivers/gpu/drm/i915/i915_reg.h
> >>> index 1a9bd829fc7e..55c35903adca 100644
> >>> --- a/drivers/gpu/drm/i915/i915_reg.h
> >>> +++ b/drivers/gpu/drm/i915/i915_reg.h
> >>> @@ -1807,6 +1807,11 @@
> >>>   #define   POWER_LIMIT_1_MASK        REG_BIT(10)
> >>>   #define   POWER_LIMIT_2_MASK        REG_BIT(11)
> >>> +/*
> >>> + * *_PACKAGE_POWER_SKU - SKU power and timing parameters.
> >>> + */
> >>> +#define   PKG_PKG_TDP            GENMASK_ULL(14, 0)
> Define register above this definition, GENMASK should follow
> by a register.

Will do.

Thanks.
--
Ashutosh

WARNING: multiple messages have this Message-ID (diff)
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: "Gupta, Anshuman" <anshuman.gupta@intel.com>
Cc: linux-hwmon@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, jon.ewins@intel.com, "Nilawar,
	Badal" <badal.nilawar@intel.com>,
	riana.tauro@intel.com
Subject: Re: [PATCH 3/7] drm/i915/hwmon: Power PL1 limit and TDP setting
Date: Thu, 22 Sep 2022 19:26:19 -0700	[thread overview]
Message-ID: <87a66qn7w4.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <c5c19826-2163-e473-24b6-5ff90ee07c33@intel.com>

On Thu, 22 Sep 2022 00:08:46 -0700, Gupta, Anshuman wrote:
>

Hi Anshuman,

> On 9/21/2022 8:23 PM, Nilawar, Badal wrote:
> >
> > On 21-09-2022 17:15, Gupta, Anshuman wrote:
> >>
> >>> +static int
> >>> +hwm_power_read(struct hwm_drvdata *ddat, u32 attr, int chan, long *val)
> >>> +{
> >>> +    struct i915_hwmon *hwmon = ddat->hwmon;
> >>> +
> >>> +    switch (attr) {
> >>> +    case hwmon_power_max:
> >>> +        *val = hwm_field_read_and_scale(ddat,
> >>> +                        hwmon->rg.pkg_rapl_limit,
> >>> +                        PKG_PWR_LIM_1,
> >>> +                        hwmon->scl_shift_power,
> >>> +                        SF_POWER);
> >>> +        return 0;
> >>> +    case hwmon_power_rated_max:
> >>> +        *val = hwm_field_read_and_scale(ddat,
> >>> +                        hwmon->rg.pkg_power_sku,
> >>> +                        PKG_PKG_TDP,It seems a dead code,
> >>> pkg_power_sky register in initialized with
> >> INVALID_MMMIO_REG, why are we exposing this, unless i am missing
> >> something ?
> > Agree that for platforms considered in this series does not support
> > hwmon_power_rated_max. In fact hwm_power_is_visible will not allow to
> > create sysfs entry if pkg_power_sku is not supported. Considering future
> > dgfx platforms we didn't remove this entry. In future for supported
> > platforms we just need to assign valid register to pkg_power_sku.
>
> AFAIU PACKAGE_POWER_SKU reg is valid for both DG1 and DG2 from BSpec:51862
> So we need to define the register.
> See once more comment below,

Thanks for pointing out, I didn't know where to look for it. We will add
it. Thanks to Badal for locating the register too.

> >
> > Regards,
> > Badal
> >> Br,
> >> Anshuman.
> >>> +                        hwmon->scl_shift_power,
> >>> +                        SF_POWER);
> >>> +        return 0;
> >>> +    default:
> >>> +        return -EOPNOTSUPP;
> >>> +    }
> >>> +}
> >>> +
> >>> +static int
> /snip
> >>> diff --git a/drivers/gpu/drm/i915/i915_reg.h
> >>> b/drivers/gpu/drm/i915/i915_reg.h
> >>> index 1a9bd829fc7e..55c35903adca 100644
> >>> --- a/drivers/gpu/drm/i915/i915_reg.h
> >>> +++ b/drivers/gpu/drm/i915/i915_reg.h
> >>> @@ -1807,6 +1807,11 @@
> >>>   #define   POWER_LIMIT_1_MASK        REG_BIT(10)
> >>>   #define   POWER_LIMIT_2_MASK        REG_BIT(11)
> >>> +/*
> >>> + * *_PACKAGE_POWER_SKU - SKU power and timing parameters.
> >>> + */
> >>> +#define   PKG_PKG_TDP            GENMASK_ULL(14, 0)
> Define register above this definition, GENMASK should follow
> by a register.

Will do.

Thanks.
--
Ashutosh

WARNING: multiple messages have this Message-ID (diff)
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: "Gupta, Anshuman" <anshuman.gupta@intel.com>
Cc: linux-hwmon@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 3/7] drm/i915/hwmon: Power PL1 limit and TDP setting
Date: Thu, 22 Sep 2022 19:26:19 -0700	[thread overview]
Message-ID: <87a66qn7w4.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <c5c19826-2163-e473-24b6-5ff90ee07c33@intel.com>

On Thu, 22 Sep 2022 00:08:46 -0700, Gupta, Anshuman wrote:
>

Hi Anshuman,

> On 9/21/2022 8:23 PM, Nilawar, Badal wrote:
> >
> > On 21-09-2022 17:15, Gupta, Anshuman wrote:
> >>
> >>> +static int
> >>> +hwm_power_read(struct hwm_drvdata *ddat, u32 attr, int chan, long *val)
> >>> +{
> >>> +    struct i915_hwmon *hwmon = ddat->hwmon;
> >>> +
> >>> +    switch (attr) {
> >>> +    case hwmon_power_max:
> >>> +        *val = hwm_field_read_and_scale(ddat,
> >>> +                        hwmon->rg.pkg_rapl_limit,
> >>> +                        PKG_PWR_LIM_1,
> >>> +                        hwmon->scl_shift_power,
> >>> +                        SF_POWER);
> >>> +        return 0;
> >>> +    case hwmon_power_rated_max:
> >>> +        *val = hwm_field_read_and_scale(ddat,
> >>> +                        hwmon->rg.pkg_power_sku,
> >>> +                        PKG_PKG_TDP,It seems a dead code,
> >>> pkg_power_sky register in initialized with
> >> INVALID_MMMIO_REG, why are we exposing this, unless i am missing
> >> something ?
> > Agree that for platforms considered in this series does not support
> > hwmon_power_rated_max. In fact hwm_power_is_visible will not allow to
> > create sysfs entry if pkg_power_sku is not supported. Considering future
> > dgfx platforms we didn't remove this entry. In future for supported
> > platforms we just need to assign valid register to pkg_power_sku.
>
> AFAIU PACKAGE_POWER_SKU reg is valid for both DG1 and DG2 from BSpec:51862
> So we need to define the register.
> See once more comment below,

Thanks for pointing out, I didn't know where to look for it. We will add
it. Thanks to Badal for locating the register too.

> >
> > Regards,
> > Badal
> >> Br,
> >> Anshuman.
> >>> +                        hwmon->scl_shift_power,
> >>> +                        SF_POWER);
> >>> +        return 0;
> >>> +    default:
> >>> +        return -EOPNOTSUPP;
> >>> +    }
> >>> +}
> >>> +
> >>> +static int
> /snip
> >>> diff --git a/drivers/gpu/drm/i915/i915_reg.h
> >>> b/drivers/gpu/drm/i915/i915_reg.h
> >>> index 1a9bd829fc7e..55c35903adca 100644
> >>> --- a/drivers/gpu/drm/i915/i915_reg.h
> >>> +++ b/drivers/gpu/drm/i915/i915_reg.h
> >>> @@ -1807,6 +1807,11 @@
> >>>   #define   POWER_LIMIT_1_MASK        REG_BIT(10)
> >>>   #define   POWER_LIMIT_2_MASK        REG_BIT(11)
> >>> +/*
> >>> + * *_PACKAGE_POWER_SKU - SKU power and timing parameters.
> >>> + */
> >>> +#define   PKG_PKG_TDP            GENMASK_ULL(14, 0)
> Define register above this definition, GENMASK should follow
> by a register.

Will do.

Thanks.
--
Ashutosh

  reply	other threads:[~2022-09-23  2:26 UTC|newest]

Thread overview: 121+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-16 15:00 [PATCH 0/7] drm/i915: Add HWMON support Badal Nilawar
2022-09-16 15:00 ` [Intel-gfx] " Badal Nilawar
2022-09-16 15:00 ` Badal Nilawar
2022-09-16 15:00 ` [PATCH 1/7] drm/i915/hwmon: Add HWMON infrastructure Badal Nilawar
2022-09-16 15:00   ` [Intel-gfx] " Badal Nilawar
2022-09-16 15:00   ` Badal Nilawar
2022-09-21 10:59   ` Gupta, Anshuman
2022-09-21 10:59     ` [Intel-gfx] " Gupta, Anshuman
2022-09-21 10:59     ` Gupta, Anshuman
2022-09-21 12:44   ` [Intel-gfx] " Andi Shyti
2022-09-21 12:44     ` Andi Shyti
2022-09-21 15:17     ` Nilawar, Badal
2022-09-21 15:17       ` Nilawar, Badal
2022-09-21 15:45       ` Andi Shyti
2022-09-21 15:45         ` Andi Shyti
2022-09-21 15:45         ` Andi Shyti
2022-09-24  3:10     ` Dixit, Ashutosh
2022-09-24  3:10       ` Dixit, Ashutosh
2022-09-24  3:10       ` Dixit, Ashutosh
2022-09-16 15:00 ` [PATCH 2/7] drm/i915/hwmon: Add HWMON current voltage support Badal Nilawar
2022-09-16 15:00   ` [Intel-gfx] " Badal Nilawar
2022-09-16 15:00   ` Badal Nilawar
2022-09-21 11:08   ` Gupta, Anshuman
2022-09-21 11:08     ` [Intel-gfx] " Gupta, Anshuman
2022-09-21 11:08     ` Gupta, Anshuman
2022-09-16 15:00 ` [PATCH 3/7] drm/i915/hwmon: Power PL1 limit and TDP setting Badal Nilawar
2022-09-16 15:00   ` [Intel-gfx] " Badal Nilawar
2022-09-16 15:00   ` Badal Nilawar
2022-09-16 18:29   ` [Intel-gfx] " kernel test robot
2022-09-21  0:02   ` Dixit, Ashutosh
2022-09-21  0:02     ` [Intel-gfx] " Dixit, Ashutosh
2022-09-21  0:02     ` Dixit, Ashutosh
2022-09-21 11:44     ` [Intel-gfx] " Tvrtko Ursulin
2022-09-21 11:45   ` Gupta, Anshuman
2022-09-21 11:45     ` Gupta, Anshuman
2022-09-21 11:45     ` [Intel-gfx] " Gupta, Anshuman
2022-09-21 14:53     ` Nilawar, Badal
2022-09-21 14:53       ` [Intel-gfx] " Nilawar, Badal
2022-09-21 14:53       ` Nilawar, Badal
2022-09-22  7:08       ` Gupta, Anshuman
2022-09-22  7:08         ` [Intel-gfx] " Gupta, Anshuman
2022-09-22  7:08         ` Gupta, Anshuman
2022-09-23  2:26         ` Dixit, Ashutosh [this message]
2022-09-23  2:26           ` [Intel-gfx] " Dixit, Ashutosh
2022-09-23  2:26           ` Dixit, Ashutosh
2022-09-16 15:00 ` [PATCH 4/7] drm/i915/hwmon: Show device level energy usage Badal Nilawar
2022-09-16 15:00   ` [Intel-gfx] " Badal Nilawar
2022-09-16 15:00   ` Badal Nilawar
2022-09-21 12:02   ` Gupta, Anshuman
2022-09-21 12:02     ` [Intel-gfx] " Gupta, Anshuman
2022-09-21 12:02     ` Gupta, Anshuman
2022-10-13 15:53     ` Dixit, Ashutosh
2022-10-13 15:53       ` [Intel-gfx] " Dixit, Ashutosh
2022-10-13 15:53       ` Dixit, Ashutosh
2022-09-16 15:00 ` [PATCH 5/7] drm/i915/hwmon: Expose card reactive critical power Badal Nilawar
2022-09-16 15:00   ` [Intel-gfx] " Badal Nilawar
2022-09-16 15:00   ` Badal Nilawar
2022-09-21 15:07   ` Gupta, Anshuman
2022-09-21 15:07     ` [Intel-gfx] " Gupta, Anshuman
2022-09-21 15:07     ` Gupta, Anshuman
2022-09-22  3:17     ` Dixit, Ashutosh
2022-09-22  3:17       ` Dixit, Ashutosh
2022-09-22  3:17       ` [Intel-gfx] " Dixit, Ashutosh
2022-09-22  5:24       ` Gupta, Anshuman
2022-09-22  5:24         ` Gupta, Anshuman
2022-09-22  5:24         ` Gupta, Anshuman
2022-09-16 15:00 ` [PATCH 6/7] drm/i915/hwmon: Expose power1_max_interval Badal Nilawar
2022-09-16 15:00   ` [Intel-gfx] " Badal Nilawar
2022-09-16 15:00   ` Badal Nilawar
2022-09-22  7:13   ` Gupta, Anshuman
2022-09-22  7:13     ` Gupta, Anshuman
2022-09-22  7:13     ` [Intel-gfx] " Gupta, Anshuman
2022-09-23  2:51     ` Dixit, Ashutosh
2022-09-23  2:51       ` [Intel-gfx] " Dixit, Ashutosh
2022-09-23  2:51       ` Dixit, Ashutosh
2022-09-23  4:23       ` Dixit, Ashutosh
2022-09-23  4:23         ` [Intel-gfx] " Dixit, Ashutosh
2022-09-23  4:23         ` Dixit, Ashutosh
2022-09-16 15:00 ` [PATCH 7/7] drm/i915/hwmon: Extend power/energy for XEHPSDV Badal Nilawar
2022-09-16 15:00   ` [Intel-gfx] " Badal Nilawar
2022-09-16 15:00   ` Badal Nilawar
2022-09-22  7:37   ` Gupta, Anshuman
2022-09-22  7:37     ` [Intel-gfx] " Gupta, Anshuman
2022-09-22  7:37     ` Gupta, Anshuman
2022-09-16 17:37 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Add HWMON support (rev6) Patchwork
2022-09-16 17:37 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-09-16 17:59 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2022-09-19 10:45   ` Nilawar, Badal
2022-09-19 10:15 ` [PATCH 0/7] drm/i915: Add HWMON support Gupta, Anshuman
2022-09-19 10:15   ` [Intel-gfx] " Gupta, Anshuman
2022-09-19 10:15   ` Gupta, Anshuman
2022-09-19 12:13   ` Nilawar, Badal
2022-09-19 12:13     ` [Intel-gfx] " Nilawar, Badal
2022-09-19 12:13     ` Nilawar, Badal
2022-09-19 15:35 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Add HWMON support (rev6) Patchwork
2022-09-19 17:13 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2022-10-20  1:15 [PATCH 3/7] drm/i915/hwmon: Power PL1 limit and TDP setting kernel test robot
2022-10-13 15:45 [PATCH 0/7] drm/i915: Add HWMON support Ashutosh Dixit
2022-10-13 15:45 ` [PATCH 3/7] drm/i915/hwmon: Power PL1 limit and TDP setting Ashutosh Dixit
2022-10-13 15:45   ` Ashutosh Dixit
2022-10-13 19:32   ` kernel test robot
2022-10-22 13:31   ` kernel test robot
2022-09-27  5:50 [PATCH 0/7] drm/i915: Add HWMON support Badal Nilawar
2022-09-27  5:50 ` [PATCH 3/7] drm/i915/hwmon: Power PL1 limit and TDP setting Badal Nilawar
2022-09-27  5:50   ` Badal Nilawar
2022-09-28  7:08   ` Gupta, Anshuman
2022-09-28  7:08     ` Gupta, Anshuman
2022-09-26 17:52 [PATCH 0/7] Add HWMON support Badal Nilawar
2022-09-26 17:52 ` [PATCH 3/7] drm/i915/hwmon: Power PL1 limit and TDP setting Badal Nilawar
2022-09-26 17:52   ` Badal Nilawar
2022-09-27  8:04   ` kernel test robot
2022-09-27 13:51   ` Gupta, Anshuman
2022-09-27 13:51     ` Gupta, Anshuman
2022-09-23 19:56 [PATCH 0/7] drm/i915: Add HWMON support Badal Nilawar
2022-09-23 19:56 ` [PATCH 3/7] drm/i915/hwmon: Power PL1 limit and TDP setting Badal Nilawar
2022-09-23 19:56   ` Badal Nilawar
2022-08-25 13:21 [PATCH 0/7] drm/i915: Add HWMON support Badal Nilawar
2022-08-25 13:21 ` [PATCH 3/7] drm/i915/hwmon: Power PL1 limit and TDP setting Badal Nilawar
2022-08-30  2:33   ` Dixit, Ashutosh
2022-08-18 19:38 [PATCH 0/7] drm/i915: Add HWMON support Badal Nilawar
2022-08-18 19:38 ` [PATCH 3/7] drm/i915/hwmon: Power PL1 limit and TDP setting Badal Nilawar
2022-08-12 17:37 [PATCH 0/7] drm/i915: Add HWMON support Badal Nilawar
2022-08-12 17:37 ` [PATCH 3/7] drm/i915/hwmon: Power PL1 limit and TDP setting Badal Nilawar
2022-08-12 18:06   ` Guenter Roeck
2023-02-28 21:18     ` Dixit, Ashutosh
2023-02-28 21:18       ` Dixit, Ashutosh
2023-03-09 16:33       ` Guenter Roeck
2023-03-09 16:33         ` Guenter Roeck

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=87a66qn7w4.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jon.ewins@intel.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=riana.tauro@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.