Skip to content

Commit a7f6570

Browse files
kpoosarodrigovivi
authored andcommitted
drm/xe/hwmon: Fix WRITE_I1 param from u32 to u16
WRITE_I1 sub-command of the POWER_SETUP pcode command accepts a u16 parameter instead of u32. This change prevents potential illegal sub-command errors. v2: Mask uval instead of changing the prototype. (Badal) v3: Rephrase commit message. (Badal) Signed-off-by: Karthik Poosa <[email protected]> Fixes: 92d44a4 ("drm/xe/hwmon: Expose card reactive critical power") Reviewed-by: Badal Nilawar <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent aeb4ae6 commit a7f6570

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/xe/xe_hwmon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ static int xe_hwmon_pcode_write_i1(struct xe_gt *gt, u32 uval)
450450
{
451451
return xe_pcode_write(gt, PCODE_MBOX(PCODE_POWER_SETUP,
452452
POWER_SETUP_SUBCOMMAND_WRITE_I1, 0),
453-
uval);
453+
(uval & POWER_SETUP_I1_DATA_MASK));
454454
}
455455

456456
static int xe_hwmon_power_curr_crit_read(struct xe_hwmon *hwmon, int channel,

0 commit comments

Comments
 (0)