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
Subject: Re: [Intel-gfx] [PATCH 3/3] drm/i915/hwmon: Add HWMON current voltage support
Date: Fri, 10 Jun 2022 17:55:32 -0700	[thread overview]
Message-ID: <878rq4j9x7.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20220523110841.1151431-4-badal.nilawar@intel.com>

On Mon, 23 May 2022 04:08:41 -0700, Badal Nilawar wrote:
>
> +static int
> +i915_in_read(struct i915_hwmon_drvdata *ddat, u32 attr, long *val)
> +{
> +	struct i915_hwmon *hwmon = ddat->dd_hwmon;
> +	intel_wakeref_t wakeref;
> +	u32 reg_value;
> +
> +	switch (attr) {
> +	case hwmon_in_input:
> +		with_intel_runtime_pm(ddat->dd_uncore->rpm, wakeref)
> +			reg_value = intel_uncore_read(ddat->dd_uncore, hwmon->rg.gt_perf_status);
> +		*val = DIV_ROUND_CLOSEST(REG_FIELD_GET(GEN12_VOLTAGE_MASK, reg_value) * 25, 10);

A comment here that voltage is in units of 2.5 mV would be nice.

> @@ -440,12 +495,14 @@ i915_hwmon_get_preregistration_info(struct drm_i915_private *i915)
>		hwmon->rg.pkg_rapl_limit = PCU_PACKAGE_RAPL_LIMIT;
>		hwmon->rg.energy_status_all = PCU_PACKAGE_ENERGY_STATUS;
>		hwmon->rg.energy_status_tile = INVALID_MMIO_REG;
> +		hwmon->rg.gt_perf_status = GEN12_RPSTAT1;
>	} else {
>		hwmon->rg.pkg_power_sku_unit = INVALID_MMIO_REG;
>		hwmon->rg.pkg_power_sku = INVALID_MMIO_REG;
>		hwmon->rg.pkg_rapl_limit = INVALID_MMIO_REG;
>		hwmon->rg.energy_status_all = INVALID_MMIO_REG;
>		hwmon->rg.energy_status_tile = INVALID_MMIO_REG;
> +		hwmon->rg.gt_perf_status = INVALID_MMIO_REG;

Looks like this is supportable on XEHPSDV too, so let's add that too.

  parent reply	other threads:[~2022-06-11  0:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-23 11:08 [Intel-gfx] [PATCH 0/3] drm/i915: Add HWMON support Badal Nilawar
2022-05-23 11:08 ` [Intel-gfx] [PATCH 1/3] drm/i915/hwmon: Add HWMON power sensor support Badal Nilawar
2022-05-23 13:45   ` Jani Nikula
2022-05-23 13:46   ` Jani Nikula
2022-05-24  3:10   ` Dixit, Ashutosh
2022-05-23 11:08 ` [Intel-gfx] [PATCH 2/3] drm/i915/hwmon: Add HWMON energy support Badal Nilawar
2022-05-25  4:55   ` Dixit, Ashutosh
2022-05-25  4:56   ` Dixit, Ashutosh
2022-05-25  5:25     ` Gupta, Anshuman
2022-05-23 11:08 ` [Intel-gfx] [PATCH 3/3] drm/i915/hwmon: Add HWMON current voltage support Badal Nilawar
2022-05-23 13:47   ` Jani Nikula
2022-05-25  5:01   ` Dixit, Ashutosh
2022-06-10 22:35   ` Dixit, Ashutosh
2022-06-11  0:45     ` Dixit, Ashutosh
2022-06-11  0:55   ` Dixit, Ashutosh [this message]
2022-05-23 17:03 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Add HWMON support Patchwork
2022-05-23 17:26 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2022-05-24  1:36 ` [Intel-gfx] [PATCH 0/3] " Dixit, Ashutosh

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=878rq4j9x7.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=intel-gfx@lists.freedesktop.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.