Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Poosa, Karthik" <karthik.poosa@intel.com>
To: <intel-xe@lists.freedesktop.org>
Cc: <anshuman.gupta@intel.com>, <badal.nilawar@intel.com>,
	<ashutosh.dixit@intel.com>, <rodrigo.vivi@intel.com>
Subject: Re: [PATCH] drm/xe/hwmon: Fix xe_hwmon_pcode_write_i1 param from u32 to u16
Date: Fri, 9 Aug 2024 09:37:15 +0530	[thread overview]
Message-ID: <09eb6fd4-e333-4b0c-82c3-2ffee7295304@intel.com> (raw)
In-Reply-To: <20240808172734.2233594-1-karthik.poosa@intel.com>

Ignore this revision of patch. Raised this to get igt results.

On 08-08-2024 22:57, Karthik Poosa wrote:
> WRITE_I1 sub command of pcode takes param of u16 compared to u32 for
> READ_I1, so corrected it. Without this pcode shall return illegal
> sub command errors.
>
> Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
> Fixes: 92d44a422d0d ("drm/xe/hwmon: Expose card reactive critical power")
> ---
>   drivers/gpu/drm/xe/xe_hwmon.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
> index 832ea81faeee..617c8bdb8f28 100644
> --- a/drivers/gpu/drm/xe/xe_hwmon.c
> +++ b/drivers/gpu/drm/xe/xe_hwmon.c
> @@ -446,11 +446,11 @@ static int xe_hwmon_pcode_read_i1(struct xe_gt *gt, u32 *uval)
>   			     uval, NULL);
>   }
>   
> -static int xe_hwmon_pcode_write_i1(struct xe_gt *gt, u32 uval)
> +static int xe_hwmon_pcode_write_i1(struct xe_gt *gt, u16 uval)
>   {
>   	return xe_pcode_write(gt, PCODE_MBOX(PCODE_POWER_SETUP,
>   			      POWER_SETUP_SUBCOMMAND_WRITE_I1, 0),
> -			      uval);
> +			      (u32)(uval & POWER_SETUP_I1_DATA_MASK));
>   }
>   
>   static int xe_hwmon_power_curr_crit_read(struct xe_hwmon *hwmon, int channel,
> @@ -476,11 +476,11 @@ static int xe_hwmon_power_curr_crit_write(struct xe_hwmon *hwmon, int channel,
>   					  long value, u32 scale_factor)
>   {
>   	int ret;
> -	u32 uval;
> +	u16 uval;
>   
>   	mutex_lock(&hwmon->hwmon_lock);
>   
> -	uval = DIV_ROUND_CLOSEST_ULL(value << POWER_SETUP_I1_SHIFT, scale_factor);
> +	uval = DIV_ROUND_CLOSEST((u16)value << POWER_SETUP_I1_SHIFT, scale_factor);
>   	ret = xe_hwmon_pcode_write_i1(hwmon->gt, uval);
>   
>   	mutex_unlock(&hwmon->hwmon_lock);

  parent reply	other threads:[~2024-08-09  4:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-08 17:27 [PATCH] drm/xe/hwmon: Fix xe_hwmon_pcode_write_i1 param from u32 to u16 Karthik Poosa
2024-08-08 18:08 ` ✓ CI.Patch_applied: success for " Patchwork
2024-08-08 18:09 ` ✓ CI.checkpatch: " Patchwork
2024-08-08 18:10 ` ✓ CI.KUnit: " Patchwork
2024-08-08 18:22 ` ✓ CI.Build: " Patchwork
2024-08-08 18:24 ` ✓ CI.Hooks: " Patchwork
2024-08-08 18:26 ` ✓ CI.checksparse: " Patchwork
2024-08-08 18:59 ` ✓ CI.BAT: " Patchwork
2024-08-08 20:45 ` ✗ CI.FULL: failure " Patchwork
2024-08-09  4:07 ` Poosa, Karthik [this message]
2024-08-26  7:08   ` [PATCH] " Poosa, Karthik
2024-08-26  8:11     ` Nilawar, Badal

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=09eb6fd4-e333-4b0c-82c3-2ffee7295304@intel.com \
    --to=karthik.poosa@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=ashutosh.dixit@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=intel-xe@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox