1. 03 5月, 2012 5 次提交
    • C
      drm/i915: Remove i915_gem_evict_inactive() · a39d7efc
      Chris Wilson 提交于
      This was only used by one external caller who would just be as happy
      with evict-everything, so perform the replacement and make the function
      private.
      
      In the process we note that unbinding the inactive list should not fail,
      and make it a warning instead.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a39d7efc
    • C
      drm/i915: Bump the inactive LRU on set-to-GTT-domain · 8325a09d
      Chris Wilson 提交于
      Currently, we only bump the inactive LRU of an object when we bind
      into the GTT for a page-fault. As the object may be used many times
      before its mapping is zapped, we do not mark it as active as
      frequently as we should. Userspace should be calling set-to-GTT-domain
      before each pointer deference (for synchronous access) and so is a
      good place to mark the buffer as active.
      
      Marking the buffer as recently used places it at the end of the
      inactive eviction queue, though still before anything with outstanding
      rendering. This reduces the likelihood of evicting a buffer that is
      going to be used again by the CPU in the near future. This way we can
      hopefully avoid to kick out upload buffers right before we use them on
      the gpu.
      
      Note that we need to check that the object is not active or pinned,
      for otherwise we create havoc on the active/pinned lists, which also
      use obj->mm_list.
      
      The active lists are sorted by and evicted in last GPU rendering
      order, access by the CPU to a still active buffer therefore does not
      affect its eviction ordering. Pinned objects are currently excluded
      from eviction, therefore the only list that we need to bump for GTT
      access by the CPU is the inactive list.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      [danvet: Added further explanations to the commit message as discussed
      on irc.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8325a09d
    • D
      drm/i915: create macros to handle masked bits · 6b26c86d
      Daniel Vetter 提交于
      ... and put them to so good use.
      
      Note that there's functional change in vlv clock gating code, we now
      no longer spuriously read back the current value of the bit. According
      to Bspec the high bits should always read zero, so ORing this in
      should have no effect.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NEugeni Dodonov <eugeni.dodonov@intel.com>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6b26c86d
    • C
      drm/i915: Clarify the semantics of tiling_changed · 5d82e3e6
      Chris Wilson 提交于
      Rename obj->tiling_changed to obj->fence_dirty so that it is clear that
      it flags when the parameters for an active fence (including the
      no-fence) register are changed.
      
      Also, do not set this flag when the object does not have a fence
      register allocated currently and the gpu does not depend upon the
      unfence. This case works exactly like when a tiled object lost its
      fence and hence does not need additional handling for the tiling
      change in the code.
      
      v2: Use fence_dirty to better express what the flag tracks and add a few
      more details to the comments to serve as a reminder of how the GPU also
      uses the unfenced register slot.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      [danvet: Add some bikeshed to the commit message about the stricter
      use of fence_dirty.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5d82e3e6
    • B
      drm/i915: [sparse] __iomem fixes for gem · 4f0c7cfb
      Ben Widawsky 提交于
      As with one of the earlier patches in the series, we're forced to cast
      for copy_[to|from]_user. Again because of the nature of the GEN x86
      exclusivity, this should be safe.
      Signed-off-by: NBen Widawsky <benjamin.widawsky@intel.com>
      [danvet: Added some bikeshed.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4f0c7cfb
  2. 18 4月, 2012 10 次提交
  3. 17 4月, 2012 2 次提交
  4. 16 4月, 2012 1 次提交
    • D
      drm/i915: don't pwrite tiled objects through the gtt · c07496fa
      Daniel Vetter 提交于
      ... we will botch up the bit17 swizzling. Furthermore tiled pwrite is
      a (now) unused slowpath, so no one really cares.
      
      This fixes the last swizzling issues I have with i-g-t on my bit17
      swizzling i915G. No regression, it's been broken since the dawn of
      gem, but it's nice for regression tracking when really _all_ i-g-t
      tests work.
      
      Actually this is not true, Chris Wilson noticed while reviewing this
      patch that the commit
      
      commit d9e86c0e
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Wed Nov 10 16:40:20 2010 +0000
      
          drm/i915: Pipelined fencing [infrastructure]
      
      contained a functional change that broke things.
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c07496fa
  5. 13 4月, 2012 6 次提交
  6. 12 4月, 2012 1 次提交
    • D
      drm/i915: clear fencing tracking state when retiring requests · 15a13bbd
      Daniel Vetter 提交于
      This fixes a resume regression introduced in
      
      commit 7dd49065
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Wed Mar 21 10:48:18 2012 +0000
      
          drm/i915: Mark untiled BLT commands as fenced on gen2/3
      
      which fixed fencing tracking for untiled blt commands.
      
      A side effect of that patch was that now also untiled objects have a
      non-zero obj->last_fenced_seqno to track when a fence can be set up
      after a pipelined tiling change. Unfortunately this was only cleared
      by the fence setup and teardown code, resulting in tons of untiled but
      inactive objects with non-zero last_fenced_seqno.
      
      Now after resume we completely reset the seqno tracking, both on the
      driver side (by setting dev_priv->next_seqno = 1) and on the hw side
      (by allocating a new hws page, which contains the seqnos). Hilarity
      and indefinite waits ensued from the stale seqnos in
      obj->last_fenced_seqno from before the suspend.
      
      The fix is to properly clear the fencing tracking state like we
      already do for the normal gpu rendering while moving objects off the
      active list.
      Reported-and-tested-by: N"Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      15a13bbd
  7. 10 4月, 2012 1 次提交
  8. 01 4月, 2012 2 次提交
  9. 29 3月, 2012 1 次提交
  10. 27 3月, 2012 11 次提交