1. 05 8月, 2016 3 次提交
  2. 04 8月, 2016 3 次提交
  3. 20 7月, 2016 3 次提交
  4. 04 7月, 2016 1 次提交
  5. 17 5月, 2016 1 次提交
  6. 11 5月, 2016 1 次提交
  7. 04 5月, 2016 1 次提交
  8. 18 11月, 2015 1 次提交
  9. 30 7月, 2015 1 次提交
    • C
      drm/i915: Declare the swizzling unknown for L-shaped configurations · 5eb3e5a5
      Chris Wilson 提交于
      The old style of memory interleaving swizzled upto the end of the
      first even bank of memory, and then used the remainder as unswizzled on
      the unpaired bank - i.e. swizzling is not constant for all memory. This
      causes problems when we try to migrate memory and so the kernel prevents
      migration at all when we detect L-shaped inconsistent swizzling.
      However, this issue also extends to userspace who try to manually detile
      into memory as the swizzling for an individual page is unknown (it
      depends on its physical address only known to the kernel), userspace
      cannot correctly swizzle.
      
      Note that this is a new attempt for the previously merged one,
      reverted in
      
      commit d82c0ba6
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Tue Jul 14 12:29:27 2015 +0200
      
          Revert "drm/i915: Declare the swizzling unknown for L-shaped configurations"
      
      This is cc: stable since we need it to fix up troubles with wc cpu
      mmaps that userspace recently started to use widely.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91105Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: stable@vger.kernel.org
      [danvet: Add note about previous (failed attempt).]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5eb3e5a5
  10. 27 7月, 2015 2 次提交
  11. 14 7月, 2015 1 次提交
  12. 09 7月, 2015 1 次提交
    • C
      drm/i915: Declare the swizzling unknown for L-shaped configurations · 19ee835c
      Chris Wilson 提交于
      The old style of memory interleaving swizzled upto the end of the
      first even bank of memory, and then used the remainder as unswizzled on
      the unpaired bank - i.e. swizzling is not constant for all memory. This
      causes problems when we try to migrate memory and so the kernel prevents
      migration at all when we detect L-shaped inconsistent swizzling.
      However, this issue also extends to userspace who try to manually detile
      into memory as the swizzling for an individual page is unknown (it
      depends on its physical address only known to the kernel), userspace
      cannot correctly swizzle objects.
      
      v2: Mark the global swizzling as unknown rather than adjust the value
      reported to userspace.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91105Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      19ee835c
  13. 16 4月, 2015 1 次提交
  14. 24 2月, 2015 1 次提交
  15. 03 12月, 2014 1 次提交
  16. 20 11月, 2014 1 次提交
  17. 11 11月, 2014 1 次提交
    • C
      drm/i915: Fix obj->map_and_fenceable across tiling changes · e9d784d5
      Chris Wilson 提交于
      As obj->map_and_fenceable computation has changed to only be set when
      the object is bound inside the global GTT (and is suitable aligned to a
      fence region) we need to accommodate those changes when the tiling is
      adjusted. The easiest solution is to unbind from the global GTT if we
      are currently fenceable, but will not be after the tiling change.
      
      The bug has been exposed by
      
      commit f8fcadba218fe6d23b2e353fea1cf0a4be4c9454
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Fri Oct 31 13:53:52 2014 +0000
      
          drm/i915: Only mark as map-and-fenceable when bound into the GGTT
      
      which tried to fix an oversight from
      
      commit e6a84468
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Mon Aug 11 12:00:12 2014 +0200
      
          drm/i915: Force CPU relocations if not GTT mapped
      
      which changed the handling of obj->map_and_fenceable.
      
      Note that the alignment check is a vestige from our attempts to reduce
      the alignment requirements of tiled but unfenced buffers on
      gen2/3. Also, that was when unbinding from the GTT meant UC writes and
      clflushing, so we went to great pains to avoid such.
      
      That leaves the actual bug of setting map_and_fenceable to true if we're
      not bound to ggtt, which violates the change introduced in the above
      patch. Unbinding in that case really looks like the simplest and safest
      option, we have to do it anyway.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85896
      Testcase: igt/gem_concurrent_blit/gttX*
      Tested-by: huax.lu@intel.com
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Tested-by: NValtteri Rantala <valtteri.rantala@intel.com>
      [Jani: amend commit message per input from Daniel and bisect result from
      Valtteri]
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      e9d784d5
  18. 08 11月, 2014 1 次提交
  19. 24 10月, 2014 1 次提交
    • J
      drm/i915: preserve swizzle settings if necessary v4 · d9ceb816
      Jesse Barnes 提交于
      Some machines (like MBAs) might use a tiled framebuffer but not enable
      display swizzling at boot time.  We want to preserve that configuration
      if possible to prevent a boot time mode set.  On IVB+ it shouldn't
      affect performance anyway since the memory controller does internal
      swizzling anyway.
      
      For most other configs we'll be able to enable swizzling at boot time,
      since the initial framebuffer won't be tiled, thus we won't see any
      corruption when we enable it.
      
      v2: preserve swizzling if BIOS had it set (Daniel)
      v3: preserve swizzling only if we inherited a tiled framebuffer (Daniel)
          check display swizzle setting in detect_bit_6_swizzle (Daniel)
          use gen6 as cutoff point (Daniel)
      v4: fixup swizzle preserve again, had wrong init order (Daniel)
      Reported-by: NKristian Høgsberg <hoegsberg@gmail.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d9ceb816
  20. 03 9月, 2014 1 次提交
    • D
      drm/i915/bdw: Let the memory controller do all the swizzling · be292e15
      Damien Lespiau 提交于
      Previously, it was possible for the GPU memory accesses to be swizzled
      to try to optimize the fetches for tiled buffers. This swizzling was on
      top of what the memory controller in the uncore already does.
      
      With broadwell, we drop that GPU side swizzling, and the corresponding
      initialization in 3 units (GAM, GT, DE). All those bits are reserved, as
      specs put it:
      
        Before Gen8, there was a historical configuration control field to
        swizzle address bit[6] for in X/Y tiling modes. This was set in three
        different places: TILECTL[1:0], ARB_MODE[5:4], and
        DISP_ARB_CTL[14:13]"
      
        For Gen8 the swizzle fields are all reserved, and the CPU's memory
        controller performs all address swizzling modifications.
      
      This also means that user space doesn't have to manually swizzle when
      accessing tiled buffers from the CPU, and so we always return
      I915_BIT_6_SWIZZLE_NONE from i915_gem_detect_bit_6_swizzle(), which
      short-circuits the initialization of the registers mentionned above in
      i915_gem_init_swizzling().
      
      v2: Refine the explanation a bit more (Daniel)
      v3: Make it BDW+ specific (Steve)
      
      Cc: Steve Aarnio <steve.j.aarnio@linux.intel.com>
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      [danvet: Keep the actual code to set the tiling bits for now, in case
      some bios escaped to the wild that uses this - we'd need it for
      fastboot.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      be292e15
  21. 11 8月, 2014 1 次提交
  22. 31 3月, 2014 1 次提交
  23. 18 12月, 2013 1 次提交
  24. 17 10月, 2013 1 次提交
    • D
      drm/i915: prevent tiling changes on framebuffer backing storage · 80075d49
      Daniel Vetter 提交于
      Assuming that all framebuffer related metadata is invariant simplifies
      our userspace input data checking. And current userspace always first
      updates the tiling of an object before creating a framebuffer with it.
      
      This allows us to upconvert a check in pin_and_fence to a WARN.
      
      In the future it should also be helpful to know which buffer objects
      are potential scanout targets for e.g. frontbuffer rendering tracking
      and similar things.
      
      Note that SNA shipped for one prerelease with code which will be
      broken through this patch. But users shouldn't notice since it's
      purely an optimization and will transparently fall back to allocating
      a new fb. i-g-t also had offending code (now fixed), but we don't
      really care about breaking the test-suite.
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Grumpily-reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      80075d49
  25. 01 10月, 2013 1 次提交
    • D
      drm/i915: Use kcalloc more · a1e22653
      Daniel Vetter 提交于
      No buffer overflows here, but better safe than sorry.
      
      v2:
      - Fixup the sizeof conversion, I've missed the pointer deref (Jani).
      - Drop the redundant GFP_ZERO, kcalloc alreads memsets (Jani).
      - Use kmalloc_array for the execbuf fastpath to avoid the memset
        (Chris). I've opted to leave all other conversions as-is since they
        aren't in a fastpath and dealing with cleared memory instead of
        random garbage is just generally nicer.
      
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      [danvet: Drop the contentious kmalloc_array hunk in execbuf.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a1e22653
  26. 08 8月, 2013 1 次提交
    • B
      drm/i915: plumb VM into bind/unbind code · 07fe0b12
      Ben Widawsky 提交于
      As alluded to in several patches, and it will be reiterated later... A
      VMA is an abstraction for a GEM BO bound into an address space.
      Therefore it stands to reason, that the existing bind, and unbind are
      the ones which will be the most impacted. This patch implements this,
      and updates all callers which weren't already updated in the series
      (because it was too messy).
      
      This patch represents the bulk of an earlier, larger patch. I've pulled
      out a bunch of things by the request of Daniel. The history is preserved
      for posterity with the email convention of ">" One big change from the
      original patch aside from a bunch of cropping is I've created an
      i915_vma_unbind() function. That is because we always have the VMA
      anyway, and doing an extra lookup is useful. There is a caveat, we
      retain an i915_gem_object_ggtt_unbind, for the global cases which might
      not talk in VMAs.
      
      > drm/i915: plumb VM into object operations
      >
      > This patch was formerly known as:
      > "drm/i915: Create VMAs (part 3) - plumbing"
      >
      > This patch adds a VM argument, bind/unbind, and the object
      > offset/size/color getters/setters. It preserves the old ggtt helper
      > functions because things still need, and will continue to need them.
      >
      > Some code will still need to be ported over after this.
      >
      > v2: Fix purge to pick an object and unbind all vmas
      > This was doable because of the global bound list change.
      >
      > v3: With the commit to actually pin/unpin pages in place, there is no
      > longer a need to check if unbind succeeded before calling put_pages().
      > Make put_pages only BUG() after checking pin count.
      >
      > v4: Rebased on top of the new hangcheck work by Mika
      > plumbed eb_destroy also
      > Many checkpatch related fixes
      >
      > v5: Very large rebase
      >
      > v6:
      > Change BUG_ON to WARN_ON (Daniel)
      > Rename vm to ggtt in preallocate stolen, since it is always ggtt when
      > dealing with stolen memory. (Daniel)
      > list_for_each will short-circuit already (Daniel)
      > remove superflous space (Daniel)
      > Use per object list of vmas (Daniel)
      > Make obj_bound_any() use obj_bound for each vm (Ben)
      > s/bind_to_gtt/bind_to_vm/ (Ben)
      >
      > Fixed up the inactive shrinker. As Daniel noticed the code could
      > potentially count the same object multiple times. While it's not
      > possible in the current case, since 1 object can only ever be bound into
      > 1 address space thus far - we may as well try to get something more
      > future proof in place now. With a prep patch before this to switch over
      > to using the bound list + inactive check, we're now able to carry that
      > forward for every address space an object is bound into.
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      [danvet: Rebase on top of the loss of "drm/i915: Cleanup more of VMA
      in destroy".]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      07fe0b12
  27. 09 7月, 2013 1 次提交
    • B
      drm/i915: Getter/setter for object attributes · f343c5f6
      Ben Widawsky 提交于
      Soon we want to gut a lot of our existing assumptions how many address
      spaces an object can live in, and in doing so, embed the drm_mm_node in
      the object (and later the VMA).
      
      It's possible in the future we'll want to add more getter/setter
      methods, but for now this is enough to enable the VMAs.
      
      v2: Reworked commit message (Ben)
      Added comments to the main functions (Ben)
      sed -i "s/i915_gem_obj_set_color/i915_gem_obj_ggtt_set_color/" drivers/gpu/drm/i915/*.[ch]
      sed -i "s/i915_gem_obj_bound/i915_gem_obj_ggtt_bound/" drivers/gpu/drm/i915/*.[ch]
      sed -i "s/i915_gem_obj_size/i915_gem_obj_ggtt_size/" drivers/gpu/drm/i915/*.[ch]
      sed -i "s/i915_gem_obj_offset/i915_gem_obj_ggtt_offset/" drivers/gpu/drm/i915/*.[ch]
      (Daniel)
      
      v3: Rebased on new reserve_node patch
      Changed DRM_DEBUG_KMS to actually work (will need fixing later)
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f343c5f6
  28. 18 4月, 2013 2 次提交
  29. 28 3月, 2013 1 次提交
  30. 23 3月, 2013 1 次提交
  31. 18 1月, 2013 2 次提交