Re: latest i386 radeondrmkms trials

2015-03-01 Thread Chavdar Ivanov
I've attached my dmesg.boot, Xorg.0.conf (when only Xorg is run, does not
crash, shows working mouse cursor only) and the output from a panic taken
with a debug kernel, if it might be of interest.

Chavdar

On Fri, 27 Feb 2015 at 04:28 John D. Baker jdba...@mylinuxisp.com wrote:

 On Thu, 26 Feb 2015, John D. Baker wrote:

  Xorg works very well.  ISTR some suggestions about using
 
Option  AccelMethod   SNA
 
  although that might have been aimed at i915drmkms users.  I'll try it
  on radeondrmkms for completeness.

 I checked and SNA is an intel-specific thing.  Radeon has options
 of XAA or EXA (default).  XAA produced the same results as EXA.
 Setting only RenderAccel to false allowed a few more things to
 draw, but it still panicked.

 Serial console worked, however, so I was able to capture the
 results:

 NetBSD 7.99.5 (SLAB_KMS) #24: Thu Feb 26 10:43:54 CST 2015
 sy...@verthandi.technoskunk.fur:/d0/build/current/obj/
 i386/sys/arch/i386/compile/SLAB_KMS
 total memory = 2046 MB
 avail memory = 2001 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
 [...]
 pchb0 at pci0 dev 0 function 0: Intel 82845 Host (rev. 0x04)
 agp0 at pchb0: aperture at 0xe000, size 0x400
 ppb0 at pci0 dev 1 function 0: Intel 82845 AGP (rev. 0x04)
 pci1 at ppb0 bus 1
 radeon0 at pci1 dev 0 function 0: ATI Technologies FireGL Mobility 7800 M7
 LX (rev. 0x00)
 [...]
 root file system type: nfs
 kern.module.path=/stand/i386/7.99.5/modules
 drm: initializing kernel modesetting (RV200 0x1002:0x4C58 0x1014:0x0518).
 drm: register mmio base: 0xd010
 drm: register mmio size: 65536
 radeon0: info: GTT: 64M 0xE000 - 0xE3FF
 radeon0: info: VRAM: 128M 0xE800 - 0xEFFF (64M
 used)
 drm: Detected VRAM RAM=80M, BAR=128M
 drm: RAM width 128bits DDR
 Zone  kernel: Available graphics memory: 801148 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 0xe000 and
 cpu addr 0x0xdb4fc000
 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
 warning: no /dev/console
 drm: radeon: ring at 0xE0001000
 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
 wsdisplay0 at radeondrmkmsfb0 kbdmux 1
 [...]
 [startx]
 panic: kernel diagnostic assertion ttm-caching_state == tt_cached
 failed: file /x/current/src/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c,
 line 423
 fatal breakpoint trap in supervisor mode
 trap type 1 code 0 eip c02516b4 cs 8 eflags 3246 cr2 bb1ba000 ilevel 0 esp
 dbec3d08
 curlwp 0xc3811560 pid 278 lid 1 lowest kstack 0xdbec12c0
 Stopped in pid 278.1 (Xorg) at  netbsd:breakpoint+0x4:  popl%ebp
 db{0} bt
 breakpoint(c097a41a,c0b7ec40,c095f8cc,dbec3d24,c41b8308,
 c494ef70,2000,dbec3d18,c
 08940b3,c095f8cc) at netbsd:breakpoint+0x4
 vpanic(c095f8cc,dbec3d24,dbec3d3c,c0753128,c095f8cc,
 c095fa7d,c09d3910,c09d3894,1
 a7,c41b8308) at netbsd:vpanic+0x127
 kern_assert(c095f8cc,c095fa7d,c09d3910,c09d3894,1a7,
 c41b8308,c494ef70,dbec3d68,c
 0751db0,c41b8308) at netbsd:kern_assert+0x23
 ttm_tt_swapout(c41b8308,0,c41b8308,c491b0bc,2,dbec3d78,
 c41b8308,c491b0bc,2,dbec3
 d78) at netbsd:ttm_tt_swapout+0x148
 ttm_bus_dma_unpopulate(c41b8308,c491b0bc,dbec3d8c,
 c074cba1,c41b8308,0,c491b100,d
 bec3dd0,c074dedc,0) at netbsd:ttm_bus_dma_unpopulate+0x40
 ttm_tt_destroy(c41b8308,0,c491b100,dbec3dd0,c074dedc,0,0,0,1,c491b100) at
 netbsd
 :ttm_tt_destroy+0x49
 ttm_bo_cleanup_memtype_use(0,0,0,1,c491b100,1,0,c3e0aa55,c3268b0c,c0b1f980)
 at n
 etbsd:ttm_bo_cleanup_memtype_use+0x41
 ttm_bo_release(c491b100,0,0,1,c491b218,dbec3dfc,c061ac90,
 dbec3df8,c491b08c,dbec3
 e24) at netbsd:ttm_bo_release+0x28c
 radeon_bo_unref(dbec3df8,c491b08c,dbec3e24,c0291dd2,
 c491b218,,c029caf5,c
 491b260,c48a9488,c3e521f8) at netbsd:radeon_bo_unref+0x40
 radeon_gem_object_free(c491b218,,c029caf5,
 

Re: latest i386 radeondrmkms trials

2015-02-28 Thread John D. Baker
On Thu, 26 Feb 2015, John D. Baker wrote:

 Yes, this works.  With a minimal xorg.conf:
 
 Section   Device
   Option  NoAccel   True
   Identifier  Card0
   Driver  radeon
 EndSection
 
 Xorg works very well.

To clarify, with the NoAccel option, basic operation works well.

Without acceleration, some highly-desirable applications of the
multimedia variety (mplayer in particular) are essentially unusable.

I didn't see a PR related to the i386 radeondrmkms panic, so I suppose
one is in order.

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



Re: latest i386 radeondrmkms trials

2015-02-26 Thread John D. Baker
On Thu, 19 Feb 2015, Chavdar Ivanov wrote:

 I am probably repeating others, but if you add
 
 Option NoAccel True
 
 to your Device section in xorg.conf it might work. I am in a similar point
 under -current. With NoAccel set to True it works fine. Without it I can
 run Xorg, which gives me black screen with a functional mouse, a small
 white rectangle in the top left corner; I can kill Xorg from a different
 shell. If I run startx with only xterm and twm in .xinitrc, I get up to
 the pointer for the top-left corner of the xterm requested, then it panics.

Yes, this works.  With a minimal xorg.conf:

Section Device
Option  NoAccel   True
Identifier  Card0
Driver  radeon
EndSection

Xorg works very well.  ISTR some suggestions about using

  OptionAccelMethod   SNA

although that might have been aimed at i915drmkms users.  I'll try it
on radeondrmkms for completeness.

Without the X option, startx gets as far as launching my window manager
(fvwm) although the root window stays black.  It switches from the
watch-face cursor glyph to the arrow and then the machine panics.  I'll
see about using a serial console to get more information.


I typically test these things with -current but I operate the machine as
a diskless client (netbsd-7 on local disk).  There is a very strange
behavior in that radeondrmkms will only work if /dev/console is on a
boot-time-populated tmpfs /dev and not on the NFS root filesystem.
If /dev/console exists on the NFS root, the kernel panics with:

  cnopen: no console device.

(I noted a similar behavior in:

  http://mail-index.netbsd.org/current-users/2015/02/23/msg026742.html

although radeondrmkmsfb is totally unusable in these cases.  In the
case of my i386 ThinkPad A31p, it's only NFS root that gives that
behavior--/dev/console on local ffs works fine.)

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



Re: latest i386 radeondrmkms trials

2015-02-26 Thread John D. Baker
On Thu, 26 Feb 2015, John D. Baker wrote:

 Xorg works very well.  ISTR some suggestions about using
 
   Option  AccelMethod   SNA
 
 although that might have been aimed at i915drmkms users.  I'll try it
 on radeondrmkms for completeness.

I checked and SNA is an intel-specific thing.  Radeon has options
of XAA or EXA (default).  XAA produced the same results as EXA.
Setting only RenderAccel to false allowed a few more things to
draw, but it still panicked.

Serial console worked, however, so I was able to capture the
results:

NetBSD 7.99.5 (SLAB_KMS) #24: Thu Feb 26 10:43:54 CST 2015

sy...@verthandi.technoskunk.fur:/d0/build/current/obj/i386/sys/arch/i386/compile/SLAB_KMS
total memory = 2046 MB
avail memory = 2001 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
[...]
pchb0 at pci0 dev 0 function 0: Intel 82845 Host (rev. 0x04)
agp0 at pchb0: aperture at 0xe000, size 0x400   
ppb0 at pci0 dev 1 function 0: Intel 82845 AGP (rev. 0x04)
pci1 at ppb0 bus 1
radeon0 at pci1 dev 0 function 0: ATI Technologies FireGL Mobility 7800 M7 LX 
(rev. 0x00)
[...]
root file system type: nfs  
kern.module.path=/stand/i386/7.99.5/modules
drm: initializing kernel modesetting (RV200 0x1002:0x4C58 0x1014:0x0518).
drm: register mmio base: 0xd010  
drm: register mmio size: 65536 
radeon0: info: GTT: 64M 0xE000 - 0xE3FF
radeon0: info: VRAM: 128M 0xE800 - 0xEFFF (64M used)
drm: Detected VRAM RAM=80M, BAR=128M
drm: RAM width 128bits DDR  
Zone  kernel: Available graphics memory: 801148 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 0xe000 and cpu 
addr 0x0xdb4fc000
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  
warning: no /dev/console   
drm: radeon: ring at 0xE0001000
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
wsdisplay0 at radeondrmkmsfb0 kbdmux 1  
[...]
[startx]
panic: kernel diagnostic assertion ttm-caching_state == tt_cached failed: 
file /x/current/src/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c, line 423 
fatal breakpoint trap in supervisor mode 
trap type 1 code 0 eip c02516b4 cs 8 eflags 3246 cr2 bb1ba000 ilevel 0 esp 
dbec3d08
curlwp 0xc3811560 pid 278 lid 1 lowest kstack 0xdbec12c0
Stopped in pid 278.1 (Xorg) at  netbsd:breakpoint+0x4:  popl%ebp
db{0} bt   
breakpoint(c097a41a,c0b7ec40,c095f8cc,dbec3d24,c41b8308,c494ef70,2000,dbec3d18,c
08940b3,c095f8cc) at netbsd:breakpoint+0x4 
vpanic(c095f8cc,dbec3d24,dbec3d3c,c0753128,c095f8cc,c095fa7d,c09d3910,c09d3894,1
a7,c41b8308) at netbsd:vpanic+0x127
kern_assert(c095f8cc,c095fa7d,c09d3910,c09d3894,1a7,c41b8308,c494ef70,dbec3d68,c
0751db0,c41b8308) at netbsd:kern_assert+0x23   
ttm_tt_swapout(c41b8308,0,c41b8308,c491b0bc,2,dbec3d78,c41b8308,c491b0bc,2,dbec3
d78) at netbsd:ttm_tt_swapout+0x148
ttm_bus_dma_unpopulate(c41b8308,c491b0bc,dbec3d8c,c074cba1,c41b8308,0,c491b100,d
bec3dd0,c074dedc,0) at netbsd:ttm_bus_dma_unpopulate+0x40  
ttm_tt_destroy(c41b8308,0,c491b100,dbec3dd0,c074dedc,0,0,0,1,c491b100) at netbsd
:ttm_tt_destroy+0x49   
ttm_bo_cleanup_memtype_use(0,0,0,1,c491b100,1,0,c3e0aa55,c3268b0c,c0b1f980) at n

latest i386 radeondrmkms trials

2015-02-16 Thread John D. Baker
Using a netbsd-7 kernel based on DRMKMS, but with pcdisplay and vga0 at isa
disabled, I observed the following:

With console on serial port, the machine eventually hangs during
radeondrmkms initialization.  A power-cycle is the only way to regain
control (can't BREAK into DDB).  Relevant excerpted dmesg captured on
serial console:

NetBSD 7.0_BETA (SLAB_KMS) #11: Mon Feb 16 17:20:57 CST 2015

sy...@verthandi.technoskunk.fur:/d0/build/netbsd-7/obj/i386/sys/arch/i386/compile/SLAB_KMS
total memory = 2047 MB
avail memory = 2001 MB
[...]
acpivga0 at acpi0 (VID): ACPI Display Adapter
acpivga0: capabilities: _DOS _DOD
acpiout0 at acpivga0 (LCD0, 0x0110): ACPI Display Output Device
acpiout0: capabilities: _DDC _DCS _DGS _DSS
acpiout1 at acpivga0 (CRT0, 0x0100): ACPI Display Output Device
acpiout1: capabilities: _DDC _DCS _DGS _DSS
acpiout2 at acpivga0 (TV0, 0x0200): ACPI Display Output Device
acpiout2: capabilities: _DDC _DCS _DGS _DSS   
acpiout3 at acpivga0 (DVI0, 0x0210): ACPI Display Output Device
acpiout3: capabilities: _DCS _DGS _DSS 
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 82845 Host (rev. 0x04)  
agp0 at pchb0: aperture at 0xe000, size 0x400   
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 
(rev. 0x00)
radeon0: WARNING: power management not supported
[...]
pci_mem_find: void region 
pci_mem_find: void region
pci_mem_find: void region
pci_mem_find: void region
radeon0: map 3 failed
pci_mem_find: void region
radeon0: map 4 failed
pci_mem_find: void region
radeon0: map 5 failed
DRM debug in drm_minor_register: 
DRM debug in drm_minor_register: new minor assigned 64
DRM debug in drm_minor_register:  
DRM debug in drm_minor_register: 
DRM debug in drm_minor_register: new minor assigned 0
drm: initializing kernel modesetting (RV200 0x1002:0x4C58 0x1014:0x0518).
drm: register mmio base: 0xd010  
drm: register mmio size: 65536 
pci_io_find: expected type i/o, found mem
DRM debug in radeon_get_bios: COMBIOS detected
radeon0: info: GTT: 64M 0xE000 - 0xE3FF
radeon0: info: VRAM: 128M 0xE800 - 0xEFFF (64M used)
drm: Detected VRAM RAM=80M, BAR=128M
drm: RAM width 128bits DDR  
Zone  kernel: Available graphics memory: 801714 kiB
drm: radeon: 64M of VRAM memory ready  
drm: radeon: 64M of GTT memory ready.
DRM debug in radeon_pm_print_states: 1 Power State(s)
DRM debug in radeon_pm_print_states: State 0:
DRM debug in radeon_pm_print_states:DefaultDRM debug in 
radeon_pm_print_states: 1 Clock Mode(s)
DRM debug in radeon_pm_print_states:0 e: 26 m: 183000   
v: 0
[hangs here]


With console on video, radeondrmkms attaches and works well for text
operations.  Booting with -x spams the console relatively forever with
timing/position calculation messages.  (I let it run for 8 hours and it
never got around to exec()-ing 'init'.)  Same dmesg excerpts for
comparison:

NetBSD 7.0_BETA (SLAB_KMS) #11: Mon Feb 16 17:20:57 CST 2015

sy...@verthandi.technoskunk.fur:/d0/build/netbsd-7/obj/i386/sys/arch/i386/compile/SLAB_KMS
total memory = 2047 MB
avail memory = 2001 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 82845 Host (rev. 0x04)
agp0 at pchb0: aperture at 0xe000, size 0x400
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 
(rev. 0x00)
[...]
drm: initializing kernel modesetting (RV200 0x1002:0x4C58 0x1014:0x0518).
drm: register mmio base: 0xd010
drm: register mmio size: 65536
radeon0: info: GTT: 64M 0xE000 - 0xE3FF
radeon0: info: VRAM: 128M 0xE800 - 0xEFFF (64M used)
drm: Detected VRAM RAM=80M, BAR=128M
drm: RAM width 128bits DDR
Zone  kernel: