[Intel-gfx] [PATCH] drm/i915: execbuf2 support

Eric Anholt eric at anholt.net
Wed Dec 16 22:22:26 CET 2009


On Tue,  1 Dec 2009 20:13:51 +0000, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> From: Jesse Barnes <jbarnes at virtuousgeek.org>
> 
> This patch adds a new execbuf ioctl, execbuf2, for use by clients that
> want to control fence register allocation more finely.  The buffer
> passed in to the new ioctl includes a new relocation type to indicate
> whether a given object needs a fence register assigned for the command
> buffer in question.
> 
> Compatibility with the existing execbuf ioctl is implemented in terms
> of the new code, preserving the assumption that fence registers are
> required for pre-965 rendering commands.
> 
> Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
> [ickle: Remove pre-emptive clear_fence_reg()]
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

I tried applying this.  My 2530p, and I think my x200s as well, now hang
at X startup, bisected to this commit.

First thing is X gets whiny:
Execbuffer fails to pin. Estimate: 16384. Actual: 16384. Available: 197091328
(some delay)
Execbuffer fails to pin. Estimate: 16384. Actual: 16384. Available: 197091328
Execbuffer fails to pin. Estimate: 29081600. Actual: 4325376. Available: 197091328
Execbuffer fails to pin. Estimate: 40960. Actual: 24576. Available: 197091328
Execbuffer fails to pin. Estimate: 16384. Actual: 16384. Available:
197091328

I think the first dmesg bits came in a while after that first execbuf
complaint, but I'm not sure.

