From: "Nilawar, Badal" <badal.nilawar@intel.com>
To: "Poosa, Karthik" <karthik.poosa@intel.com>,
<intel-xe@lists.freedesktop.org>
Cc: <anshuman.gupta@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: Mon, 26 Aug 2024 13:41:52 +0530 [thread overview]
Message-ID: <fed29970-bb0e-4196-ba6c-004ffc71d2c4@intel.com> (raw)
In-Reply-To: <3650fdb0-af3c-4732-9f72-21bab3304d76@intel.com>
On 26-08-2024 12:38, Poosa, Karthik wrote:
> Didn't find failures from HWMON tests from CI results.
Could you please check this failure
https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-137054v1/shard-bmg-4/igt@intel_hwmon@hwmon-write.html
Regards,
Badal
>
> You can review this patch now.
>
> On 09-08-2024 09:37, Poosa, Karthik wrote:
>> 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);
prev parent reply other threads:[~2024-08-26 8:12 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 ` [PATCH] " Poosa, Karthik
2024-08-26 7:08 ` Poosa, Karthik
2024-08-26 8:11 ` Nilawar, Badal [this message]
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=fed29970-bb0e-4196-ba6c-004ffc71d2c4@intel.com \
--to=badal.nilawar@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=ashutosh.dixit@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=karthik.poosa@intel.com \
--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