1. 14 12月, 2012 1 次提交
  2. 29 11月, 2012 1 次提交
    • B
      drm/i915: Fix pte updates in ggtt clear range · 2ff4aeac
      Ben Widawsky 提交于
      This bug was introduced by me:
      commit e76e9aeb
      Author: Ben Widawsky <ben@bwidawsk.net>
      Date:   Sun Nov 4 09:21:27 2012 -0800
      
          drm/i915: Stop using AGP layer for GEN6+
      
      The existing code uses memset_io which follows memset semantics in only
      guaranteeing a write of individual bytes. Since a PTE entry is 4 bytes,
      this can only be correct if the scratch page address is 0.
      
      This caused unsightly errors when we clear the range at load time,
      though I'm not really sure what the heck is referencing that memory
      anyway. I caught this is because I believe we have some other bug where
      the display is doing reads of memory we feel should be cleared (or we
      are relying on scratch pages to be a specific value).
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2ff4aeac
  3. 22 11月, 2012 1 次提交
  4. 13 11月, 2012 1 次提交
  5. 12 11月, 2012 10 次提交
  6. 03 10月, 2012 2 次提交
  7. 20 9月, 2012 2 次提交
    • C
      drm/i915: Convert the dmabuf object to use the new i915_gem_object_ops · 2f745ad3
      Chris Wilson 提交于
      By providing a callback for when we need to bind the pages, and then
      release them again later, we can shorten the amount of time we hold the
      foreign pages mapped and pinned, and importantly the dmabuf objects then
      behave as any other normal object with respect to the shrinker and
      memory management.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2f745ad3
    • C
      drm/i915: Replace the array of pages with a scatterlist · 9da3da66
      Chris Wilson 提交于
      Rather than have multiple data structures for describing our page layout
      in conjunction with the array of pages, we can migrate all users over to
      a scatterlist.
      
      One major advantage, other than unifying the page tracking structures,
      this offers is that we replace the vmalloc'ed array (which can be up to
      a megabyte in size) with a chain of individual pages which helps reduce
      memory pressure.
      
      The disadvantage is that we then do not have a simple array to iterate,
      or to access randomly. The common case for this is in the relocation
      processing, which will typically fit within a single scatterlist page
      and so be almost the same cost as the simple array. For iterating over
      the array, the extra function call could be optimised away, but in
      reality is an insignificant cost of either binding the pages, or
      performing the pwrite/pread.
      
      v2: Fix drm_clflush_sg() to not invoke wbinvd as well! And fix the
      trivial compile error from rebasing.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      9da3da66
  8. 24 8月, 2012 1 次提交
  9. 21 8月, 2012 1 次提交
    • C
      drm/i915: Track unbound pages · 6c085a72
      Chris Wilson 提交于
      When dealing with a working set larger than the GATT, or even the
      mappable aperture when touching through the GTT, we end up with evicting
      objects only to rebind them at a new offset again later. Moving an
      object into and out of the GTT requires clflushing the pages, thus
      causing a double-clflush penalty for rebinding.
      
      To avoid having to clflush on rebinding, we can track the pages as they
      are evicted from the GTT and only relinquish those pages on memory
      pressure.
      
      As usual, if it were not for the handling of out-of-memory condition and
      having to manually shrink our own bo caches, it would be a net reduction
      of code. Alas.
      
      Note: The patch also contains a few changes to the last-hope
      evict_everything logic in i916_gem_execbuffer.c - we no longer try to
      only evict the purgeable stuff in a first try (since that's superflous
      and only helps in OOM corner-cases, not fragmented-gtt trashing
      situations).
      
      Also, the extraction of the get_pages retry loop from bind_to_gtt (and
      other callsites) to get_pages should imo have been a separate patch.
      
      v2: Ditch the newly added put_pages (for unbound objects only) in
      i915_gem_reset. A quick irc discussion hasn't revealed any important
      reason for this, so if we need this, I'd like to have a git blame'able
      explanation for it.
      
      v3: Undo the s/drm_malloc_ab/kmalloc/ in get_pages that Chris noticed.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      [danvet: Split out code movements and rant a bit in the commit message
      with a few Notes. Done v2]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6c085a72
  10. 17 8月, 2012 1 次提交
  11. 06 8月, 2012 1 次提交
  12. 26 7月, 2012 1 次提交
    • C
      drm/i915: Segregate memory domains in the GTT using coloring · 42d6ab48
      Chris Wilson 提交于
      Several functions of the GPU have the restriction that differing memory
      domains cannot be placed next to each other (as the GPU may prefetch
      beyond the end of one domain and hang as it crosses into the other
      domain). We use the facility of the drm_mm to mark ranges with a
      particular color that corresponds to the cache attributes of those pages
      in order to prevent allocating adjacent blocks of differing memory
      types.
      
      v2: Rebase ontop of drm_mm coloring v2.
      v3: Fix rebinding existing gtt_space and add a verification routine.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      42d6ab48
  13. 23 5月, 2012 1 次提交
    • D
      i915: add dmabuf/prime buffer sharing support. · 1286ff73
      Daniel Vetter 提交于
      This adds handle->fd and fd->handle support to i915, this is to allow
      for offloading of rendering in one direction and outputs in the other.
      
      v2 from Daniel Vetter:
      - fixup conflicts with the prepare/finish gtt prep work.
      - implement ppgtt binding support.
      
      Note that we have squat i-g-t testcoverage for any of the lifetime and
      access rules dma_buf/prime support brings along. And there are quite a
      few intricate situations here.
      
      Also note that the integration with the existing code is a bit
      hackish, especially around get_gtt_pages and put_gtt_pages. It imo
      would be easier with the prep code from Chris Wilson's unbound series,
      but that is for 3.6.
      
      Also note that I didn't bother to put the new prepare/finish gtt hooks
      to good use by moving the dma_buf_map/unmap_attachment calls in there
      (like we've originally planned for).
      
      Last but not least this patch is only compile-tested, but I've changed
      very little compared to Dave Airlie's version. So there's a decent
      chance v2 on drm-next works as well as v1 on 3.4-rc.
      
      v3: Right when I've hit sent I've noticed that I've screwed up one
      obj->sg_list (for dmar support) and obj->sg_table (for prime support)
      disdinction. We should be able to merge these 2 paths, but that's
      material for another patch.
      
      v4: fix the error reporting bugs pointed out by ickle.
      
      v5: fix another error, and stop non-gtt mmaps on shared objects
      stop pread/pwrite on imported objects, add fake kmap
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1286ff73
  14. 03 5月, 2012 1 次提交
    • B
      drm/i915: remove do_retire from i915_wait_request · b2da9fe5
      Ben Widawsky 提交于
      This originates from a hack by me to quickly fix a bug in an earlier
      patch where we needed control over whether or not waiting on a seqno
      actually did any retire list processing. Since the two operations aren't
      clearly related, we should pull the parameter out of the wait function,
      and make the caller responsible for retiring if the action is desired.
      
      The only function call site which did not get an explicit retire_request call
      (on purpose) is i915_gem_inactive_shrink(). That code was already calling
      retire_request a second time.
      
      v2: don't modify any behavior excepit i915_gem_inactive_shrink(Daniel)
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b2da9fe5
  15. 13 4月, 2012 1 次提交
  16. 01 4月, 2012 1 次提交
  17. 27 3月, 2012 2 次提交
  18. 21 3月, 2012 2 次提交
    • D
      drm/i915: bind objects to the global gtt only when needed · 74898d7e
      Daniel Vetter 提交于
      And track the existence of such a binding similar to the aliasing
      ppgtt case. Speeds up binding/unbinding in the common case where we
      only need a ppgtt binding (which is accessed in a cpu coherent fashion
      by the gpu) and no gloabl gtt binding (which needs uc writes for the
      ptes).
      
      This patch just puts the required tracking in place.
      
      v2: Check that global gtt mappings exist in the error_state capture
      code (with Chris Wilson's llc reloc patches batchbuffers are no longer
      relocated as mappable in all situations, so this matters). Suggested
      by Chris Wilson.
      
      v3: Adapted to Chris' latest llc-reloc patches.
      
      v4: Fix a bug in the i915 error state capture code noticed by Chris
      Wilson.
      Reviewed-and-tested-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      74898d7e
    • D
      drm/i915: split out dma mapping from global gtt bind/unbind functions · 74163907
      Daniel Vetter 提交于
      Note that there's a functional change buried in this patch wrt the ilk
      dmar workaround: We now only idle the gpu while tearing down the dmar
      mappings, not while clearing the gtt. Keeping the current semantics
      would have made for some really ugly code and afaik the issue is only
      with the dmar unmapping that needs a fully idle gpu.
      Reviewed-and-tested-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      74163907
  19. 10 2月, 2012 2 次提交
  20. 26 1月, 2012 2 次提交
  21. 21 10月, 2011 1 次提交
  22. 10 6月, 2011 2 次提交
  23. 11 5月, 2011 1 次提交
  24. 25 1月, 2011 1 次提交