All of lore.kernel.org
 help / color / mirror / Atom feed
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>, <dri-devel@lists.freedesktop.org>,
	<andi.shyti@intel.com>, <tvrtko.ursulin@intel.com>
Subject: Re: [PATCH 1/7] drm/i915/hwmon: Add HWMON infrastructure
Date: Fri, 23 Sep 2022 20:54:47 -0700	[thread overview]
Message-ID: <87r1018m0o.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20220923195643.2376927-2-badal.nilawar@intel.com>

On Fri, 23 Sep 2022 12:56:37 -0700, Badal Nilawar wrote:
>

Hi Badal,

Let me add this comment on the latest version so we don't forget about it:

> +void i915_hwmon_register(struct drm_i915_private *i915)
> +{
> +	struct device *dev = i915->drm.dev;
> +	struct i915_hwmon *hwmon;
> +	struct device *hwmon_dev;
> +	struct hwm_drvdata *ddat;
> +
> +	/* hwmon is available only for dGfx */
> +	if (!IS_DGFX(i915))
> +		return;
> +
> +	hwmon = devm_kzalloc(dev, sizeof(*hwmon), GFP_KERNEL);

If we are using devm_kzalloc we might as well replace all the
hwmon_device_register_with_info's (in Patch 1 and 7) with
devm_hwmon_device_register_with_info and then i915_hwmon_unregister is just
this:

void i915_hwmon_unregister(struct drm_i915_private *i915)
{
        fetch_and_zero(&i915->hwmon);
}

Even the above statement is probably not needed but might as well retain it
for sanity. So this is a simple change.

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: linux-hwmon@vger.kernel.org, andi.shyti@intel.com,
	tvrtko.ursulin@intel.com, anshuman.gupta@intel.com,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	jon.ewins@intel.com, riana.tauro@intel.com
Subject: Re: [PATCH 1/7] drm/i915/hwmon: Add HWMON infrastructure
Date: Fri, 23 Sep 2022 20:54:47 -0700	[thread overview]
Message-ID: <87r1018m0o.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20220923195643.2376927-2-badal.nilawar@intel.com>

On Fri, 23 Sep 2022 12:56:37 -0700, Badal Nilawar wrote:
>

Hi Badal,

Let me add this comment on the latest version so we don't forget about it:

> +void i915_hwmon_register(struct drm_i915_private *i915)
> +{
> +	struct device *dev = i915->drm.dev;
> +	struct i915_hwmon *hwmon;
> +	struct device *hwmon_dev;
> +	struct hwm_drvdata *ddat;
> +
> +	/* hwmon is available only for dGfx */
> +	if (!IS_DGFX(i915))
> +		return;
> +
> +	hwmon = devm_kzalloc(dev, sizeof(*hwmon), GFP_KERNEL);

If we are using devm_kzalloc we might as well replace all the
hwmon_device_register_with_info's (in Patch 1 and 7) with
devm_hwmon_device_register_with_info and then i915_hwmon_unregister is just
this:

void i915_hwmon_unregister(struct drm_i915_private *i915)
{
        fetch_and_zero(&i915->hwmon);
}

Even the above statement is probably not needed but might as well retain it
for sanity. So this is a simple change.

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: linux-hwmon@vger.kernel.org, andi.shyti@intel.com,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/7] drm/i915/hwmon: Add HWMON infrastructure
Date: Fri, 23 Sep 2022 20:54:47 -0700	[thread overview]
Message-ID: <87r1018m0o.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20220923195643.2376927-2-badal.nilawar@intel.com>

On Fri, 23 Sep 2022 12:56:37 -0700, Badal Nilawar wrote:
>

Hi Badal,

Let me add this comment on the latest version so we don't forget about it:

> +void i915_hwmon_register(struct drm_i915_private *i915)
> +{
> +	struct device *dev = i915->drm.dev;
> +	struct i915_hwmon *hwmon;
> +	struct device *hwmon_dev;
> +	struct hwm_drvdata *ddat;
> +
> +	/* hwmon is available only for dGfx */
> +	if (!IS_DGFX(i915))
> +		return;
> +
> +	hwmon = devm_kzalloc(dev, sizeof(*hwmon), GFP_KERNEL);

If we are using devm_kzalloc we might as well replace all the
hwmon_device_register_with_info's (in Patch 1 and 7) with
devm_hwmon_device_register_with_info and then i915_hwmon_unregister is just
this:

void i915_hwmon_unregister(struct drm_i915_private *i915)
{
        fetch_and_zero(&i915->hwmon);
}

Even the above statement is probably not needed but might as well retain it
for sanity. So this is a simple change.

Thanks.
--
Ashutosh

  reply	other threads:[~2022-09-24  3:54 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-23 19:56 [PATCH 0/7] drm/i915: Add HWMON support Badal Nilawar
2022-09-23 19:56 ` [Intel-gfx] " Badal Nilawar
2022-09-23 19:56 ` Badal Nilawar
2022-09-23 19:56 ` [PATCH 1/7] drm/i915/hwmon: Add HWMON infrastructure Badal Nilawar
2022-09-23 19:56   ` [Intel-gfx] " Badal Nilawar
2022-09-23 19:56   ` Badal Nilawar
2022-09-24  3:54   ` Dixit, Ashutosh [this message]
2022-09-24  3:54     ` [Intel-gfx] " Dixit, Ashutosh
2022-09-24  3:54     ` Dixit, Ashutosh
2022-09-23 19:56 ` [PATCH 2/7] drm/i915/hwmon: Add HWMON current voltage support Badal Nilawar
2022-09-23 19:56   ` [Intel-gfx] " Badal Nilawar
2022-09-23 19:56   ` 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-09-23 19:56   ` [Intel-gfx] " Badal Nilawar
2022-09-23 19:56 ` [PATCH 4/7] drm/i915/hwmon: Show device level energy usage Badal Nilawar
2022-09-23 19:56   ` Badal Nilawar
2022-09-23 19:56   ` [Intel-gfx] " Badal Nilawar
2022-09-24  3:55   ` Dixit, Ashutosh
2022-09-24  3:55     ` [Intel-gfx] " Dixit, Ashutosh
2022-09-24  3:55     ` Dixit, Ashutosh
2022-09-23 19:56 ` [PATCH 5/7] drm/i915/hwmon: Expose card reactive critical power Badal Nilawar
2022-09-23 19:56   ` Badal Nilawar
2022-09-23 19:56   ` [Intel-gfx] " Badal Nilawar
2022-09-23 19:56 ` [PATCH 6/7] drm/i915/hwmon: Expose power1_max_interval Badal Nilawar
2022-09-23 19:56   ` Badal Nilawar
2022-09-23 19:56   ` [Intel-gfx] " Badal Nilawar
2022-09-24  3:58   ` Dixit, Ashutosh
2022-09-24  3:58     ` [Intel-gfx] " Dixit, Ashutosh
2022-09-24  3:58     ` Dixit, Ashutosh
2022-09-23 19:56 ` [PATCH 7/7] drm/i915/hwmon: Extend power/energy for XEHPSDV Badal Nilawar
2022-09-23 19:56   ` Badal Nilawar
2022-09-23 19:56   ` [Intel-gfx] " Badal Nilawar
2022-09-23 21:12 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Add HWMON support (rev7) Patchwork
2022-09-23 21:12 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-09-23 21:34 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-09-24 13:29 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2022-10-13 15:45 [PATCH 0/7] drm/i915: Add HWMON support Ashutosh Dixit
2022-10-13 15:45 ` [PATCH 1/7] drm/i915/hwmon: Add HWMON infrastructure Ashutosh Dixit
2022-10-13 15:45   ` Ashutosh Dixit
2022-09-27  5:50 [PATCH 0/7] drm/i915: Add HWMON support Badal Nilawar
2022-09-27  5:50 ` [PATCH 1/7] drm/i915/hwmon: Add HWMON infrastructure Badal Nilawar
2022-09-27  5:50   ` Badal Nilawar
2022-09-26 17:52 [PATCH 0/7] Add HWMON support Badal Nilawar
2022-09-26 17:52 ` [PATCH 1/7] drm/i915/hwmon: Add HWMON infrastructure Badal Nilawar
2022-09-26 17:52   ` Badal Nilawar
2022-09-16 15:00 [PATCH 0/7] drm/i915: Add HWMON support Badal Nilawar
2022-09-16 15:00 ` [PATCH 1/7] drm/i915/hwmon: Add HWMON infrastructure Badal Nilawar
2022-09-16 15:00   ` Badal Nilawar
2022-09-21 10:59   ` Gupta, Anshuman
2022-09-21 10:59     ` Gupta, Anshuman
2022-08-25 13:21 [PATCH 0/7] drm/i915: Add HWMON support Badal Nilawar
2022-08-25 13:21 ` [PATCH 1/7] drm/i915/hwmon: Add HWMON infrastructure Badal Nilawar
2022-08-26 13:30   ` Guenter Roeck
2022-08-29 17:26   ` Dixit, Ashutosh
2022-08-18 19:38 [PATCH 0/7] drm/i915: Add HWMON support Badal Nilawar
2022-08-18 19:38 ` [PATCH 1/7] drm/i915/hwmon: Add HWMON infrastructure Badal Nilawar
2022-08-12 17:37 [PATCH 0/7] drm/i915: Add HWMON support Badal Nilawar
2022-08-12 17:37 ` [PATCH 1/7] drm/i915/hwmon: Add HWMON infrastructure Badal Nilawar
2022-08-12 18:05   ` 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=87r1018m0o.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=andi.shyti@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 \
    --cc=tvrtko.ursulin@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.