NetBSD Problem Report #55884

From www@netbsd.org  Sat Dec 19 21:25:32 2020
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 3B50D1A9239
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 19 Dec 2020 21:25:32 +0000 (UTC)
Message-Id: <20201219212531.4A8EA1A923A@mollari.NetBSD.org>
Date: Sat, 19 Dec 2020 21:25:31 +0000 (UTC)
From: vezhlys@gmail.com
Reply-To: vezhlys@gmail.com
To: gnats-bugs@NetBSD.org
Subject: viadrmums* at vga* does not add new line in dmesg
X-Send-Pr-Version: www-1.0

>Number:         55884
>Category:       kern
>Synopsis:       viadrmums* at vga* does not add new line in dmesg
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 19 21:30:00 +0000 2020
>Closed-Date:    Thu Feb 25 14:10:26 +0000 2021
>Last-Modified:  Thu Feb 25 14:10:26 +0000 2021
>Originator:     Andrius V
>Release:        NetBSD 9.1
>Organization:
>Environment:
>Description:
Booting with viadrmums module (built-in or dynamic) prints it in dmesg without adding a new line, thus combining supposedly new line together with it, for example:
viadrmums0 at vga0kern info: [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).

or

viadrmums0 at vga0pci_mem_find: void region

Seems like very minor bug but I didn't find myself where the new line should be added.

Regards,
Andrius V
>How-To-Repeat:
Boot with viadrmums enabled on supported VIA hardware.
>Fix:

>Release-Note:

>Audit-Trail:
From: Andrius V <vezhlys@gmail.com>
To: kern-bug-people@netbsd.org, netbsd-bugs@netbsd.org, gnats-bugs@netbsd.org, 
	gnats-admin@netbsd.org
