]> www.infradead.org Git - linux-platform-drivers-x86.git/commitdiff
platform/x86: amd-pmc: Send command to dump data after clearing OS_HINT
authorSanket Goswami <Sanket.Goswami@amd.com>
Tue, 21 Sep 2021 11:59:10 +0000 (17:29 +0530)
committerHans de Goede <hdegoede@redhat.com>
Tue, 28 Sep 2021 14:24:09 +0000 (16:24 +0200)
It was reported that the resume stats received from the firmware are
always zero. This happens because the SMU expects the driver to send the
command to dump the log data after clearing the OS_HINT.

Adjust the order of the commands sent to SMU.

Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com>
Link: https://lore.kernel.org/r/20210921115910.19401-1-Sanket.Goswami@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/amd-pmc.c

index f185c43bbaa46200d259b8e98c8564e4ce059c3d..d4d2ba886f4e146a9877893423a5f2f14a67d14e 100644 (file)
@@ -436,14 +436,14 @@ static int __maybe_unused amd_pmc_resume(struct device *dev)
        int rc;
        u8 msg;
 
-       /* Let SMU know that we are looking for stats */
-       amd_pmc_send_cmd(pdev, 0, NULL, SMU_MSG_LOG_DUMP_DATA, 0);
-
        msg = amd_pmc_get_os_hint(pdev);
        rc = amd_pmc_send_cmd(pdev, 0, NULL, msg, 0);
        if (rc)
                dev_err(pdev->dev, "resume failed\n");
 
+       /* Let SMU know that we are looking for stats */
+       amd_pmc_send_cmd(pdev, 0, NULL, SMU_MSG_LOG_DUMP_DATA, 0);
+
        /* Dump the IdleMask to see the blockers */
        amd_pmc_idlemask_read(pdev, dev, NULL);