diff mbox

video: fbdev: udlfb: drop log level for blanking

Message ID 20170601202559.GA96809@google.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mike Gerow June 1, 2017, 8:25 p.m. UTC
Log blanking that goes from FB_BLANK_UNBLANK to itself at debug. It turns
out Xorg likes to habitually unblank when already unblanked and this can
fill up logs over a long period of time.

Signed-off-by: Mike Gerow <gerow@google.com>
---
 drivers/video/fbdev/udlfb.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

Comments

Mike Gerow June 1, 2017, 8:38 p.m. UTC | #1
It would also be far simpler (and perhaps better) to just drop the existing log
to debug instead of this conditional nonsense. I'm mostly interested in being
able to check a machine running for a few weeks and seeing the logs not be 95%
"udlfb: /dev/fb1 FB_BLANK mode 0 --> 0".
Bartlomiej Zolnierkiewicz June 7, 2017, 1:33 p.m. UTC | #2
Hi,

On Thursday, June 01, 2017 04:38:50 PM Mike Gerow wrote:
> It would also be far simpler (and perhaps better) to just drop the existing log
> to debug instead of this conditional nonsense. I'm mostly interested in being
> able to check a machine running for a few weeks and seeing the logs not be 95%
> "udlfb: /dev/fb1 FB_BLANK mode 0 --> 0".

Fine with me, could you please redo your patch to do this?

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c
index 6a3c353de7c3..611de916abcf 100644
--- a/drivers/video/fbdev/udlfb.c
+++ b/drivers/video/fbdev/udlfb.c
@@ -1105,8 +1105,17 @@  static int dlfb_ops_blank(int blank_mode, struct fb_info *info)
 	char *bufptr;
 	struct urb *urb;
 
-	pr_info("/dev/fb%d FB_BLANK mode %d --> %d\n",
-		info->node, dev->blank_mode, blank_mode);
+	/*
+	 * Xorg likes to habitually unblank when already unblanked so log these
+	 * kinds of events at debug.
+	 */
+	if (dev->blank_mode == FB_BLANK_UNBLANK &&
+	    blank_mode == FB_BLANK_UNBLANK)
+		pr_debug("/dev/fb%d FB_BLANK mode %d --> %d (FB_BLANK_UNBLANK --> FB_BLANK_UNBLANK)\n",
+			 info->node, FB_BLANK_UNBLANK, FB_BLANK_UNBLANK);
+	else
+		pr_info("/dev/fb%d FB_BLANK mode %d --> %d\n",
+			info->node, dev->blank_mode, blank_mode);
 
 	if ((dev->blank_mode == FB_BLANK_POWERDOWN) &&
 	    (blank_mode != FB_BLANK_POWERDOWN)) {