1. 23 9月, 2015 1 次提交
  2. 14 9月, 2015 1 次提交
    • V
      drm/i915: Set stolen reserved to 0 for pre-g4x platforms · d7884d69
      Ville Syrjälä 提交于
      This stolen reserved stuff was introduced on g4x, so no need to waste
      stolen on older platforms. Unfortunately configdb is no more so I can't
      look up the right way to detect this stuff. I do have one hint as to
      where the register might be on ctg, but I don't have a ctg to test it,
      and on the elk I have here it doesn't contain sensible looking data.
      For ilk grits suggegsts it might be in the same place as on snb (the
      original PCI reg, not the mirror) but I can't be entirely sure about it
      The register shows a round zero on my ilk.
      
      So when there's no really good data for any of these platforms leave the
      current "assume 1MiB" approach in place.
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Acked-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d7884d69
  3. 26 8月, 2015 1 次提交
  4. 14 8月, 2015 1 次提交
    • P
      drm/i915: fix stolen bios_reserved checks · 3774eb50
      Paulo Zanoni 提交于
      I started digging this when I noticed that the BDW code was just
      reserving 1mb by coincidence since it was reading reserved fields.
      Then I noticed we didn't have any values set for SNB and earlier, and
      that the HSW sizes were wrong. After that, I noticed that the reserved
      area has a specific start, and may not exactly end where the stolen
      memory ends. I also noticed the base pointer can be zero. So I decided
      to just write a single patch fixing everything instead of 20 patches
      that would be much harder to review.
      
      This patch may solve random stolen memory corruption/problems on
      almost all platforms. Notice that since this is always dealing with
      the top of the stolen memory, the problems are not so easy to
      reproduce - especially since FBC is still disabled by default.
      
      One of the major differences of this patch is that we now look at both
      the size and base address. By only looking at the size we were
      assuming that the reserved area was always at the very top of
      stolen, which is not always true.
      
      After we merge the patch series that allows user space to allocate
      stolen memory we'll be able to write IGT tests that maybe catch the
      bugs fixed by this patch.
      
      v2:
        - s/BIOS reserved/stolen reserved/g (Chris)
        - Don't DRM_ERROR if we can't do anything about it (Chris)
        - Improve debug messages (Chris).
        - Use the gen7 version instead of gen6 on HSW. Tom found some
          documentation problems, so I think with gen7 we're on the safer
          side (Tom).
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3774eb50
  5. 14 7月, 2015 1 次提交
  6. 06 7月, 2015 3 次提交
  7. 09 4月, 2015 1 次提交
  8. 24 2月, 2015 2 次提交
  9. 14 2月, 2015 1 次提交
  10. 10 12月, 2014 1 次提交
  11. 04 11月, 2014 1 次提交
  12. 19 9月, 2014 1 次提交
  13. 09 7月, 2014 1 次提交
  14. 03 7月, 2014 3 次提交
  15. 13 6月, 2014 1 次提交
  16. 31 3月, 2014 1 次提交
  17. 19 3月, 2014 1 次提交
  18. 03 3月, 2014 1 次提交
  19. 28 1月, 2014 1 次提交
  20. 18 12月, 2013 1 次提交
  21. 05 9月, 2013 1 次提交
  22. 04 9月, 2013 1 次提交
    • D
      drm/i915: inline vma_create into lookup_or_create_vma · e656a6cb
      Daniel Vetter 提交于
      In the execbuf code we don't clean up any vmas which ended up not
      getting bound for code simplicity. To make sure that we don't end up
      creating multiple vma for the same vm kill the somewhat dangerous
      vma_create function and inline it into lookup_or_create.
      
      This is just a safety measure to prevent surprises in the future.
      
      Also update the somewhat confused comment in the execbuf code and
      clarify what kind of magic is going on with a new one.
      
      v2: Keep the function separate as requested by Chris. But give it a __
      prefix for paranoia and move it tighter together with the other vma
      stuff.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Ben Widawsky <ben@bwidawsk.net>
      Acked-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e656a6cb
  23. 22 8月, 2013 1 次提交
  24. 10 8月, 2013 1 次提交
  25. 08 8月, 2013 1 次提交
    • B
      drm/i915: mm_list is per VMA · ca191b13
      Ben Widawsky 提交于
      formerly: "drm/i915: Create VMAs (part 5) - move mm_list"
      
      The mm_list is used for the active/inactive LRUs. Since those LRUs are
      per address space, the link should be per VMx .
      
      Because we'll only ever have 1 VMA before this point, it's not incorrect
      to defer this change until this point in the patch series, and doing it
      here makes the change much easier to understand.
      
      Shamelessly manipulated out of Daniel:
      "active/inactive stuff is used by eviction when we run out of address
      space, so needs to be per-vma and per-address space. Bound/unbound otoh
      is used by the shrinker which only cares about the amount of memory used
      and not one bit about in which address space this memory is all used in.
      Of course to actual kick out an object we need to unbind it from every
      address space, but for that we have the per-object list of vmas."
      
      v2: only bump GGTT LRU in i915_gem_object_set_to_gtt_domain (Chris)
      
      v3: Moved earlier in the series
      
      v4: Add dropped message from v3
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      [danvet: Frob patch to apply and use vma->node.size directly as
      discused with Ben. Also drop a needles BUG_ON before move_to_inactive,
      the function itself has the same check.]
      [danvet 2nd: Rebase on top of the lost "drm/i915: Cleanup more of VMA
      in destroy", specifically unlink the vma from the mm_list in
      vma_unbind (to keep it symmetric with bind_to_vm) instead of
      vma_destroy.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ca191b13
  26. 07 8月, 2013 2 次提交
  27. 06 8月, 2013 1 次提交
  28. 24 7月, 2013 1 次提交
  29. 23 7月, 2013 1 次提交
  30. 19 7月, 2013 1 次提交
  31. 18 7月, 2013 4 次提交
    • B
      drm/i915: Create VMAs · 2f633156
      Ben Widawsky 提交于
      Formerly: "drm/i915: Create VMAs (part 1)"
      
      In a previous patch, the notion of a VM was introduced. A VMA describes
      an area of part of the VM address space. A VMA is similar to the concept
      in the linux mm. However, instead of representing regular memory, a VMA
      is backed by a GEM BO. There may be many VMAs for a given object, one
      for each VM the object is to be used in. This may occur through flink,
      dma-buf, or a number of other transient states.
      
      Currently the code depends on only 1 VMA per object, for the global GTT
      (and aliasing PPGTT). The following patches will address this and make
      the rest of the infrastructure more suited
      
      v2: s/i915_obj/i915_gem_obj (Chris)
      
      v3: Only move an object to the now global unbound list if there are no
      more VMAs for the object which are bound into a VM (ie. the list is
      empty).
      
      v4: killed obj->gtt_space
      some reworks due to rebase
      
      v5: Free vma on error path (Imre)
      
      v6: Another missed vma free in i915_gem_object_bind_to_gtt error path
      (Imre)
      Fixed vma freeing in stolen preallocation (Imre)
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      [danvet: Squash in fixup from Ben to not deref a non-existing vma in
      set_cache_level, reported by Chris.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2f633156
    • B
      drm/i915: Free stolen node on failed preallocation · f7f18184
      Ben Widawsky 提交于
      The odds of this happening are *extremely* unlikely.
      Reported-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f7f18184
    • B
      drm/i915: Move active/inactive lists to new mm · 5cef07e1
      Ben Widawsky 提交于
      Shamelessly manipulated out of Daniel :-)
      "When moving the lists around explain that the active/inactive stuff is
      used by eviction when we run out of address space, so needs to be
      per-vma and per-address space. Bound/unbound otoh is used by the
      shrinker which only cares about the amount of memory used and not one
      bit about in which address space this memory is all used in. Of course
      to actual kick out an object we need to unbind it from every address
      space, but for that we have the per-object list of vmas."
      
      v2: Leave the bound list as a global one. (Chris, indirectly)
      
      v3: Rebased with no i915_gtt_vm. In most places I added a new *vm local,
      since it will eventually be replaces by a vm argument.
      Put comment back inline, since it no longer makes sense to do otherwise.
      
      v4: Rebased on hangcheck/error state movement
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5cef07e1
    • B
      drm/i915: Put the mm in the parent address space · 93bd8649
      Ben Widawsky 提交于
      Every address space should support object allocation. It therefore makes
      sense to have the allocator be part of the "superclass" which GGTT and
      PPGTT will derive.
      
      Since our maximum address space size is only 2GB we're not yet able to
      avoid doing allocation/eviction; but we'd hope one day this becomes
      almost irrelvant.
      
      v2: Rebased
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      93bd8649