From 5a562b765837414416d609058c4e8dd7a8072dab Mon Sep 17 00:00:00 2001
From: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Date: Thu, 14 Apr 2016 15:26:21 -0700
Subject: [PATCH] uvesafb: print error message when task timeout occurs

The driver waits for response from user space for a pending
task until a timeout (UVESAFB_TIMEOUT) occurs. But the
existing error message in later steps is a little obscure.

This patch throws out an error message when timeout happens.

Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 drivers/video/fbdev/uvesafb.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c
index 178ae93b7ebd..13bbb61a9d8f 100644
--- a/drivers/video/fbdev/uvesafb.c
+++ b/drivers/video/fbdev/uvesafb.c
@@ -211,9 +211,13 @@ static int uvesafb_exec(struct uvesafb_ktask *task)
 	} else if (err == -ENOBUFS)
 		err = 0;
 
-	if (!err && !(task->t.flags & TF_EXIT))
+	if (!err && !(task->t.flags & TF_EXIT)) {
 		err = !wait_for_completion_timeout(task->done,
 				msecs_to_jiffies(UVESAFB_TIMEOUT));
+		if (err)
+			printk_ratelimited(KERN_ERR "uvesafb: %u ms task timeout error\n",
+					UVESAFB_TIMEOUT);
+	}
 
 	mutex_lock(&uvfb_lock);
 	uvfb_tasks[seq] = NULL;
-- 
2.5.0

