Discussion:
amd64 DRMKMS (ivy bridge) results, 14 Jun 2014
Piotr Meyer
2014-08-14 17:09:46 UTC
Permalink
Ivy Bridge integrated GPU, fresh sources:

1. Now, I got valid resolution on console and in X (1280x1024).
Much better. ;)

2. glxgears leads to panic, after ddb.onpanic=1 I got:

drm: stuck in render ring
panic: kernel diagnostic assertion "spin_is_locked(interlock)" failed:
file "/usr/src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h",
line 89
fatal breakpoint trap in supervisor mode
trap type 1 code 0 rip ffffffff8028bc5d cs 8 rflags 246 cr2 7f7ff7b0d020
ilevel 2 rsp fffffe80cefffd28
curlwp 0xfffffe811e143860 pid 0.5 lowest kstack 0xfffffe80ceffc2c0
Stopped in pid 0.5 (system) at netbsd:breakpoint+0x5: leave

Regards,
--
Piotr 'aniou' Meyer
Piotr Meyer
2014-08-15 18:03:14 UTC
Permalink
Post by Piotr Meyer
1. Now, I got valid resolution on console and in X (1280x1024).
Much better. ;)
Some additional debug info, hope this helps a little:


#v+
Reading symbols from /netbsd.gdb...done.
Load new symbol table from "/netbsd.gdb"? (y or n) y
Reading symbols from /netbsd.gdb...done.
0xffffffff8067a5bf in cpu_reboot (howto=***@entry=256, bootstr=***@entry=0x0)
at /usr/src/sys/arch/amd64/amd64/machdep.c:671
671 dumpsys();
#0 0xffffffff8067a5bf in cpu_reboot (howto=***@entry=256, bootstr=***@entry=0x0) at /usr/src/sys/arch/amd64/amd64/machdep.c:671
#1 0xffffffff802aaaa6 in db_sync_cmd (addr=<optimized out>, have_addr=<optimized out>, count=<optimized out>, modif=<optimized out>) at /usr/src/sys/ddb/db_command.c:1358
#2 0xffffffff802ab267 in db_command (last_cmdp=***@entry=0xffffffff8109e180 <db_last_command>) at /usr/src/sys/ddb/db_command.c:907
#3 0xffffffff802ab5f4 in db_command_loop () at /usr/src/sys/ddb/db_command.c:565
#4 0xffffffff802b0d0d in db_trap (type=***@entry=1, code=***@entry=0) at /usr/src/sys/ddb/db_trap.c:90
#5 0xffffffff802adf80 in kdb_trap (type=***@entry=1, code=***@entry=0, regs=***@entry=0xfffffe80cefffc30) at /usr/src/sys/arch/amd64/amd64/db_interface.c:227
#6 0xffffffff809157c2 in trap (frame=0xfffffe80cefffc30) at /usr/src/sys/arch/amd64/amd64/trap.c:287
#7 0xffffffff80100fde in alltraps ()
#8 0xffffffff8028bc5d in breakpoint ()
#9 0xffffffff808c6f90 in vpanic (fmt=0xffffffff80d34318 "kernel %sassertion \"%s\" failed: file \"%s\", line %d ", ap=***@entry=0xfffffe80cefffd60)
at /usr/src/sys/kern/subr_prf.c:338
#10 0xffffffff80a62393 in kern_assert (fmt=***@entry=0xffffffff80d34318 "kernel %sassertion \"%s\" failed: file \"%s\", line %d ")
at /usr/src/sys/lib/libkern/kern_assert.c:51
#11 0xffffffff803b27ec in DRM_SPIN_WAITERS_P (interlock=0xffff800006b03ca0, q=0xffff800006b03688) at /usr/src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h:89
#12 i915_record_ring_state (ering=0xfffffe811cbf7a10, ring=0xffff800006b03560, dev=0xfffffe8106bc3010) at /usr/src/sys/external/bsd/drm2/dist/drm/i915/i915_gpu_error.c:812
#13 i915_gem_record_rings (error=0xfffffe811cbf7810, dev=0xfffffe8106bc3010) at /usr/src/sys/external/bsd/drm2/dist/drm/i915/i915_gpu_error.c:924
#14 i915_capture_error_state (dev=0xfffffe8106bc3010, wedged=<optimized out>, error_msg=0xfffffe80cefffe88 "Ring hung")
at /usr/src/sys/external/bsd/drm2/dist/drm/i915/i915_gpu_error.c:1191
#15 0xffffffff803b763f in i915_handle_error (dev=0xfffffe8106bc3010, wedged=<optimized out>, fmt=<optimized out>)
at /usr/src/sys/external/bsd/drm2/dist/drm/i915/i915_irq.c:2364
#16 0xffffffff80618752 in callout_softclock (v=<optimized out>) at /usr/src/sys/kern/kern_timeout.c:736
#17 0xffffffff8060d338 in softint_execute (l=<optimized out>, s=2, si=0xffff800042a310c0) at /usr/src/sys/kern/kern_softint.c:589
#18 softint_dispatch (pinned=<error reading variable: Cannot access memory at address 0xfffffe80cf0000c0>, s=2) at /usr/src/sys/kern/kern_softint.c:871
#19 0xffffffff8011412f in Xsoftintr ()
/usr/src/external/gpl3/gdb/dist/gdb/frame.c:472: internal-error: get_frame_id: Assertion `fi->this_id.p' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y
/usr/src/external/gpl3/gdb/dist/gdb/frame.c:472: internal-error: get_frame_id: Assertion `fi->this_id.p' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) n
#v-


