All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/3] drm/i915/hwmon: Replace hwm_field_scale_and_write with hwm_power_max_write
Date: Tue, 14 Feb 2023 12:20:36 -0800	[thread overview]
Message-ID: <87v8k4t2wb.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <Y+ufxAm2l8zaI/ks@intel.com>

On Tue, 14 Feb 2023 06:50:44 -0800, Rodrigo Vivi wrote:
>
> > +static int
> > +hwm_power_max_write(struct hwm_drvdata *ddat, long val)
>  +{
> > +	struct i915_hwmon *hwmon = ddat->hwmon;
> > +	u32 nval;
> > +
> > +	/* Computation in 64-bits to avoid overflow. Round to nearest. */
> > +	nval = DIV_ROUND_CLOSEST_ULL((u64)val << hwmon->scl_shift_power, SF_POWER);
> > +
> > +	hwm_locked_with_pm_intel_uncore_rmw(ddat, hwmon->rg.pkg_rapl_limit,
> > +					    PKG_PWR_LIM_1,
> > +					    REG_FIELD_PREP(PKG_PWR_LIM_1, nval));
> > +	return 0;
>
> Let's keep this function as void and the return 0 in the previous spot.

Hmm, see your point. Though there is an identical situation for
hwm_power_max_read read too (in hwm_power_read). Maybe I'll change it there
too in the same patch to keep things symmetrical and retain your R-b?

> With that change:
>
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

Thanks.

  reply	other threads:[~2023-02-14 20:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-13 21:00 [Intel-gfx] [PATCH 0/3] drm/i915/hwmon: PL1 power limit fixes for ATSM Ashutosh Dixit
2023-02-13 21:00 ` [Intel-gfx] [PATCH 1/3] drm/i915/hwmon: Replace hwm_field_scale_and_write with hwm_power_max_write Ashutosh Dixit
2023-02-14 14:50   ` Rodrigo Vivi
2023-02-14 20:20     ` Dixit, Ashutosh [this message]
2023-02-14 20:26       ` Rodrigo Vivi
2023-02-13 21:00 ` [Intel-gfx] [PATCH 2/3] drm/i915/hwmon: Enable PL1 limit when writing limit value to HW Ashutosh Dixit
2023-02-14 14:51   ` Rodrigo Vivi
2023-02-14 20:47     ` Dixit, Ashutosh
2023-02-14 20:53       ` Rodrigo Vivi
2023-02-13 21:00 ` [Intel-gfx] [PATCH 3/3] drm/i915/hwmon: Use -1 to designate disabled PL1 power limit Ashutosh Dixit
2023-02-14  3:49   ` Dixit, Ashutosh
2023-02-13 21:41 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/hwmon: PL1 power limit fixes for ATSM Patchwork
2023-02-14  0:47 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-02-14  5:33 [PATCH 0/3] " Ashutosh Dixit
2023-02-14  5:33 ` [Intel-gfx] [PATCH 1/3] drm/i915/hwmon: Replace hwm_field_scale_and_write with hwm_power_max_write Ashutosh Dixit

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=87v8k4t2wb.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@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.