Skip to content

Commit ac3191c

Browse files
kpoosarodrigovivi
authored andcommitted
drm/xe/hwmon: Fix PL1 disable flow in xe_hwmon_power_max_write
In xe_hwmon_power_max_write, for PL1 disable supported case, instead of returning after PL1 disable, PL1 enable path was also being run. Fixed it by returning after disable. v2: Correct typo and grammar in commit message. (Jonathan) Signed-off-by: Karthik Poosa <[email protected]> Fixes: fef6dd1 ("drm/xe/hwmon: Protect hwmon rw attributes with hwmon_lock") Reviewed-by: Jonathan Cavitt <[email protected]> Signed-off-by: Matt Roper <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 1464586) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent 4f854a8 commit ac3191c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/xe/xe_hwmon.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,10 @@ static int xe_hwmon_power_max_write(struct xe_hwmon *hwmon, int channel, long va
203203
reg_val = xe_mmio_rmw32(hwmon->gt, rapl_limit, PKG_PWR_LIM_1_EN, 0);
204204
reg_val = xe_mmio_read32(hwmon->gt, rapl_limit);
205205
if (reg_val & PKG_PWR_LIM_1_EN) {
206+
drm_warn(&gt_to_xe(hwmon->gt)->drm, "PL1 disable is not supported!\n");
206207
ret = -EOPNOTSUPP;
207-
goto unlock;
208208
}
209+
goto unlock;
209210
}
210211

211212
/* Computation in 64-bits to avoid overflow. Round to nearest. */

0 commit comments

Comments
 (0)