From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Badal Nilawar <badal.nilawar@intel.com>
Cc: linux-hwmon@vger.kernel.org, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 7/7] drm/i915/hwmon: Extend power/energy for XEHPSDV
Date: Mon, 29 Aug 2022 22:34:02 -0700 [thread overview]
Message-ID: <87h71uz451.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20220825132118.784407-8-badal.nilawar@intel.com>
On Thu, 25 Aug 2022 06:21:18 -0700, Badal Nilawar wrote:
>
> From: Dale B Stimson <dale.b.stimson@intel.com>
>
> Extend hwmon power/energy for XEHPSDV especially per gt level energy
> usage.
A couple of very minor nits below which need to be fixed. But otherwise
this patch is:
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c
> index b8ac52f07681..76d73216c54e 100644
> --- a/drivers/gpu/drm/i915/i915_hwmon.c
> +++ b/drivers/gpu/drm/i915/i915_hwmon.c
> @@ -12,6 +12,7 @@
> #include "i915_reg.h"
> #include "intel_mchbar_regs.h"
> #include "intel_pcode.h"
> +#include "gt/intel_gt.h"
> #include "gt/intel_gt_regs.h"
>
> /*
> @@ -21,7 +22,7 @@
> * - curr - milliamperes
> * - energy - microjoules
> */
> -#define SF_TIME 1000
> +#define SF_TIME 1000
This change should not be in this patch, it seems an unnecessary space has
been inserted.
> @@ -622,6 +690,10 @@ void i915_hwmon_register(struct drm_i915_private *i915)
> struct i915_hwmon *hwmon;
> struct device *hwmon_dev;
> struct hwm_drvdata *ddat;
> + struct hwm_drvdata *ddat_gt;
> + struct intel_gt *gt;
> + const char *ddname;
Variable is not needed, let's delete it and directly use ddat_gt->name.
> void i915_hwmon_unregister(struct drm_i915_private *i915)
> {
> struct i915_hwmon *hwmon;
> struct hwm_drvdata *ddat;
> + struct intel_gt *gt;
> + int i;
>
> hwmon = fetch_and_zero(&i915->hwmon);
> if (!hwmon)
> return;
>
> ddat = &hwmon->ddat;
> +
> + for_each_gt(gt, i915, i) {
> + struct hwm_drvdata *ddat_gt;
> +
> + ddat_gt = hwmon->ddat_gt + i;
> +
> + if (ddat_gt->hwmon_dev) {
> + hwmon_device_unregister(ddat_gt->hwmon_dev);
> + ddat_gt->hwmon_dev = NULL;
No need to set to NULL, we are doing 'kfree(hwmon)' below, let's just
delete this line.
Thanks.
--
Ashutosh
WARNING: multiple messages have this Message-ID (diff)
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Badal Nilawar <badal.nilawar@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>, <riana.tauro@intel.com>,
<anshuman.gupta@intel.com>, <jon.ewins@intel.com>,
<linux-hwmon@vger.kernel.org>
Subject: Re: [PATCH 7/7] drm/i915/hwmon: Extend power/energy for XEHPSDV
Date: Mon, 29 Aug 2022 22:34:02 -0700 [thread overview]
Message-ID: <87h71uz451.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20220825132118.784407-8-badal.nilawar@intel.com>
On Thu, 25 Aug 2022 06:21:18 -0700, Badal Nilawar wrote:
>
> From: Dale B Stimson <dale.b.stimson@intel.com>
>
> Extend hwmon power/energy for XEHPSDV especially per gt level energy
> usage.
A couple of very minor nits below which need to be fixed. But otherwise
this patch is:
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c
> index b8ac52f07681..76d73216c54e 100644
> --- a/drivers/gpu/drm/i915/i915_hwmon.c
> +++ b/drivers/gpu/drm/i915/i915_hwmon.c
> @@ -12,6 +12,7 @@
> #include "i915_reg.h"
> #include "intel_mchbar_regs.h"
> #include "intel_pcode.h"
> +#include "gt/intel_gt.h"
> #include "gt/intel_gt_regs.h"
>
> /*
> @@ -21,7 +22,7 @@
> * - curr - milliamperes
> * - energy - microjoules
> */
> -#define SF_TIME 1000
> +#define SF_TIME 1000
This change should not be in this patch, it seems an unnecessary space has
been inserted.
> @@ -622,6 +690,10 @@ void i915_hwmon_register(struct drm_i915_private *i915)
> struct i915_hwmon *hwmon;
> struct device *hwmon_dev;
> struct hwm_drvdata *ddat;
> + struct hwm_drvdata *ddat_gt;
> + struct intel_gt *gt;
> + const char *ddname;
Variable is not needed, let's delete it and directly use ddat_gt->name.
> void i915_hwmon_unregister(struct drm_i915_private *i915)
> {
> struct i915_hwmon *hwmon;
> struct hwm_drvdata *ddat;
> + struct intel_gt *gt;
> + int i;
>
> hwmon = fetch_and_zero(&i915->hwmon);
> if (!hwmon)
> return;
>
> ddat = &hwmon->ddat;
> +
> + for_each_gt(gt, i915, i) {
> + struct hwm_drvdata *ddat_gt;
> +
> + ddat_gt = hwmon->ddat_gt + i;
> +
> + if (ddat_gt->hwmon_dev) {
> + hwmon_device_unregister(ddat_gt->hwmon_dev);
> + ddat_gt->hwmon_dev = NULL;
No need to set to NULL, we are doing 'kfree(hwmon)' below, let's just
delete this line.
Thanks.
--
Ashutosh
next prev parent reply other threads:[~2022-08-30 5:34 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 13:21 [Intel-gfx] [PATCH 0/7] drm/i915: Add HWMON support Badal Nilawar
2022-08-25 13:21 ` Badal Nilawar
2022-08-25 13:21 ` [Intel-gfx] [PATCH 1/7] drm/i915/hwmon: Add HWMON infrastructure Badal Nilawar
2022-08-25 13:21 ` Badal Nilawar
2022-08-26 13:30 ` [Intel-gfx] " Guenter Roeck
2022-08-26 13:30 ` Guenter Roeck
2022-08-29 17:26 ` [Intel-gfx] " Dixit, Ashutosh
2022-08-29 17:26 ` Dixit, Ashutosh
2022-08-25 13:21 ` [Intel-gfx] [PATCH 2/7] drm/i915/hwmon: Add HWMON current voltage support Badal Nilawar
2022-08-25 13:21 ` Badal Nilawar
2022-08-29 17:30 ` [Intel-gfx] " Dixit, Ashutosh
2022-08-29 17:30 ` Dixit, Ashutosh
2022-09-15 14:40 ` [Intel-gfx] " Nilawar, Badal
2022-09-15 14:40 ` Nilawar, Badal
2022-09-21 0:02 ` [Intel-gfx] " Dixit, Ashutosh
2022-09-21 0:02 ` Dixit, Ashutosh
2022-09-12 14:09 ` [Intel-gfx] " Gupta, Anshuman
2022-09-12 14:09 ` Gupta, Anshuman
2022-09-12 16:37 ` [Intel-gfx] " Dixit, Ashutosh
2022-09-12 16:37 ` Dixit, Ashutosh
2022-09-13 8:11 ` [Intel-gfx] " Gupta, Anshuman
2022-09-13 8:11 ` Gupta, Anshuman
2022-09-13 15:19 ` [Intel-gfx] " Dixit, Ashutosh
2022-09-15 6:29 ` Gupta, Anshuman
2022-09-15 6:29 ` Gupta, Anshuman
2022-08-25 13:21 ` [Intel-gfx] [PATCH 3/7] drm/i915/hwmon: Power PL1 limit and TDP setting Badal Nilawar
2022-08-25 13:21 ` Badal Nilawar
2022-08-30 2:33 ` [Intel-gfx] " Dixit, Ashutosh
2022-08-30 2:33 ` Dixit, Ashutosh
2022-08-25 13:21 ` [Intel-gfx] [PATCH 4/7] drm/i915/hwmon: Show device level energy usage Badal Nilawar
2022-08-25 13:21 ` Badal Nilawar
2022-08-30 3:14 ` [Intel-gfx] " Dixit, Ashutosh
2022-08-30 3:14 ` Dixit, Ashutosh
2022-09-13 8:50 ` [Intel-gfx] " Tvrtko Ursulin
2022-09-21 0:24 ` Dixit, Ashutosh
2022-09-21 0:24 ` Dixit, Ashutosh
2022-09-21 7:43 ` Tvrtko Ursulin
2022-09-21 7:43 ` Tvrtko Ursulin
2022-08-25 13:21 ` [Intel-gfx] [PATCH 5/7] drm/i915/hwmon: Expose card reactive critical power Badal Nilawar
2022-08-25 13:21 ` Badal Nilawar
2022-08-25 13:21 ` [Intel-gfx] [PATCH 6/7] drm/i915/hwmon: Expose power1_max_interval Badal Nilawar
2022-08-25 13:21 ` Badal Nilawar
2022-08-25 13:21 ` [Intel-gfx] [PATCH 7/7] drm/i915/hwmon: Extend power/energy for XEHPSDV Badal Nilawar
2022-08-25 13:21 ` Badal Nilawar
2022-08-30 5:34 ` Dixit, Ashutosh [this message]
2022-08-30 5:34 ` Dixit, Ashutosh
2022-08-25 14:01 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Add HWMON support (rev5) Patchwork
2022-08-25 14:01 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-08-25 14:21 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-08-29 20:08 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2022-10-13 15:45 [Intel-gfx] [PATCH 0/7] drm/i915: Add HWMON support Ashutosh Dixit
2022-10-13 15:45 ` [Intel-gfx] [PATCH 7/7] drm/i915/hwmon: Extend power/energy for XEHPSDV Ashutosh Dixit
2022-09-27 5:50 [Intel-gfx] [PATCH 0/7] drm/i915: Add HWMON support Badal Nilawar
2022-09-27 5:50 ` [Intel-gfx] [PATCH 7/7] drm/i915/hwmon: Extend power/energy for XEHPSDV Badal Nilawar
2022-10-03 21:40 ` Andi Shyti
2022-10-03 21:40 ` Andi Shyti
2022-09-26 17:52 [Intel-gfx] [PATCH 0/7] Add HWMON support Badal Nilawar
2022-09-26 17:52 ` [Intel-gfx] [PATCH 7/7] drm/i915/hwmon: Extend power/energy for XEHPSDV Badal Nilawar
2022-09-23 19:56 [Intel-gfx] [PATCH 0/7] drm/i915: Add HWMON support Badal Nilawar
2022-09-23 19:56 ` [Intel-gfx] [PATCH 7/7] drm/i915/hwmon: Extend power/energy for XEHPSDV Badal Nilawar
2022-09-16 15:00 [Intel-gfx] [PATCH 0/7] drm/i915: Add HWMON support Badal Nilawar
2022-09-16 15:00 ` [Intel-gfx] [PATCH 7/7] drm/i915/hwmon: Extend power/energy for XEHPSDV Badal Nilawar
2022-09-22 7:37 ` Gupta, Anshuman
2022-08-18 19:38 [Intel-gfx] [PATCH 0/7] drm/i915: Add HWMON support Badal Nilawar
2022-08-18 19:39 ` [Intel-gfx] [PATCH 7/7] drm/i915/hwmon: Extend power/energy for XEHPSDV Badal Nilawar
2022-08-12 17:37 [Intel-gfx] [PATCH 0/7] drm/i915: Add HWMON support Badal Nilawar
2022-08-12 17:37 ` [Intel-gfx] [PATCH 7/7] drm/i915/hwmon: Extend power/energy for XEHPSDV Badal Nilawar
2022-08-12 18:11 ` 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=87h71uz451.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=badal.nilawar@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-hwmon@vger.kernel.org \
/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.