NetBSD Problem Report #49744

From christos@zoulas.com  Thu Mar 12 18:50:13 2015
Return-Path: <christos@zoulas.com>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 3CC2CA5674
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 12 Mar 2015 18:50:13 +0000 (UTC)
Message-Id: <20150312185007.72932158E86@broadway.astron.com>
Date: Thu, 12 Mar 2015 18:50:07 +0000 (UTC)
From: christos@netbsd.org
Reply-To: christos@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: blank screen DL-360 radeon
X-Send-Pr-Version: 3.95

>Number:         49744
>Category:       kern
>Synopsis:       console is blank drm2/radeon
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 12 18:55:00 +0000 2015
>Last-Modified:  Thu Aug 30 22:40:01 +0000 2018
>Originator:     Christos Zoulas
>Release:        NetBSD 7.99.6
>Organization:
	Broken Consoles, Inc.
>Environment:
System: NetBSD broadway.astron.com 7.99.6 NetBSD 7.99.6 (GENERIC) #0: Thu Mar 12 14:21:33 EDT 2015 christos@broadway.astron.com:/usr/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
GENERIC kernel blank console.
Here's the relevant part of dmesg:

drm: initializing kernel modesetting (RV100 0x1002:0x515E 0x103C:0x31FB).
drm: register mmio base: 0xf1cf0000
drm: register mmio size: 65536
radeon0: info: VRAM: 128M 0x00000000E8000000 - 0x00000000EFFFFFFF (64M used)
radeon0: info: GTT: 512M 0x00000000C8000000 - 0x00000000E7FFFFFF
drm: Detected VRAM RAM=80M, BAR=128M
drm: RAM width 16bits DDR
Zone  kernel: Available graphics memory: 17296072 kiB
Zone   dma32: Available graphics memory: 2097152 kiB
drm: radeon: 64M of VRAM memory ready
drm: radeon: 512M of GTT memory ready.
drm: GART: num cpu pages 131072, num gpu pages 131072
drm: PCI GART of 512M enabled (table at 0x00000000460B2000).
radeon0: info: WB disabled
radeon0: info: fence driver on ring 0 use gpu addr 0x00000000c8000000 and cpu addr 0x0xffff8003675bc000
drm: Supports vblank timestamp caching Rev 2 (21.10.2013).
drm: Driver supports precise vblank timestamp query.
radeon0: interrupting at ioapic0 pin 23 (radeon)
drm: radeon: irq initialized.
drm: Loading R100 Microcode
drm kern error: radeon_cp: Failed to load firmware "radeon/R100_cp.bin"
DRM error in r100_cp_init: Failed to load firmware!
radeon0: error: failed initializing CP (-2).
radeon0: error: Disabling GPU acceleration
drm: radeon: cp finalized
drm: No TV DAC info found in BIOS
drm: Radeon Display Connectors
drm: Connector 0:
drm:   VGA-1
drm:   DDC: 0x60 0x60 0x60 0x60 0x60 0x60 0x60 0x60
drm:   Encoders:
drm:     CRT1: INTERNAL_DAC1
drm: Connector 1:
drm:   VGA-2
drm:   DDC: 0x6c 0x6c 0x6c 0x6c 0x6c 0x6c 0x6c 0x6c
drm:   Encoders:
drm:     CRT2: INTERNAL_DAC2
radeondrmkmsfb0 at radeon0
radeon0: info: registered panic notifier
radeondrmkmsfb0: framebuffer at 0xffff8003674ba000, size 1024x768, depth 8, stride 1024
wsdisplay0 at radeondrmkmsfb0 kbdmux 1: console (default, vt100 emulation), using wskbd0

>How-To-Repeat:
>Fix:

>Audit-Trail:
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/49744: blank screen DL-360 radeon
Date: Thu, 12 Mar 2015 15:24:52 -0500 (CDT)

 This sounds like it might be the same as the issue described in this
 thread:

   http://mail-index.netbsd.org/current-users/2015/02/20/msg026732

 observed on HP DL-380, Dell PowerEdge 2950 (ATI ES1000), and Dell
 PowerEdge 2850 (ATI Radeon 7000/VE QY).

 Does the bright white cursor appear near the bottom left of the screen?
 Depending on the characteristics of the display, there may be barely-
 visible white text (if you put your nose on the screen in a dim/dark
 room).


 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, kern-bug-people@netbsd.org, 
	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Cc: 
