]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
platform/x86/amd: pmc: Don't try to read SMU version on Picasso
authorMario Limonciello <mario.limonciello@amd.com>
Sun, 9 Apr 2023 18:53:41 +0000 (00:23 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:11:05 +0000 (23:11 +0900)
[ Upstream commit b845772677ea19b8e4c032bc07393ef32de4ee39 ]

Picasso doesn't support the command in the uPEP mailbox to try to
read the SMU version.

Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2449
Fixes: f6045de1f532 ("platform/x86: amd-pmc: Export Idlemask values based on the APU")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20230409185348.556161-2-Shyam-sundar.S-k@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/x86/amd/pmc.c

index 3cbb01ec10e32098f1265b6996b373dca0c4eced..0553a6419bb90b37c0bfbd114257c6d991c949e5 100644 (file)
@@ -377,6 +377,9 @@ static int amd_pmc_get_smu_version(struct amd_pmc_dev *dev)
        int rc;
        u32 val;
 
+       if (dev->cpu_id == AMD_CPU_ID_PCO)
+               return -ENODEV;
+
        rc = amd_pmc_send_cmd(dev, 0, &val, SMU_MSG_GETSMUVERSION, 1);
        if (rc)
                return rc;