summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Clements <john.clements@amd.com>2020-04-09 15:32:41 +0800
committerAlex Deucher <alexander.deucher@amd.com>2020-04-09 10:43:33 -0400
commit9a785c7ad1d775f41c61bc380a98e710bc71347e (patch)
tree3408ad9d96d44131a96d35460a064d7c63be5d6f
parent5aaa8fff3aa9509991eff2eaaca96bcfbecacca7 (diff)
downloadlwn-9a785c7ad1d775f41c61bc380a98e710bc71347e.tar.gz
lwn-9a785c7ad1d775f41c61bc380a98e710bc71347e.zip
drm/amdgpu: increased atom cmd timeout
added macro to define timeout Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: John Clements <john.clements@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/atom.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/atom.c b/drivers/gpu/drm/amd/amdgpu/atom.c
index cae426c7c086..4cfc786699c7 100644
--- a/drivers/gpu/drm/amd/amdgpu/atom.c
+++ b/drivers/gpu/drm/amd/amdgpu/atom.c
@@ -54,6 +54,8 @@
#define PLL_INDEX 2
#define PLL_DATA 3
+#define ATOM_CMD_TIMEOUT_SEC 20
+
typedef struct {
struct atom_context *ctx;
uint32_t *ps, *ws;
@@ -744,8 +746,9 @@ static void atom_op_jump(atom_exec_context *ctx, int *ptr, int arg)
cjiffies = jiffies;
if (time_after(cjiffies, ctx->last_jump_jiffies)) {
cjiffies -= ctx->last_jump_jiffies;
- if ((jiffies_to_msecs(cjiffies) > 10000)) {
- DRM_ERROR("atombios stuck in loop for more than 10secs aborting\n");
+ if ((jiffies_to_msecs(cjiffies) > ATOM_CMD_TIMEOUT_SEC*1000)) {
+ DRM_ERROR("atombios stuck in loop for more than %dsecs aborting\n",
+ ATOM_CMD_TIMEOUT_SEC);
ctx->abort = true;
}
} else {