Subject: Re: kern/49744: blank screen DL-360 radeon
Date: Thu, 12 Mar 2015 16:37:09 -0400

 On Mar 12,  8:30pm, jdbaker@mylinuxisp.com ("John D. Baker") wrote:
 -- Subject: Re: kern/49744: blank screen DL-360 radeon

 |  This sounds like it might be the same as the issue described in this
 |  thread:
 |  
 |    http://mail-index.netbsd.org/current-users/2015/02/20/msg026732
 |  
 |  observed on HP DL-380, Dell PowerEdge 2950 (ATI ES1000), and Dell
 |  PowerEdge 2850 (ATI Radeon 7000/VE QY).
 |  
 |  Does the bright white cursor appear near the bottom left of the screen?
 |  Depending on the characteristics of the display, there may be barely-
 |  visible white text (if you put your nose on the screen in a dim/dark
 |  room).

 Yes, it is... I can't see the text though. It is on a virtual console.

 christos

From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org
Subject: re: kern/49744: blank screen DL-360 radeon
Date: Fri, 13 Mar 2015 08:03:07 +1100

 > drm kern error: radeon_cp: Failed to load firmware "radeon/R100_cp.bin"
 > DRM error in r100_cp_init: Failed to load firmware!
 > radeon0: error: failed initializing CP (-2).
 > radeon0: error: Disabling GPU acceleration

 can you try figuring out what's wrong here and if that helps?


 .mrg.

From: christos@zoulas.com (Christos Zoulas)
To: matthew green <mrg@eterna.com.au>, gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, 
	netbsd-bugs@netbsd.org
Subject: re: kern/49744: blank screen DL-360 radeon
Date: Thu, 12 Mar 2015 18:24:33 -0400

 On Mar 13,  8:03am, mrg@eterna.com.au (matthew green) wrote:
 -- Subject: re: kern/49744: blank screen DL-360 radeon

 | > drm kern error: radeon_cp: Failed to load firmware "radeon/R100_cp.bin"
 | > DRM error in r100_cp_init: Failed to load firmware!
 | > radeon0: error: failed initializing CP (-2).
 | > radeon0: error: Disabling GPU acceleration
 | 
 | can you try figuring out what's wrong here and if that helps?

 What would you like me to do? add the firmware file? or figure out the
 failed initialized CP? Or both :-)

 christos

From: matthew green <mrg@eterna.com.au>
To: christos@zoulas.com (Christos Zoulas)
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org, gnats-bugs@NetBSD.org
Subject: re: kern/49744: blank screen DL-360 radeon
Date: Fri, 13 Mar 2015 09:53:53 +1100

 Christos Zoulas writes:
 > On Mar 13,  8:03am, mrg@eterna.com.au (matthew green) wrote:
 > -- Subject: re: kern/49744: blank screen DL-360 radeon
 > 
 > | > drm kern error: radeon_cp: Failed to load firmware "radeon/R100_cp.bin"
 > | > DRM error in r100_cp_init: Failed to load firmware!
 > | > radeon0: error: failed initializing CP (-2).
 > | > radeon0: error: Disabling GPU acceleration
 > | 
 > | can you try figuring out what's wrong here and if that helps?
 > 
 > What would you like me to do? add the firmware file? or figure out the
 > failed initialized CP? Or both :-)

 the file should be installed.. but if you have a separate / to /usr
 you might need to copy it into /libdata.

 but this problem is often fatal, so we should fix it first..

 thanks.


 .mrg.

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, kern-bug-people@netbsd.org, 
	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Cc: 
