]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/pm: Return -EOPNOTSUPP for unsupported OD_MCLK on smu_v13_0_6
authorAsad Kamal <asad.kamal@amd.com>
Wed, 18 Mar 2026 05:52:57 +0000 (13:52 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 23 Mar 2026 18:17:15 +0000 (14:17 -0400)
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>
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c

index 13a544e8cf85f87af2acced725b8cad7e02ad701..1af1c4f6dc09f0a01a06ad13facf7c2f0abe2571 100644 (file)
@@ -1394,7 +1394,7 @@ static int smu_v13_0_6_emit_clk_levels(struct smu_context *smu,
                break;
        case SMU_OD_MCLK:
                if (!smu_v13_0_6_cap_supported(smu, SMU_CAP(SET_UCLK_MAX)))
-                       return 0;
+                       return -EOPNOTSUPP;
 
                size += sysfs_emit_at(buf, size, "%s:\n", "OD_MCLK");
                size += sysfs_emit_at(buf, size, "0: %uMhz\n1: %uMhz\n",