1. 23 3月, 2011 1 次提交
    • H
      drm/i915: Prevent racy removal of request from client list · 09bfa517
      Herton Ronaldo Krzesinski 提交于
      When i915_gem_retire_requests_ring calls i915_gem_request_remove_from_client,
      the client_list for that request may already be removed in i915_gem_release.
      So we may call twice list_del(&request->client_list), resulting in an
      oops like this report:
      
      [126167.230394] BUG: unable to handle kernel paging request at 00100104
      [126167.230699] IP: [<f8c2ce44>] i915_gem_retire_requests_ring+0xd4/0x240 [i915]
      [126167.231042] *pdpt = 00000000314c1001 *pde = 0000000000000000
      [126167.231314] Oops: 0002 [#1] SMP
      [126167.231471] last sysfs file: /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT1/current_now
      [126167.231901] Modules linked in: snd_seq_dummy nls_utf8 isofs btrfs zlib_deflate libcrc32c ufs qnx4 hfsplus hfs minix ntfs vfat msdos fat jfs xfs exportfs reiserfs cryptd aes_i586 aes_generic binfmt_misc vboxnetadp vboxnetflt vboxdrv parport_pc ppdev snd_hda_codec_hdmi snd_hda_codec_conexant snd_hda_intel snd_hda_codec snd_hwdep arc4 snd_pcm snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq uvcvideo videodev snd_timer snd_seq_device joydev iwlagn iwlcore mac80211 snd cfg80211 soundcore i915 drm_kms_helper snd_page_alloc psmouse drm serio_raw i2c_algo_bit video lp parport usbhid hid sky2 sdhci_pci ahci sdhci libahci
      [126167.232018]
      [126167.232018] Pid: 1101, comm: Xorg Not tainted 2.6.38-6-generic-pae #34-Ubuntu Gateway                          MC7833U /
      [126167.232018] EIP: 0060:[<f8c2ce44>] EFLAGS: 00213246 CPU: 0
      [126167.232018] EIP is at i915_gem_retire_requests_ring+0xd4/0x240 [i915]
      [126167.232018] EAX: 00200200 EBX: f1ac25b0 ECX: 00000040 EDX: 00100100
      [126167.232018] ESI: f1a2801c EDI: e87fc060 EBP: ef4d7dd8 ESP: ef4d7db0
      [126167.232018]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
      [126167.232018] Process Xorg (pid: 1101, ti=ef4d6000 task=f1ba6500 task.ti=ef4d6000)
      [126167.232018] Stack:
      [126167.232018]  f1a28000 f1a2809c f1a28094 0058bd97 f1aa2400 f1a2801c 0058bd7b 0058bd85
      [126167.232018]  f1a2801c f1a28000 ef4d7e38 f8c2e995 ef4d7e30 ef4d7e60 c14d1ebc f6b3a040
      [126167.232018]  f1522cc0 000000db 00000000 f1ba6500 ffffffa1 00000000 00000001 f1a29214
      [126167.232018] Call Trace:
      
      Unfortunately the call trace reported was cut, but looking at debug
      symbols the crash is at __list_del, when probably list_del is called
      twice on the same request->client_list, as the dereferenced value is
      LIST_POISON1 + 4, and by looking more at the debug symbols before
      list_del call it should have being called by
      i915_gem_request_remove_from_client
      
      And as I can see in the code, it seems we indeed have the possibility
      to remove a request->client_list twice, which would cause the above,
      because we do list_del(&request->client_list) on both
      i915_gem_request_remove_from_client and i915_gem_release
      
      As Chris Wilson pointed out, it's indeed the case:
      "(...) I had thought that the actual insertion/deletion was serialised
      under the struct mutex and the intention of the spinlock was to protect
      the unlocked list traversal during throttling. However, I missed that
      i915_gem_release() is also called without struct mutex and so we do need
      the double check for i915_gem_request_remove_from_client()."
      
      This change does the required check to avoid the duplicate remove of
      request->client_list.
      
      Bugzilla: http://bugs.launchpad.net/bugs/733780
      Cc: stable@kernel.org # 2.6.38
      Signed-off-by: NHerton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      09bfa517
  2. 07 3月, 2011 1 次提交
  3. 22 2月, 2011 2 次提交
    • C
      drm/i915: Use a device flag for non-interruptible phases · ce453d81
      Chris Wilson 提交于
      The code paths for modesetting are growing in complexity as we may need
      to move the buffers around in order to fit the scanout in the aperture.
      Therefore we face a choice as to whether to thread the interruptible status
      through the entire pinning and unbinding code paths or to add a flag to
      the device when we may not be interrupted by a signal. This does the
      latter and so fixes a few instances of modesetting failures under stress.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      ce453d81
    • C
      drm/i915: Protect against drm_gem_object not being the first member · c8725226
      Chris Wilson 提交于
      Dave Airlie spotted that we had a potential bug should we ever rearrange
      the drm_i915_gem_object so not the base drm_gem_object was not its first
      member. He noticed that we often convert the return of
      drm_gem_object_lookup() immediately into drm_i915_gem_object and then
      check the result for nullity. This is only valid when the base object is
      the first member and so the superobject has the same address. Play safe
      instead and use the compiler to convert back to the original return
      address for sanity testing.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      c8725226
  4. 12 2月, 2011 1 次提交
  5. 07 2月, 2011 4 次提交
  6. 27 1月, 2011 2 次提交
  7. 25 1月, 2011 2 次提交
  8. 23 1月, 2011 1 次提交
  9. 12 1月, 2011 5 次提交
  10. 20 12月, 2010 1 次提交
  11. 14 12月, 2010 2 次提交
  12. 07 12月, 2010 1 次提交
  13. 06 12月, 2010 3 次提交
  14. 05 12月, 2010 1 次提交
  15. 02 12月, 2010 4 次提交
    • C
      drm/i915: Kill the get_fence tracepoint · 60de2ba5
      Chris Wilson 提交于
      As the tracepoint is now decoupled from when the actual register is
      assigned and was never complemented by detailing when the object lost
      its fence, it has outlived its limited usefulness. Profiling the actual
      stalls is a far more profitable venture anyway.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      60de2ba5
    • C
      drm/i915: Remove inactive LRU tracking from set_domain_ioctl · c6748e09
      Chris Wilson 提交于
      As the userspace mappings are torn down on every GPU write, we prefer to
      track when the buffer is activated (via a fresh i915_gem_fault). This
      makes the LRU conceptually simpler. With coherent mappings, the
      remaining use-case for set_domain_ioctl is GPU synchronisation.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      c6748e09
    • C
      drm/i915: Pipelined fencing [infrastructure] · d9e86c0e
      Chris Wilson 提交于
      With this change, every batchbuffer can use all available fences (save
      pinned and scanout, of course) without ever stalling the gpu!
      
      In theory. Currently the actual pipelined update of the register is
      disabled due to some stability issues. However, just the deferred update
      is a significant win.
      
      Based on a series of patches by Daniel Vetter.
      
      The premise is that before every access to a buffer through the GTT we
      have to declare whether we need a register or not. If the access is by
      the GPU, a pipelined update to the register is made via the ringbuffer,
      and we track the last seqno of the batches that access it. If by the
      CPU we wait for the last GPU access and update the register (either
      to clear or to set it for the current buffer).
      
      One advantage of being able to pipeline changes is that we can defer the
      actual updating of the fence register until we first need to access the
      object through the GTT, i.e. we can eliminate the stall on set_tiling.
      This is important as the userspace bo cache does not track the tiling
      status of active buffers which generate frequent stalls on gen3 when
      enabling tiling for an already bound buffer.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d9e86c0e
    • C
  16. 29 11月, 2010 1 次提交
  17. 28 11月, 2010 1 次提交
  18. 26 11月, 2010 2 次提交
  19. 25 11月, 2010 4 次提交
  20. 24 11月, 2010 1 次提交