Subject: re: kern/49744: blank screen DL-360 radeon
Date: Thu, 12 Mar 2015 20:10:08 -0400

 On Mar 12, 10:55pm, mrg@eterna.com.au (matthew green) wrote:
 -- Subject: re: kern/49744: blank screen DL-360 radeon


 Putting the firmware file does not make a difference (still black on black):


 drm: initializing kernel modesetting (RV100 0x1002:0x515E 0x103C:0x31FB).
 drm: register mmio base: 0xf1cf0000
 drm: register mmio size: 65536
 radeon0: info: VRAM: 128M 0x00000000E8000000 - 0x00000000EFFFFFFF (64M used)
 radeon0: info: GTT: 512M 0x00000000C8000000 - 0x00000000E7FFFFFF
 drm: Detected VRAM RAM=80M, BAR=128M
 drm: RAM width 16bits DDR
 Zone  kernel: Available graphics memory: 17296072 kiB
 Zone   dma32: Available graphics memory: 2097152 kiB
 drm: radeon: 64M of VRAM memory ready
 drm: radeon: 512M of GTT memory ready.
 drm: GART: num cpu pages 131072, num gpu pages 131072
 drm: PCI GART of 512M enabled (table at 0x00000000460B2000).
 radeon0: info: WB disabled
 radeon0: info: fence driver on ring 0 use gpu addr 0x00000000c8000000 and cpu addr 0x0xffff8003675bc000
 drm: Supports vblank timestamp caching Rev 2 (21.10.2013).
 drm: Driver supports precise vblank timestamp query.
 radeon0: interrupting at ioapic0 pin 23 (radeon)
 drm: radeon: irq initialized.
 drm: Loading R100 Microcode
 drm: radeon: ring at 0x00000000C8001000
 drm: ring test succeeded in 1 usecs
 drm: ib test succeeded in 0 usecs
 drm: No TV DAC info found in BIOS
 drm: Radeon Display Connectors
 drm: Connector 0:
 drm:   VGA-1
 drm:   DDC: 0x60 0x60 0x60 0x60 0x60 0x60 0x60 0x60
 drm:   Encoders:
 drm:     CRT1: INTERNAL_DAC1
 drm: Connector 1:
 drm:   VGA-2
 drm:   DDC: 0x6c 0x6c 0x6c 0x6c 0x6c 0x6c 0x6c 0x6c
 drm:   Encoders:
 drm:     CRT2: INTERNAL_DAC2
 radeondrmkmsfb0 at radeon0
 radeon0: info: registered panic notifier
 radeondrmkmsfb0: framebuffer at 0xffff8003679bd000, size 1024x768, depth 8, stride 1024
 wsdisplay0 at radeondrmkmsfb0 kbdmux 1: console (default, vt100 emulation), using wskbd0
 wsmux1: connecting to wsdisplay0
 wskbd1: connecting to wsdisplay0
 wsdisplay0: screen 1 added (default, vt100 emulation)
 wsdisplay0: screen 2 added (default, vt100 emulation)
 wsdisplay0: screen 3 added (default, vt100 emulation)
 wsdisplay0: screen 4 added (default, vt100 emulation)

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/49744: blank screen DL-360 radeon
Date: Mon, 16 Mar 2015 23:10:35 -0500 (CDT)

 Also observed on IBM ThinkPad T42 (serial console broken out by port
 replicator).

 NetBSD 7.99.6 (GENERIC) #5: Sat Mar 14 20:58:12 CDT 2015
         sysop@verthandi.technoskunk.fur:/d0/build/current/obj/i386/sys/arch/i386/compile/GENERIC
 total memory = 2046 MB
 avail memory = 1995 MB
 [...]
 acpivga0 at acpi0 (VID): ACPI Display Adapter
 acpiout0 at acpivga0 (LCD0, 0x0110): ACPI Display Output Device
 acpiout1 at acpivga0 (CRT0, 0x0100): ACPI Display Output Device
 acpiout2 at acpivga0 (TV0, 0x0200): ACPI Display Output Device
 acpiout3 at acpivga0 (DVI0, 0x0210): ACPI Display Output Device
 acpivga0: connected output devices:
 acpivga0:   0x0110 (acpiout0): LCD Panel, head 0
 acpivga0:   0x0100 (acpiout1): Ext. Monitor, head 0
 acpivga0:   0x0200 (acpiout2): TV, head 0
 acpivga0:   0x0210 (acpiout3): Unknown Output Device, head 0
 [...]
 pchb0 at pci0 dev 0 function 0: Intel 82855PM MCH Host Controller (rev. 0x03)
 agp0 at pchb0: aperture at 0xd0000000, size 0x10000000
 ppb0 at pci0 dev 1 function 0: Intel 82855PM Host-AGP Bridge (rev. 0x03)
 pci1 at ppb0 bus 1
 pci1: i/o space, memory space enabled
 radeon0 at pci1 dev 0 function 0: ATI Technologies Radeon Mobility M7 LW (rev. 0x00)
 [...]
 drm: initializing kernel modesetting (RV200 0x1002:0x4C57 0x1014:0x0530).
 drm: register mmio base: 0xc0100000
 drm: register mmio size: 65536
 radeon0: info: GTT: 256M 0xD0000000 - 0xDFFFFFFF
 radeon0: info: VRAM: 128M 0x00000000E0000000 - 0x00000000E7FFFFFF (32M used)
 drm: Detected VRAM RAM=80M, BAR=128M
 drm: RAM width 64bits DDR
 Zone  kernel: Available graphics memory: 795074 kiB
 drm: radeon: 32M of VRAM memory ready
 drm: radeon: 256M of GTT memory ready.
 radeon0: info: WB disabled
 radeon0: info: fence driver on ring 0 use gpu addr 0x00000000d0000000 and cpu addr 0x0xdbb04000
 drm: Supports vblank timestamp caching Rev 2 (21.10.2013).
 drm: Driver supports precise vblank timestamp query.
 radeon0: interrupting at irq 11 (radeon)
 drm: radeon: irq initialized.
 drm: Loading R100 Microcode
 drm: radeon: ring at 0x00000000D0001000
 drm: ring test succeeded in 1 usecs
 drm: ib test succeeded in 0 usecs
 drm: Panel ID String: 1024x768                
 drm: Panel Size 1024x768
 drm: No TV DAC info found in BIOS
 drm: Radeon Display Connectors
 drm: Connector 0:
 drm:   VGA-1
 drm:   DDC: 0x60 0x60 0x60 0x60 0x60 0x60 0x60 0x60
 drm:   Encoders:
 drm:     CRT1: INTERNAL_DAC1
 drm: Connector 1:
 drm:   DVI-D-1
 drm:   HPD1
 drm:   DDC: 0x64 0x64 0x64 0x64 0x64 0x64 0x64 0x64
 drm:   Encoders:
 drm:     DFP1: INTERNAL_TMDS1
 drm: Connector 2:
 drm:   LVDS-1
 drm:   Encoders:
 drm:     LCD1: INTERNAL_LVDS
 drm: Connector 3:
 drm:   SVIDEO-1
 drm:   Encoders:
 drm:     TV1: INTERNAL_DAC2
 radeondrmkmsfb0 at radeon0
 radeon0: info: registered panic notifier
 radeondrmkmsfb0: framebuffer at 0xdbd0e000, size 1024x768, depth 8, stride 1024
 wsdisplay0 at radeondrmkmsfb0 kbdmux 1
 wsmux1: connecting to wsdisplay0
 wskbd0: connecting to wsdisplay0


 Subsequently starting Xorg seems to operate the ThinkPad LCD display at
 reasonable brightness levels although acceleration must be disabled as
 per kern/49710.

 (Initially, it was unable to switch virtual terminals claiming the device
 (the destination virtual terminal) was busy, but on a subsequent boot
 switches virtual terminals properly.)


 Also, a custom kernel with "options FONT_GLASS10x19" panics claiming
 the font table is empty:

 [...]
 radeondrmkmsfb0 at radeon0
 radeon0: info: registered panic notifier
 rasops_init: font table is empty
 uvm_fault(0xc0b4c280, 0, 1) -> 0xe
 fatal page fault in supervisor mode
 trap type 6 code 0 eip c0311520 cs 8 eflags 10246 cr2 10 ilevel 0 esp c380b090
 curlwp 0xc37f2800 pid 0 lid 55 lowest kstack 0xdb43f2c0
 kernel: supervisor trap page fault, code=0
 Stopped in pid 0.55 (system) at netbsd:genfb_init_screen+0xa0:  divl    10(%ecx)
 ,%eax
 db{0}> bt
 genfb_init_screen(c380b008,c380b090,1,db441ee8,c085d7f0,c380b00c,c380b1d8,c380b0
 0c,c380b090,db441f08) at netbsd:genfb_init_screen+0xa0
 vcons_init_screen(c380b00c,c380b090,1,db441ee8,300,8,400,c380b090,c380b00c,c380b
 544) at netbsd:vcons_init_screen+0x45
 genfb_attach(c380b008,db441f24,0,0,0,c063b860,c063b5b0,0,c063b590,c063b570) at n
 etbsd:genfb_attach+0x1d7
 radeonfb_setconfig_task(c380b58c,c329a94c,c329a998,c0b2ad60,10003,c329a994,c37f2
 800,c329a94c,10003,c34a0da8) at netbsd:radeonfb_setconfig_task+0x189
 radeon_attach_real(c3573a08,c37f2800,c37f2800,0,c0100321,c37f2800,ce7000,cf0000,
 0,c0100304) at netbsd:radeon_attach_real+0x96
 config_mountroot_thread(c37f2800,ce7000,cf0000,0,c0100304,0,0,0,0,0) at netbsd:c
 onfig_mountroot_thread+0x29
 db{0}>

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/49744: blank screen DL-360 radeon
Date: Thu, 19 Mar 2015 16:12:25 -0500 (CDT)

 The workaround/hack in this commit:

   http://mail-index.netbsd.org/source-changes/2015/03/18/msg064063.html

 produces a working (i.e. not almost-black-on-black) console display on
 Dell PowerEdge 2850 (Radeon 7000 VE/QY).

 The console cursor appears blue instead of white and the Xorg stipple
 background (-retro) has a blue cast to it.  As noted in the commit
 message, red and blue are swapped, so X client colors are on the
 psychedelic side.

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/49744: blank screen DL-360 radeon
Date: Wed, 8 Apr 2015 06:31:03 -0500 (CDT)

 The previously-noted hack/workaround adversely affects my ThinkPad A31p.
 It does not suffer from an almost-black-on-black framebuffer console
 display, but the hack still produces unpleasant color effects on the
 X display.

 While tolerable for virtual terminasls (mine at least), it makes colored
 text on some simple web sites hard to read and graphics-rich websites
 practically unusable.

 (I produced a local patch to apply to netbsd-7 since I wanted to run
 that on some affected machines.  Guess I'll revert that and stick with
 "userconf=disable radeon" for now.)

 riastradh@ recently made changes to a couple of "crtc" items in HEAD.
 Perhaps they'll have some effect?  I've updated and am building now.

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org, christos@netbsd.org
Subject: re: kern/49744: blank screen DL-360 radeon
Date: Sun, 26 Apr 2015 08:02:07 +1000

 >  The previously-noted hack/workaround adversely affects my ThinkPad A31p.
 >  It does not suffer from an almost-black-on-black framebuffer console
 >  display, but the hack still produces unpleasant color effects on the
 >  X display.

 hmmm, this is an RV200 chipset.  the RV250 in my old laptop doesn't
 work at all still, with the hack in place (to not set the LUT), i get
 correct green/white on black display, but X fails (AFAIK, the GPU
 never acknowledges a job completing, so X keeps asking in a loop.)

 if you remove the hack, what happens on your system?  this is in
 legacy_crtc_load_lut(), make sure you take the original code path
 (the 2nd loop, with 20/10/0 shifts.)  if that works OK, then we
 probably need to work on this hack better, since it isn't related
 to the actual chipset, but something else.   note that the macro
 "ASIC_IS_RV100" matches almost all the r100 and r200 chipsets.

 >  While tolerable for virtual terminasls (mine at least), it makes colored
 >  text on some simple web sites hard to read and graphics-rich websites
 >  practically unusable.

 the hack broke X11 for my RV280 card.  all my colours were wrong.
 having it run the original code makes it all happy.

 i've started looking at the older video-xf86-ati drivers to see if
 they can shed any light on the problem, but i've not gotten anything
 useful yet.  i did print the contents of the LUT registers before
 we break them, but it didn't seem to make sense to me, relative to
 what we expect to put there.  unfortunately, AMD never got the r100
 and r200 documentation released, so these existing drivers are really
 the only documentation we'll be able to find..


 .mrg.

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: matthew green <mrg@eterna.com.au>
Subject: Re: kern/49744: blank screen DL-360 radeon
Date: Sun, 26 Apr 2015 09:09:19 -0500 (CDT)

 I'm not the originator of this PR, so I'm not on its default distribution
 list when updates are posted.  The following was copy/pasted from the
 netbsd-bugs@ mailing list archive with some fixups/formatting.

 On Sun, 26 Apr 2015 08:02:07 +1000, matthew green <mrg@eterna.com.au>
 wrote:

 > On Wed, 8 Apr 2015, John D. Baker wrote:
 >
 > > The previously-noted hack/workaround adversely affects my ThinkPad
 > > A31p.  It does not suffer from an almost-black-on-black framebuffer
 > > console display, but the hack still produces unpleasant color effects
 > > on the X display.

 > hmmm, this is an RV200 chipset.  the RV250 in my old laptop doesn't
 > work at all still, with the hack in place (to not set the LUT), i get
 > correct green/white on black display, but X fails (AFAIK, the GPU
 > never acknowledges a job completing, so X keeps asking in a loop.)

 As I noted in an aside to kern/49710, the black-console hack causes the
 white console text appear to have red/blue pixels sprinkled through it
 and the green kernel text is unreadable as if pixels are missing.  It
 reminds me of trying to display 80-column output from an Apple ][+ or
 //e on an NTSC composite color monitor.

 > if you remove the hack, what happens on your system?  this is in
 > legacy_crtc_load_lut(), make sure you take the original code path (the
 > 2nd loop, with 20/10/0 shifts.)  if that works OK, then we probably
 > need to work on this hack better, since it isn't related to the actual
 > chipset, but something else.   note that the macro "ASIC_IS_RV100"
 > matches almost all the r100 and r200 chipsets.

 I was pondering just reverting to r1.2 of radeon_display.c (at least
 in netbsd-7 now that the hack has been pulled up).  I think you're
 suggesting to carefully "#if 0" out a portion of the code, yes?

 > > While tolerable for virtual terminasls (mine at least), it makes
 > > colored text on some simple web sites hard to read and graphics-rich
 > > websites practically unusable.

 > the hack broke X11 for my RV280 card.  all my colours were wrong.
 > having it run the original code makes it all happy.

 I suspect the same will be true for the graphics device in my A31p
 (modulo having to keep acceleration disabled).

 In contrast, my ThinkPad T42 does suffer from the black console
 problem, so needs this or a better hack, as it screws up the colors
 on X (and has to run with acceleration disabled).

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

From: matthew green <mrg@eterna.com.au>
To: "John D. Baker" <jdbaker@mylinuxisp.com>
Cc: gnats-bugs@NetBSD.org
Subject: re: kern/49744: blank screen DL-360 radeon
Date: Sat, 09 May 2015 18:34:22 +1000

 i wonder, for the older radeon systems that are failing with blank
 or wrong displays, are any of them connected via agp?

 i've been unable to reproduce any problems on my PCI-only systems
 that i can see on my old AGP laptop, even with the exact same
 radeon chipset (RV250) and am wondering if agp is a problem..


 .mrg.

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: matthew green <mrg@eterna.com.au>
Cc: gnats-bugs@NetBSD.org
Subject: re: kern/49744: blank screen DL-360 radeon
Date: Sat, 9 May 2015 17:14:32 -0500 (CDT)

 On Sat, 9 May 2015, matthew green wrote:

 > i wonder, for the older radeon systems that are failing with blank
 > or wrong displays, are any of them connected via agp?

 My ThinkPad T42 (affected by black console) has AGP.  While the radeon
 device is on yet another PCI bus, it appears the AGP window is used.

 [...]
 pci0 at mainbus0 bus 0: configuration mode 1
 pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
 pchb0 at pci0 dev 0 function 0: Intel 82855PM MCH Host Controller (rev. 0x03)
 agp0 at pchb0: aperture at 0xd0000000, size 0x10000000
 ppb0 at pci0 dev 1 function 0: Intel 82855PM Host-AGP Bridge (rev. 0x03)
 pci1 at ppb0 bus 1
 pci1: i/o space, memory space enabled
 radeon0 at pci1 dev 0 function 0: ATI Technologies Radeon Mobility M7 LW (rev. 0x00)
 [...]
 drm: initializing kernel modesetting (RV200 0x1002:0x4C57 0x1014:0x0530).
 drm: register mmio base: 0xc0100000
 drm: register mmio size: 65536
 radeon0: info: GTT: 256M 0xD0000000 - 0xDFFFFFFF
 radeon0: info: VRAM: 128M 0x00000000E0000000 - 0x00000000E7FFFFFF (32M used)
 drm: Detected VRAM RAM=80M, BAR=128M
 drm: RAM width 64bits DDR
 Zone  kernel: Available graphics memory: 795074 kiB
 drm: radeon: 32M of VRAM memory ready
 drm: radeon: 256M of GTT memory ready.
 radeon0: info: WB disabled
 radeon0: info: fence driver on ring 0 use gpu addr 0x00000000d0000000 and cpu addr 0x0xdbb04000
 drm: Supports vblank timestamp caching Rev 2 (21.10.2013).
 drm: Driver supports precise vblank timestamp query.
 radeon0: interrupting at irq 11 (radeon)
 drm: radeon: irq initialized.
 drm: Loading R100 Microcode
 drm: radeon: ring at 0x00000000D0001000
 drm: ring test succeeded in 1 usecs
 drm: ib test succeeded in 0 usecs
 drm: Panel ID String: 1024x768                
 drm: Panel Size 1024x768
 drm: No TV DAC info found in BIOS
 drm: Radeon Display Connectors
 drm: Connector 0:
 drm:   VGA-1
 drm:   DDC: 0x60 0x60 0x60 0x60 0x60 0x60 0x60 0x60
 drm:   Encoders:
 drm:     CRT1: INTERNAL_DAC1
 drm: Connector 1:
 drm:   DVI-D-1
 drm:   HPD1
 drm:   DDC: 0x64 0x64 0x64 0x64 0x64 0x64 0x64 0x64
 drm:   Encoders:
 drm:     DFP1: INTERNAL_TMDS1
 drm: Connector 2:
 drm:   LVDS-1
 drm:   Encoders:
 drm:     LCD1: INTERNAL_LVDS
 drm: Connector 3:
 drm:   SVIDEO-1
 drm:   Encoders:
 drm:     TV1: INTERNAL_DAC2
 radeondrmkmsfb0 at radeon0
 radeon0: info: registered panic notifier
 radeondrmkmsfb0: framebuffer at 0xdbd0e000, size 1024x768, depth 8, stride 1024
 wsdisplay0 at radeondrmkmsfb0 kbdmux 1
 wsmux1: connecting to wsdisplay0
 wskbd0: connecting to wsdisplay0

 > i've been unable to reproduce any problems on my PCI-only systems
 > that i can see on my old AGP laptop, even with the exact same
 > radeon chipset (RV250) and am wondering if agp is a problem..

 Meanwhile, my older Thinkpad A31p is NOT affected by the black console
 problem (and is adversely affected by the hack to get around it).  It
 seems to have a similar arrangement to the T42:

 [...]
 pchb0 at pci0 dev 0 function 0: Intel 82845 Host (rev. 0x04)
 agp0 at pchb0: aperture at 0xe0000000, size 0x4000000
 ppb0 at pci0 dev 1 function 0: Intel 82845 AGP (rev. 0x04)
 pci1 at ppb0 bus 1
 pci1: i/o space, memory space enabled
 radeon0 at pci1 dev 0 function 0: ATI Technologies FireGL Mobility 7800 M7 LX (r
 ev. 0x00)
 radeon0: unable to reserve VGA registers for i386 radeondrmkms hack
 [...]
 drm: initializing kernel modesetting (RV200 0x1002:0x4C58 0x1014:0x0518).
 drm: register mmio base: 0xd0100000
 drm: register mmio size: 65536
 radeon0: info: GTT: 64M 0xE0000000 - 0xE3FFFFFF
 radeon0: info: VRAM: 128M 0x00000000E8000000 - 0x00000000EFFFFFFF (64M used)
 drm: Detected VRAM RAM=80M, BAR=128M
 drm: RAM width 128bits DDR
 Zone  kernel: Available graphics memory: 801180 kiB
 drm: radeon: 64M of VRAM memory ready
 drm: radeon: 64M of GTT memory ready.
 radeon0: info: WB disabled
 radeon0: info: fence driver on ring 0 use gpu addr 0x00000000e0000000 and cpu addr 0x0xdb4f4000
 drm: Supports vblank timestamp caching Rev 2 (21.10.2013).
 drm: Driver supports precise vblank timestamp query.
 radeon0: interrupting at irq 9 (radeon)
 drm: radeon: irq initialized.
 drm: Loading R100 Microcode
 drm: radeon: ring at 0x00000000E0001000
 drm: ring test succeeded in 0 usecs
 drm: ib test succeeded in 0 usecs
 drm: Panel ID String: 1600x1200               
 drm: Panel Size 1600x1200
 drm: No TV DAC info found in BIOS
 drm: Radeon Display Connectors
 drm: Connector 0:
 drm:   VGA-1
 drm:   DDC: 0x60 0x60 0x60 0x60 0x60 0x60 0x60 0x60
 drm:   Encoders:
 drm:     CRT1: INTERNAL_DAC1
 drm: Connector 1:
 drm:   DVI-D-1
 drm:   HPD1
 drm:   DDC: 0x64 0x64 0x64 0x64 0x64 0x64 0x64 0x64
 drm:   Encoders:
 drm:     DFP1: INTERNAL_TMDS1
 drm: Connector 2:
 drm:   LVDS-1
 drm:   Encoders:
 drm:     LCD1: INTERNAL_LVDS
 drm: Connector 3:
 drm:   SVIDEO-1
 drm:   Encoders:
 drm:     TV1: INTERNAL_DAC2
 radeondrmkmsfb0 at radeon0
 radeon0: info: registered panic notifier
 radeondrmkmsfb0: framebuffer at 0xdb6fe000, size 1600x1200, depth 32, stride 6400
 legacy_crtc_load_lut: unknown DAC, can't set lookup table
 wsdisplay0 at radeondrmkmsfb0 kbdmux 1: console (default, vt100 emulation), using wskbd0
 wsmux1: connecting to wsdisplay0


 Hmm.  The T42 uses the i82855 while the A31p uses the i82845 pchb/agp
 bridge.

 All the other machines I have which suffer from black console are a raft
 of Dell [12][89]50s a couple of HP DL380G5s and an IBM eServer x306
 (previously masquerading as the front-end to some Avaya hardware).  None
 of these have AGP.  The Dell [12]850s and IBM x306 have Radeon 7000 parts.
 the Dell [12]950s and the HPs have ATI ES1000 parts.  Both cause the R100
 firmware to be loaded.

 I have not yet tested a recently-received IBM x3650.

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

From: "matthew green" <mrg@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49744 CVS commit: src/sys/external/bsd/drm2/radeon
Date: Fri, 29 May 2015 05:48:46 +0000

 Module Name:	src
 Committed By:	mrg
 Date:		Fri May 29 05:48:46 UTC 2015

 Modified Files:
 	src/sys/external/bsd/drm2/radeon: radeon_pci.c

 Log Message:
 disable drmkms on r100 and most r200.  works around PR#49744, etc.


 To generate a diff of this commit:
 cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/drm2/radeon/radeon_pci.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Stephen Borrill" <sborrill@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49744 CVS commit: [netbsd-7] src/sys/external/bsd/drm2/radeon
Date: Tue, 2 Jun 2015 14:50:50 +0000

 Module Name:	src
 Committed By:	sborrill
 Date:		Tue Jun  2 14:50:50 UTC 2015

 Modified Files:
 	src/sys/external/bsd/drm2/radeon [netbsd-7]: radeon_pci.c

 Log Message:
 Pull up the following revisions(s) (requested by mrg in ticket #818):
 	sys/external/bsd/drm2/radeon/radeon_pci.c:	revision 1.10

 Disable drmkms on R100 and most R200 cards. Works around PR#49744.


 To generate a diff of this commit:
 cvs rdiff -u -r1.4.4.2 -r1.4.4.3 \
     src/sys/external/bsd/drm2/radeon/radeon_pci.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: matthew green <mrg@eterna.com.au>
To: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org, christos@netbsd.org, gnats-bugs@NetBSD.org
Cc: 
Subject: re: kern/49744: blank screen DL-360 radeon
Date: Mon, 25 Apr 2016 12:02:26 +1000

 i tried my old laptop with this problem with -current and netbsd-7
 head, and while the console itself seems to work now (it boots up
 for me with normal colours, and the smaller drm2-style font), trying
 to start X11 hangs X and when X tries to exit, the system soft hangs.
 i haven't gotten useful data yet on what happens -- the disk in this
 system decided to die.  i suspect, given what hangs, that proc_lock
 is left held when X is exiting, but i'm guessing.

 so, there is some progress at least for my system -- the console is
 now usable.  i had to patch my radeon_pci.c to enable the attach,
 and since X is still broken i don't think we should change that yet.


 .mrg.

From: coypu@SDF.ORG
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/49744: console is blank drm2/radeon
Date: Sun, 27 Nov 2016 22:57:40 +0000

 Hi,
 Looking around, I noticed all the problematic dmesgs say depth=8.
 I have no suggestion, but perhaps it has some significance.

From: "matthew green" <mrg@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49744 CVS commit: src/sys/external/bsd/drm2/drm
Date: Thu, 30 Aug 2018 22:39:54 +0000

 Module Name:	src
 Committed By:	mrg
 Date:		Thu Aug 30 22:39:54 UTC 2018

 Modified Files:
 	src/sys/external/bsd/drm2/drm: drm_agp_hook.c

 Log Message:
 if hooks init works, store the hooks in the agp.  fixes start up
 crash on an old radeon laptop.  from @riastradh.

 the console also now works, unlike previous drm2, where eg, the
 problems from PR#49744 are seen.

 unfortunately, i got a crash starting X, and no ddb yet, so we
 can't re-enable the r100/r200 parts here yet.  once this is
 known to be working we can delete the old radeondrm code, and
 remove the hacks to disable drm2 there.


 To generate a diff of this commit:
 cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/drm/drm_agp_hook.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.