Kernel running w/o DIAGNOSTIC/DEBUG gave me:


#v+
drm: stuck on render ring
drm: GPU HANG: ecode 0:0x86edffff, reason: Ring hung, action: reset
drm: GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.
drm: Please file a _new_ bug report on bugs.freedesktop.org against DRI -> DRM/Intel
drm: drm/i915 developers can then reassign to the right component if it's not a kernel issue.
drm: The gpu crash dump is required to analyze gpu hangs, so please always attach it.
drm: GPU crash dump saved to /sys/class/drm/card0/error
i915drmkms0: interrupting at ioapic0 pin 16 (***@pci:0000:00:02.0)
drm: Enabling RC6 states: RC6 on, RC6p on, RC6pp off
drm: stuck on render ring
drm: GPU HANG: ecode 0:0x86ed7c1f, reason: Ring hung, action: reset
DRM error in i915_context_is_banned: gpu hanging too fast, banning!
i915drmkms0: interrupting at ioapic0 pin 16 (***@pci:0000:00:02.0)
drm: Enabling RC6 states: RC6 on, RC6p on, RC6pp off
#v-

Regards,
--
Piotr 'aniou' Meyer
Taylor R Campbell
2014-08-15 19:13:23 UTC
Permalink
Date: Fri, 15 Aug 2014 20:03:14 +0200
Post by Piotr Meyer
1. Now, I got valid resolution on console and in X (1280x1024).
Much better. ;)
Some additional debug info, hope this helps a little:

The real problem here is that the GPU is hanging, and I don't know why
that is. The panic you saw is due to a locking mistake which should
be easy to fix, but I haven't had time to identify all the relevant
code paths and do it.

Actually, it may suffice to just omit the call to DRM_SPIN_WAITERS_P
altogether -- I'm not sure anything important relies on the result.
Piotr Meyer
2014-08-24 12:01:11 UTC
Permalink
On Fri, Aug 15, 2014 at 08:03:14PM +0200, Piotr Meyer wrote:
[...]
Post by Taylor R Campbell
The real problem here is that the GPU is hanging, and I don't know why
that is. The panic you saw is due to a locking mistake which should
be easy to fix, but I haven't had time to identify all the relevant
code paths and do it.
[...]

I just made test with MesaLib 10.2.6 and this version (also used and
tested with my hw in Free and newest Open) works fine. After simply
replacement /usr/X11R7/lib/modules/dri/i965_dri.so by corresponding
library from new Mesa my problems disappeared.

$ glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Desktop
OpenGL version string: 3.0 Mesa 10.2.6
OpenGL shading language version string: 1.30

I knew rationales behind Mesa 7.x in NetBSD but - on the other hand
- support for newer GPUs may be worthwhile to consider...
--
Piotr 'aniou' Meyer
Loading...