]> www.infradead.org Git - users/willy/xarray.git/commitdiff
drm/amd/pm: Print the error on command submission
authorLuben Tuikov <luben.tuikov@amd.com>
Wed, 17 Nov 2021 18:39:26 +0000 (13:39 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 Nov 2021 19:06:53 +0000 (14:06 -0500)
Print the error on command submission immediately after submitting to
the SMU. This is rate-limited. It helps to immediately know there was an
error on command submission, rather than leave it up to clients to report
the error, as sometimes they do not.

Cc: Alex Deucher <Alexander.Deucher@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Acked-by: Alex Deucher <Alexander.Deucher@amd.com>
Reviewed-by: Alex Deucher <Alexander.Deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c

index f9a42a07eeaebf5dd16ff1b5a95c9f546df6b7a1..048ca16738638feb4a512bf0500c8db3163851ec 100644 (file)
@@ -352,7 +352,7 @@ int smu_cmn_send_smc_msg_with_param(struct smu_context *smu,
        __smu_cmn_send_msg(smu, (uint16_t) index, param);
        reg = __smu_cmn_poll_stat(smu);
        res = __smu_cmn_reg2errno(smu, reg);
-       if (res == -EREMOTEIO)
+       if (res != 0)
                __smu_cmn_reg_print_error(smu, reg, index, param, msg);
        if (read_arg)
                smu_cmn_read_arg(smu, read_arg);