drm/xe/hwmon: Fix PL1 disable flow in xe_hwmon_power_max_write
BugLink: https://bugs.launchpad.net/bugs/2083656
[ Upstream commit ac3191c5cf47e2d5220a1ed7353a2e498a1f415e ]
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 <karthik.poosa@intel.com>
Fixes: fef6dd12b4 ("drm/xe/hwmon: Protect hwmon rw attributes with hwmon_lock")
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240801112424.1841766-1-karthik.poosa@intel.com
(cherry picked from commit 146458645e505f5eac498759bcd865cf7c0dfd9a)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
This commit is contained in:
committed by
Mehmet Basaran
parent
144a839dab
commit
7a74622c14
@@ -191,9 +191,10 @@ static int xe_hwmon_power_max_write(struct xe_hwmon *hwmon, long value)
|
||||
PKG_PWR_LIM_1_EN, 0);
|
||||
|
||||
if (reg_val & PKG_PWR_LIM_1_EN) {
|
||||
drm_warn(>_to_xe(hwmon->gt)->drm, "PL1 disable is not supported!\n");
|
||||
ret = -EOPNOTSUPP;
|
||||
goto unlock;
|
||||
}
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
/* Computation in 64-bits to avoid overflow. Round to nearest. */
|
||||
|
||||
Reference in New Issue
Block a user