Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] drm/xe/hwmon: Fix WRITE_I1 param from u32 to u16
@ 2024-08-27 15:53 Karthik Poosa
  2024-08-27 15:45 ` ✓ CI.Patch_applied: success for drm/xe/hwmon: Fix WRITE_I1 param from u32 to u16 (rev2) Patchwork
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Karthik Poosa @ 2024-08-27 15:53 UTC (permalink / raw)
  To: intel-xe
  Cc: anshuman.gupta, badal.nilawar, vinay.belgaumkar, ashutosh.dixit,
	rodrigo.vivi, Karthik Poosa

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 <karthik.poosa@intel.com>
Fixes: 92d44a422d0d ("drm/xe/hwmon: Expose card reactive critical power")
---
 drivers/gpu/drm/xe/xe_hwmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
index 832ea81faeee..1faeca70900e 100644
--- a/drivers/gpu/drm/xe/xe_hwmon.c
+++ b/drivers/gpu/drm/xe/xe_hwmon.c
@@ -450,7 +450,7 @@ static int xe_hwmon_pcode_write_i1(struct xe_gt *gt, u32 uval)
 {
 	return xe_pcode_write(gt, PCODE_MBOX(PCODE_POWER_SETUP,
 			      POWER_SETUP_SUBCOMMAND_WRITE_I1, 0),
-			      uval);
+			      (uval & POWER_SETUP_I1_DATA_MASK));
 }
 
 static int xe_hwmon_power_curr_crit_read(struct xe_hwmon *hwmon, int channel,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-08-28  4:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-27 15:53 [PATCH v3] drm/xe/hwmon: Fix WRITE_I1 param from u32 to u16 Karthik Poosa
2024-08-27 15:45 ` ✓ CI.Patch_applied: success for drm/xe/hwmon: Fix WRITE_I1 param from u32 to u16 (rev2) Patchwork
2024-08-27 15:45 ` ✓ CI.checkpatch: " Patchwork
2024-08-27 15:46 ` ✓ CI.KUnit: " Patchwork
2024-08-27 15:58 ` ✓ CI.Build: " Patchwork
2024-08-27 16:00 ` ✓ CI.Hooks: " Patchwork
2024-08-27 16:01 ` ✓ CI.checksparse: " Patchwork
2024-08-27 16:20 ` ✓ CI.BAT: " Patchwork
2024-08-27 23:33 ` ✓ CI.FULL: " Patchwork
2024-08-28  4:10 ` [PATCH v3] drm/xe/hwmon: Fix WRITE_I1 param from u32 to u16 Nilawar, Badal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox