hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/gpu/drm/amd/amdgpu/atom.c
....@@ -27,6 +27,8 @@
2727 #include <linux/slab.h>
2828 #include <asm/unaligned.h>
2929
30
+#include <drm/drm_util.h>
31
+
3032 #define ATOM_DEBUG
3133
3234 #include "atom.h"
....@@ -51,6 +53,8 @@
5153
5254 #define PLL_INDEX 2
5355 #define PLL_DATA 3
56
+
57
+#define ATOM_CMD_TIMEOUT_SEC 20
5458
5559 typedef struct {
5660 struct atom_context *ctx;
....@@ -742,8 +746,9 @@
742746 cjiffies = jiffies;
743747 if (time_after(cjiffies, ctx->last_jump_jiffies)) {
744748 cjiffies -= ctx->last_jump_jiffies;
745
- if ((jiffies_to_msecs(cjiffies) > 10000)) {
746
- DRM_ERROR("atombios stuck in loop for more than 10secs aborting\n");
749
+ if ((jiffies_to_msecs(cjiffies) > ATOM_CMD_TIMEOUT_SEC*1000)) {
750
+ DRM_ERROR("atombios stuck in loop for more than %dsecs aborting\n",
751
+ ATOM_CMD_TIMEOUT_SEC);
747752 ctx->abort = true;
748753 }
749754 } else {