From patchwork Fri Aug 17 19:26:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikulas Patocka X-Patchwork-Id: 10569337 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ABEC55A4 for ; Fri, 17 Aug 2018 19:26:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 92C732BDB1 for ; Fri, 17 Aug 2018 19:26:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 865072BDAF; Fri, 17 Aug 2018 19:26:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29B822BDAF for ; Fri, 17 Aug 2018 19:26:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727467AbeHQWbX (ORCPT ); Fri, 17 Aug 2018 18:31:23 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:53584 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727218AbeHQWbX (ORCPT ); Fri, 17 Aug 2018 18:31:23 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E6D1D401EF1B; Fri, 17 Aug 2018 19:26:45 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (file01.intranet.prod.int.rdu2.redhat.com [10.11.5.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D8D3A2156712; Fri, 17 Aug 2018 19:26:45 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (localhost [127.0.0.1]) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4) with ESMTP id w7HJQjPe001929; Fri, 17 Aug 2018 15:26:45 -0400 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id w7HJQjMt001925; Fri, 17 Aug 2018 15:26:45 -0400 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Fri, 17 Aug 2018 15:26:45 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Bartlomiej Zolnierkiewicz cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Subject: [PATCH] atyfb: fix debugging printks Message-ID: User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Fri, 17 Aug 2018 19:26:45 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Fri, 17 Aug 2018 19:26:45 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mpatocka@redhat.com' RCPT:'' Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes the debugging printks. Use pr_cont, so that the lines are not broken up. Use printk when starting a new line (a long string of pr_cont's without any printks causes missing characters in the console output on sparc). Signed-off-by: Mikulas Patocka --- drivers/video/fbdev/aty/atyfb_base.c | 36 +++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) Index: linux-stable/drivers/video/fbdev/aty/atyfb_base.c =================================================================== --- linux-stable.orig/drivers/video/fbdev/aty/atyfb_base.c 2018-08-15 19:45:56.000000000 +0200 +++ linux-stable/drivers/video/fbdev/aty/atyfb_base.c 2018-08-15 20:46:52.000000000 +0200 @@ -1480,24 +1480,28 @@ static int atyfb_set_par(struct fb_info base = 0x2000; printk("debug atyfb: Mach64 non-shadow register values:"); for (i = 0; i < 256; i = i+4) { - if (i % 16 == 0) - printk("\ndebug atyfb: 0x%04X: ", base + i); - printk(" %08X", aty_ld_le32(i, par)); + if (i % 16 == 0) { + pr_cont("\n"); + printk("debug atyfb: 0x%04X: ", base + i); + } + pr_cont(" %08X", aty_ld_le32(i, par)); } - printk("\n\n"); + pr_cont("\n\n"); #ifdef CONFIG_FB_ATY_CT /* PLL registers */ base = 0x00; printk("debug atyfb: Mach64 PLL register values:"); for (i = 0; i < 64; i++) { - if (i % 16 == 0) - printk("\ndebug atyfb: 0x%02X: ", base + i); + if (i % 16 == 0) { + pr_cont("\n"); + printk("debug atyfb: 0x%02X: ", base + i); + } if (i % 4 == 0) - printk(" "); - printk("%02X", aty_ld_pll_ct(i, par)); + pr_cont(" "); + pr_cont("%02X", aty_ld_pll_ct(i, par)); } - printk("\n\n"); + pr_cont("\n\n"); #endif /* CONFIG_FB_ATY_CT */ #ifdef CONFIG_FB_ATY_GENERIC_LCD @@ -1509,19 +1513,19 @@ static int atyfb_set_par(struct fb_info for (i = 0; i <= POWER_MANAGEMENT; i++) { if (i == EXT_VERT_STRETCH) continue; - printk("\ndebug atyfb: 0x%04X: ", + pr_cont("\ndebug atyfb: 0x%04X: ", lt_lcd_regs[i]); - printk(" %08X", aty_ld_lcd(i, par)); + pr_cont(" %08X", aty_ld_lcd(i, par)); } } else { for (i = 0; i < 64; i++) { if (i % 4 == 0) - printk("\ndebug atyfb: 0x%02X: ", + pr_cont("\ndebug atyfb: 0x%02X: ", base + i); - printk(" %08X", aty_ld_lcd(i, par)); + pr_cont(" %08X", aty_ld_lcd(i, par)); } } - printk("\n\n"); + pr_cont("\n\n"); } #endif /* CONFIG_FB_ATY_GENERIC_LCD */ } @@ -2597,8 +2601,8 @@ static int aty_init(struct fb_info *info aty_ld_le32(DSP_ON_OFF, par), aty_ld_le32(CLOCK_CNTL, par)); for (i = 0; i < 40; i++) - printk(" %02x", aty_ld_pll_ct(i, par)); - printk("\n"); + pr_cont(" %02x", aty_ld_pll_ct(i, par)); + pr_cont("\n"); } #endif if (par->pll_ops->init_pll)