[  280.215941] [drm:i915_gem_do_execbuffer] *ERROR* Invalid object handle 0 at index 0
[  291.862054] render error detected, EIR: 0x00000010
[  291.862063]   IPEIR: 0x00000000
[  291.862068]   IPEHR: 0x00000000
[  291.862072]   INSTDONE: 0xffffffff
[  291.862076]   INSTPS: 0x8001e020
[  291.862080]   INSTDONE1: 0xbfffffff
[  291.862084]   ACTHD: 0x80001000
[  291.862089] page table error
[  291.862093]   PGTBL_ER: 0x00100000
[  291.862099] [drm:i915_handle_error] *ERROR* EIR stuck: 0x00000010, masking
[  292.476035] [drm:i915_hangcheck_elapsed] *ERROR* Hangcheck timer elapsed... GPU hung
[  292.476047] render error detected, EIR: 0x00000010
[  292.476052]   IPEIR: 0x00000000
[  292.476057]   IPEHR: 0x00000000
[  292.476061]   INSTDONE: 0xffffffff
[  292.476065]   INSTPS: 0x8001e020
[  292.476069]   INSTDONE1: 0xbfffffff
[  292.476074]   ACTHD: 0x80001000
[  292.476078] page table error
[  292.476082]   PGTBL_ER: 0x00100000
[  292.476114] [drm:i915_do_wait_request] *ERROR* i915_do_wait_request returns -5 (awaiting 2 at 1)
[  292.800250] [drm:i915_hangcheck_elapsed] *ERROR* Hangcheck timer elapsed... GPU hung
[  292.800262] render error detected, EIR: 0x00000010
[  292.800267]   IPEIR: 0x00000000
[  292.800271]   IPEHR: 0x00000000
[  292.800275]   INSTDONE: 0xffffffff
[  292.800280]   INSTPS: 0x8001e020
[  292.800284]   INSTDONE1: 0xbfffffff
[  292.800289]   ACTHD: 0x80001000
[  292.800295] page table error
[  292.800298]   PGTBL_ER: 0x00100000
[  292.800310] render error detected, EIR: 0x00000010
[  292.800315]   IPEIR: 0x00000000
[  292.800319]   IPEHR: 0x00000000
[  292.800323]   INSTDONE: 0xffffffff
[  292.800327]   INSTPS: 0x8001e020
[  292.800331]   INSTDONE1: 0xbfffffff
[  292.800336]   ACTHD: 0x80001000
[  292.800340] page table error
[  292.800344]   PGTBL_ER: 0x00100000
[  292.800350] [drm:i915_handle_error] *ERROR* EIR stuck: 0x00000010, masking
[  292.800362] [drm:i915_handle_error] *ERROR* EIR stuck: 0x00000010, masking
[  292.800402] [drm:i915_do_wait_request] *ERROR* i915_do_wait_request returns -5 (awaiting 5 at 1)
[  292.824621] [drm:i915_gem_do_execbuffer] *ERROR* Invalid object handle 0 at index 0
[  292.824641] BUG: unable to handle kernel NULL pointer dereference at 00000064
[  292.824650] IP: [<f8ffef5e>] i915_gem_do_execbuffer+0xcf5/0xebe [i915]
[  292.824689] *pde = 00000000 
[  292.824695] Oops: 0002 [#1] SMP 
[  292.824702] last sysfs file: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT0/charge_full
[  292.824710] Modules linked in: fbcon font bitblit softcursor i915 drm_kms_helper drm i2c_algo_bit cfbcopyarea cfbimgblt cfbfillrect video output 8250_pci
[  292.824739] 
[  292.824747] Pid: 4005, comm: Xorg Not tainted 2.6.32 #270 30E1/HP EliteBook 2530p
[  292.824754] EIP: 0060:[<f8ffef5e>] EFLAGS: 00013282 CPU: 0
[  292.824784] EIP is at i915_gem_do_execbuffer+0xcf5/0xebe [i915]
[  292.824791] EAX: 00000000 EBX: fffffff7 ECX: 00003046 EDX: 01a83000
[  292.824797] ESI: 00000001 EDI: f4427f80 EBP: f4b7bdec ESP: f4b7bd74
[  292.824804]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[  292.824811] Process Xorg (pid: 4005, ti=f4b7a000 task=f69201b0 task.ti=f4b7a000)
[  292.824816] Stack:
[  292.824819]  00000001 f4b8bac0 000003a4 f4b7bd8c c0127a0e 00000000 f4b7bda8 00003246
[  292.824833] <0> f599fd40 f59476c0 f4b7bdb0 f6436014 00000000 f70e6e00 00000000 00000010
[  292.824847] <0> 00000000 f4a86000 f4427f80 f59476c0 c01c3856 f6436000 00000260 f4b7bdf4
[  292.824863] Call Trace:
[  292.824876]  [<c0127a0e>] ? __wake_up_sync+0xa/0xd
[  292.824888]  [<c01c3856>] ? inotify_d_instantiate+0x12/0x34
[  292.824919]  [<f8fff334>] ? i915_gem_execbuffer+0x98/0x42b [i915]
[  292.824951]  [<f8fff5ad>] ? i915_gem_execbuffer+0x311/0x42b [i915]
[  292.824962]  [<c0307b88>] ? _copy_from_user+0x31/0x117
[  292.824990]  [<f8a5f419>] ? drm_ioctl+0x1f5/0x283 [drm]
[  292.825021]  [<f8fff29c>] ? i915_gem_execbuffer+0x0/0x42b [i915]
[  292.825032]  [<c01b639e>] ? __mark_inode_dirty+0x52/0x114
[  292.825043]  [<c01aea0e>] ? file_update_time+0xbe/0xcc
[  292.825052]  [<c018eb9d>] ? __do_fault+0x2de/0x314
[  292.825063]  [<c0820c76>] ? _lock_kernel+0x49/0x74
[  292.825072]  [<c01aa502>] ? vfs_ioctl+0x69/0x91
[  292.825081]  [<c01aaa47>] ? do_vfs_ioctl+0x47e/0x4bc
[  292.825089]  [<c018ff48>] ? handle_mm_fault+0x23a/0x4bd
[  292.825098]  [<c01048c1>] ? timer_interrupt+0x35/0x3c
[  292.825109]  [<c0164905>] ? handle_IRQ_event+0x4d/0xee
[  292.825118]  [<c01aaac6>] ? sys_ioctl+0x41/0x61
[  292.825126]  [<c0102890>] ? sysenter_do_call+0x12/0x26
[  292.825132] Code: c8 00 00 00 00 31 f6 8b 7d d0 eb 09 8b 04 b7 46 e8 95 bc ff ff 3b 75 c8 7c f2 31 f6 8b 7d d0 eb 23 8b 04 b7 85 c0 74 0a 8b 40 50 <c7> 40 64 00 00 00 00 8b 04 b7 85 c0 74 0a ba 3b 07 a6 f8 e8 6a 
[  292.825212] EIP: [<f8ffef5e>] i915_gem_do_execbuffer+0xcf5/0xebe [i915] SS:ESP 0068:f4b7bd74
[  292.825246] CR2: 0000000000000064
[  292.825260] ---[ end trace e5352eaa4ce0f4fa ]---
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20091216/738fc8bc/attachment.sig>


More information about the Intel-gfx mailing list