drm/amd/pm: Add error log for smu v13.0.6 reset
authorLijo Lazar <lijo.lazar@amd.com>
Thu, 11 Jan 2024 04:17:33 +0000 (09:47 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 15 Jan 2024 23:33:05 +0000 (18:33 -0500)
For all mode-2 reset fail cases, add error log.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Asad Kamal <asad.kamal@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org # 6.7.x
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c

index 4ebc6b421c2cb44baea23225a34e31e9c47464b5..7513d1cfeebd7194eae6c21d68e5bceef5902cc0 100644 (file)
@@ -2235,17 +2235,18 @@ static int smu_v13_0_6_mode2_reset(struct smu_context *smu)
                        continue;
                }
 
-               if (ret) {
-                       dev_err(adev->dev,
-                               "failed to send mode2 message \tparam: 0x%08x error code %d\n",
-                               SMU_RESET_MODE_2, ret);
+               if (ret)
                        goto out;
-               }
+
        } while (ret == -ETIME && timeout);
 
 out:
        mutex_unlock(&smu->message_lock);
 
+       if (ret)
+               dev_err(adev->dev, "failed to send mode2 reset, error code %d",
+                       ret);
+
        return ret;
 }