1. 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
  2. 29 11月, 2010 1 次提交
  3. 28 11月, 2010 1 次提交
  4. 26 11月, 2010 2 次提交
  5. 25 11月, 2010 4 次提交
  6. 24 11月, 2010 12 次提交
  7. 21 11月, 2010 1 次提交
  8. 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
  9. 15 11月, 2010 1 次提交
  10. 13 11月, 2010 1 次提交
  11. 11 11月, 2010 1 次提交
  12. 09 11月, 2010 1 次提交
  13. 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
  14. 07 11月, 2010 1 次提交
  15. 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
  16. 03 11月, 2010 1 次提交
  17. 01 11月, 2010 3 次提交
  18. 31 10月, 2010 2 次提交
  19. 29 10月, 2010 1 次提交