Skip to content

Commit 2f0e491

Browse files
Asad Kamalalexdeucher
authored andcommitted
drm/amd/pm: Return -EOPNOTSUPP for unsupported OD_MCLK on smu_v13_0_6
When SET_UCLK_MAX capability is absent, return -EOPNOTSUPP from smu_v13_0_6_emit_clk_levels() for OD_MCLK instead of 0. This makes unsupported OD_MCLK reporting consistent with other clock types and allows callers to skip the entry cleanly. Signed-off-by: Asad Kamal <asad.kamal@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit d82e0a7) Cc: stable@vger.kernel.org
1 parent cdbc3b6 commit 2f0e491

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,7 @@ static int smu_v13_0_6_emit_clk_levels(struct smu_context *smu,
13911391
break;
13921392
case SMU_OD_MCLK:
13931393
if (!smu_v13_0_6_cap_supported(smu, SMU_CAP(SET_UCLK_MAX)))
1394-
return 0;
1394+
return -EOPNOTSUPP;
13951395

13961396
size += sysfs_emit_at(buf, size, "%s:\n", "OD_MCLK");
13971397
size += sysfs_emit_at(buf, size, "0: %uMhz\n1: %uMhz\n",

0 commit comments

Comments
 (0)