1. 24 11月, 2010 11 次提交
  2. 21 11月, 2010 1 次提交
  3. 19 11月, 2010 1 次提交
    • C
      drm/i915: Do not hold mutex when faulting in user addresses · 51311d0a
      Chris Wilson 提交于
      Linus Torvalds found that it was rather trivial to trigger a system
      freeze:
      
        In fact, with lockdep, I don't even need to do the sysrq-d thing: it
        shows the bug as it happens. It's the X server taking the same lock
        recursively.
      
        Here's the problem:
      
          =============================================
          [ INFO: possible recursive locking detected ]
          2.6.37-rc2-00012-gbdbd01ac #7
          ---------------------------------------------
          Xorg/2816 is trying to acquire lock:
           (&dev->struct_mutex){+.+.+.}, at: [<ffffffff812c626c>] i915_gem_fault+0x50/0x17e
      
          but task is already holding lock:
           (&dev->struct_mutex){+.+.+.}, at: [<ffffffff812c403b>] i915_mutex_lock_interruptible+0x28/0x4a
      
          other info that might help us debug this:
          2 locks held by Xorg/2816:
           #0:  (&dev->struct_mutex){+.+.+.}, at: [<ffffffff812c403b>] i915_mutex_lock_interruptible+0x28/0x4a
           #1:  (&mm->mmap_sem){++++++}, at: [<ffffffff81022d4f>] page_fault+0x156/0x37b
      
      This recursion was introduced by rearranging the locking to avoid the
      double locking on the fast path (4f27b5d and fbd5a26d) and the
      introduction of the prefault to encourage the fast paths (b5e4f2b). In
      order to undo the problem, we rearrange the code to perform the access
      validation upfront, attempt to prefault and then fight for control of the
      mutex.  the best case scenario where the mutex is uncontended the
      prefaulting is not wasted.
      Reported-and-tested-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      51311d0a
  4. 15 11月, 2010 1 次提交
  5. 13 11月, 2010 1 次提交
  6. 11 11月, 2010 1 次提交
  7. 09 11月, 2010 1 次提交
  8. 08 11月, 2010 1 次提交
    • C
      drm/i915: Avoid might_fault during pwrite whilst holding our mutex · b47b30cc
      Chris Wilson 提交于
      ... and so prevent a potential circular reference:
      
        [ INFO: possible circular locking dependency detected ]
        2.6.37-rc1-uwe1+ #4
        -------------------------------------------------------
        Xorg/1401 is trying to acquire lock:
         (&mm->mmap_sem){++++++}, at: [<c01e4ddb>] might_fault+0x4b/0xa0
      
        but task is already holding lock:
         (&dev->struct_mutex){+.+.+.}, at: [<f869c3ac>]
        i915_mutex_lock_interruptible+0x3c/0x60 [i915]
      
        which lock already depends on the new lock.
      
      When the locking around the pwrite ioctl was simplified, I did not spot
      that the phys path never took any locks and so we introduced this
      potential circular reference.
      Reported-by: NUwe Helm <uwe.helm@googlemail.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      b47b30cc
  9. 07 11月, 2010 1 次提交
  10. 05 11月, 2010 1 次提交
    • D
      drm/i915: kill mappable/fenceable disdinction · 75e9e915
      Daniel Vetter 提交于
      a00b10c3 "Only enforce fence limits inside the GTT" also
      added a fenceable/mappable disdinction when binding/pinning buffers.
      This only complicates the code with no pratical gain:
      
      - In execbuffer this matters on for g33/pineview, as this is the only
        chip that needs fences and has an unmappable gtt area. But fences
        are only possible in the mappable part of the gtt, so need_fence
        implies need_mappable. And need_mappable is only set independantly
        with relocations which implies (for sane userspace) that the buffer
        is untiled.
      
      - The overlay code is only really used on i8xx, which doesn't have
        unmappable gtt. And it doesn't support tiled buffers, currently.
      
      - For all other buffers it's a bug to pass in a tiled bo.
      
      In short, this disdinction doesn't have any practical gain.
      
      I've also reverted mapping the overlay and context pages as possibly
      unmappable. It's not worth being overtly clever here, all the big
      gains from unmappable are for execbuf bos.
      
      Also add a comment for a clever optimization that confused me
      while reading the original patch by Chris Wilson.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      75e9e915
  11. 03 11月, 2010 1 次提交
  12. 01 11月, 2010 3 次提交
  13. 31 10月, 2010 2 次提交
  14. 29 10月, 2010 9 次提交
  15. 28 10月, 2010 5 次提交