Cc: 
Subject: Re: kern/55884: viadrmums* at vga* does not add new line in dmesg
Date: Thu, 11 Feb 2021 23:43:44 +0200

 --00000000000092f07b05bb166a01
 Content-Type: text/plain; charset="UTF-8"

 The missing new line is likely related to undefined device name in the
 driver. An old viadrm driver was taking it from drm pciids. However, this
 information would be just a duplicate to the vga driver itself which prints
 device information, thus just adding a new line seems to be relevant fix.
 This patch works for me:

 diff --git a/sys/external/bsd/drm2/via/via_pci.c
 b/sys/external/bsd/drm2/via/via_pci.c

 --- a/sys/external/bsd/drm2/via/via_pci.c
 +++ b/sys/external/bsd/drm2/via/via_pci.c
 @@ -116,6 +116,9 @@ viadrm_attach(device_t parent, device_t self, void *aux)

         KASSERT(cookiep != NULL);

 +       aprint_naive("\n");
 +       aprint_normal("\n");
 +
         if (!pmf_device_register(self, NULL, NULL))
                 aprint_error_dev(self, "couldn't establish power
 handler\n");

 relevant dmesg part after the patch:
 ...
 pci1 at ppb0 bus 1
 pci1: i/o space, memory space enabled
 vga0 at pci1 dev 0 function 0: VIA Technologies product 3118 (rev. 0x02)
 wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation)
 wsmux1: connecting to wsdisplay0
 viadrmums0 at vga0
 kern info: [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
 kern info: [drm] No driver support for vblank timestamp query.
 ...

 On Sat, Dec 19, 2020 at 11:30 PM <vezhlys@gmail.com> wrote:

 > >Number:         55884
 > >Category:       kern
 > >Synopsis:       viadrmums* at vga* does not add new line in dmesg
 > >Confidential:   no
 > >Severity:       non-critical
 > >Priority:       low
 > >Responsible:    kern-bug-people
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Sat Dec 19 21:30:00 +0000 2020
 > >Originator:     Andrius V
 > >Release:        NetBSD 9.1
 > >Organization:
 > >Environment:
 > >Description:
 > Booting with viadrmums module (built-in or dynamic) prints it in dmesg
 > without adding a new line, thus combining supposedly new line together with
 > it, for example:
 > viadrmums0 at vga0kern info: [drm] Supports vblank timestamp caching Rev 2
 > (21.10.2013).
 >
 > or
 >
 > viadrmums0 at vga0pci_mem_find: void region
 >
 > Seems like very minor bug but I didn't find myself where the new line
 > should be added.
 >
 > Regards,
 > Andrius V
 > >How-To-Repeat:
 > Boot with viadrmums enabled on supported VIA hardware.
 > >Fix:
 >
 >

 --00000000000092f07b05bb166a01
 Content-Type: text/html; charset="UTF-8"
 Content-Transfer-Encoding: quoted-printable

 <div dir=3D"ltr"><div>The missing new line is likely related to undefined d=
 evice name in the driver. An old viadrm driver was taking it from drm pciid=
 s. However, this information would be just a duplicate to the vga driver it=
 self which prints device information, thus just adding a new line seems to =
 be relevant fix. This patch works for me:</div><div><br></div>diff --git a/=
 sys/external/bsd/drm2/via/via_pci.c b/sys/external/bsd/drm2/via/via_pci.c<b=
 r><br>--- a/sys/external/bsd/drm2/via/via_pci.c<br>+++ b/sys/external/bsd/d=
 rm2/via/via_pci.c<br>@@ -116,6 +116,9 @@ viadrm_attach(device_t parent, dev=
 ice_t self, void *aux)<br>=C2=A0<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 KASSERT(coo=
 kiep !=3D NULL);<br>=C2=A0<br>+ =C2=A0 =C2=A0 =C2=A0 aprint_naive(&quot;\n&=
 quot;);<br>+ =C2=A0 =C2=A0 =C2=A0 aprint_normal(&quot;\n&quot;);<br>+<br>=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (!pmf_device_register(self, NULL, NULL))<br>=
 <div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 aprint_error_d=
 ev(self, &quot;couldn&#39;t establish power handler\n&quot;);</div><div><br=
 ></div><div>relevant dmesg part after the patch:</div><div>...<br></div><di=
 v>pci1 at ppb0 bus 1<br>pci1: i/o space, memory space enabled<br>vga0 at pc=
 i1 dev 0 function 0: VIA Technologies product 3118 (rev. 0x02)<br>wsdisplay=
 0 at vga0 kbdmux 1: console (80x25, vt100 emulation)<br>wsmux1: connecting =
 to wsdisplay0<br>viadrmums0 at vga0<br>kern info: [drm] Supports vblank tim=
 estamp caching Rev 2 (21.10.2013).<br>kern info: [drm] No driver support fo=
 r vblank timestamp query.</div><div>...<br></div></div><br><div class=3D"gm=
 ail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sat, Dec 19, 2020 at 11=
 :30 PM &lt;<a href=3D"mailto:vezhlys@gmail.com">vezhlys@gmail.com</a>&gt; w=
 rote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0p=
 x 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">&gt;Number=
 :=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A055884<br>
 &gt;Category:=C2=A0 =C2=A0 =C2=A0 =C2=A0kern<br>
 &gt;Synopsis:=C2=A0 =C2=A0 =C2=A0 =C2=A0viadrmums* at vga* does not add new=
  line in dmesg<br>
 &gt;Confidential:=C2=A0 =C2=A0no<br>
 &gt;Severity:=C2=A0 =C2=A0 =C2=A0 =C2=A0non-critical<br>
 &gt;Priority:=C2=A0 =C2=A0 =C2=A0 =C2=A0low<br>
 &gt;Responsible:=C2=A0 =C2=A0 kern-bug-people<br>
 &gt;State:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 open<br>
 &gt;Class:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sw-bug<br>
 &gt;Submitter-Id:=C2=A0 =C2=A0net<br>
 &gt;Arrival-Date:=C2=A0 =C2=A0Sat Dec 19 21:30:00 +0000 2020<br>
 &gt;Originator:=C2=A0 =C2=A0 =C2=A0Andrius V<br>
 &gt;Release:=C2=A0 =C2=A0 =C2=A0 =C2=A0 NetBSD 9.1<br>
 &gt;Organization:<br>
 &gt;Environment:<br>
 &gt;Description:<br>
 Booting with viadrmums module (built-in or dynamic) prints it in dmesg with=
 out adding a new line, thus combining supposedly new line together with it,=
  for example:<br>
 viadrmums0 at vga0kern info: [drm] Supports vblank timestamp caching Rev 2 =
 (21.10.2013).<br>
 <br>
 or<br>
 <br>
 viadrmums0 at vga0pci_mem_find: void region<br>
 <br>
 Seems like very minor bug but I didn&#39;t find myself where the new line s=
 hould be added.<br>
 <br>
 Regards,<br>
 Andrius V<br>
 &gt;How-To-Repeat:<br>
 Boot with viadrmums enabled on supported VIA hardware.<br>
 &gt;Fix:<br>
 <br>
 </blockquote></div>

 --00000000000092f07b05bb166a01--

State-Changed-From-To: open->feedback
State-Changed-By: jakllsch@NetBSD.org
State-Changed-When: Mon, 15 Feb 2021 13:37:47 +0000
State-Changed-Why:
should be fixed since -r1.5 src/sys/external/bsd/drm2/via/via_pci.c


From: Andrius V <vezhlys@gmail.com>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org, netbsd-bugs@netbsd.org, gnats-admin@netbsd.org, 
	jakllsch@netbsd.org
Subject: Re: kern/55884 (viadrmums* at vga* does not add new line in dmesg)
Date: Tue, 16 Feb 2021 01:10:30 +0200

 --00000000000046329e05bb681832
 Content-Type: text/plain; charset="UTF-8"

 Hi,

 Yes, I saw the commit. It works as expected, PR can be closed. Thank you.

 Regards,
 Andrius V

 On Mon, Feb 15, 2021 at 3:37 PM <jakllsch@netbsd.org> wrote:

 > Synopsis: viadrmums* at vga* does not add new line in dmesg
 >
 > State-Changed-From-To: open->feedback
 > State-Changed-By: jakllsch@NetBSD.org
 > State-Changed-When: Mon, 15 Feb 2021 13:37:47 +0000
 > State-Changed-Why:
 > should be fixed since -r1.5 src/sys/external/bsd/drm2/via/via_pci.c
 >
 >
 >
 >

 --00000000000046329e05bb681832
 Content-Type: text/html; charset="UTF-8"
 Content-Transfer-Encoding: quoted-printable

 <div dir=3D"ltr"><div>Hi,</div><div><br></div><div>Yes, I saw the commit. I=
 t works as expected, PR can be closed. Thank you.<br></div><div><br></div><=
 div>Regards,</div><div>Andrius V<br></div></div><br><div class=3D"gmail_quo=
 te"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, Feb 15, 2021 at 3:37 PM &=
 lt;<a href=3D"mailto:jakllsch@netbsd.org">jakllsch@netbsd.org</a>&gt; wrote=
 :<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.=
 8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Synopsis: viad=
 rmums* at vga* does not add new line in dmesg<br>
 <br>
 State-Changed-From-To: open-&gt;feedback<br>
 State-Changed-By: jakllsch@NetBSD.org<br>
 State-Changed-When: Mon, 15 Feb 2021 13:37:47 +0000<br>
 State-Changed-Why:<br>
 should be fixed since -r1.5 src/sys/external/bsd/drm2/via/via_pci.c<br>
 <br>
 <br>
 <br>
 </blockquote></div>

 --00000000000046329e05bb681832--

State-Changed-From-To: feedback->closed
State-Changed-By: jakllsch@NetBSD.org
State-Changed-When: Thu, 25 Feb 2021 14:10:26 +0000
State-Changed-Why:
fixed


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.