1. 18 1月, 2016 2 次提交
  2. 08 1月, 2016 1 次提交
    • M
      drm/i915: Inspect subunit states on hangcheck · 61642ff0
      Mika Kuoppala 提交于
      If head seems stuck and engine in question is rcs,
      inspect subunit state transitions from undone to done,
      before deciding that this really is a hang instead of limited
      progress. Only account the transitions of subunits from
      undone to done once, to prevent unstable subunit states
      to keep us falsely active.
      
      As this adds one extra steps to hangcheck heuristics,
      before hang is declared, it adds 1500ms to to detect hang
      for render ring to a total of 7500ms. We could sample
      the subunit states on first head stuck condition but
      decide not to do so only in order to mimic old behaviour. This
      way the check order of promotion from seqno > atchd > instdone
      is consistently done.
      
      v2: Deal with unstable done states (Arun)
          Clear instdone progress on head and seqno movement (Chris)
          Report raw and accumulated instdone's in in debugfs (Chris)
          Return HANGCHECK_ACTIVE on undone->done
      
      References: https://bugs.freedesktop.org/show_bug.cgi?id=93029
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Dave Gordon <david.s.gordon@intel.com>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Arun Siluvery <arun.siluvery@linux.intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1448985372-19535-1-git-send-email-mika.kuoppala@intel.com
      61642ff0
  3. 10 12月, 2015 1 次提交
  4. 18 11月, 2015 2 次提交
  5. 29 10月, 2015 1 次提交
    • C
      drm/i915: Recover all available ringbuffer space following reset · 608c1a52
      Chris Wilson 提交于
      Having flushed all requests from all queues, we know that all
      ringbuffers must now be empty. However, since we do not reclaim
      all space when retiring the request (to prevent HEADs colliding
      with rapid ringbuffer wraparound) the amount of available space
      on each ringbuffer upon reset is less than when we start. Do one
      more pass over all the ringbuffers to reset the available space
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Cc: Arun Siluvery <arun.siluvery@linux.intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Cc: Dave Gordon <david.s.gordon@intel.com>
      608c1a52
  6. 04 9月, 2015 1 次提交
  7. 26 8月, 2015 1 次提交
    • I
      drm/i915/bxt: work around HW coherency issue when accessing GPU seqno · 319404df
      Imre Deak 提交于
      By running igt/store_dword_loop_render on BXT we can hit a coherency
      problem where the seqno written at GPU command completion time is not
      seen by the CPU. This results in __i915_wait_request seeing the stale
      seqno and not completing the request (not considering the lost
      interrupt/GPU reset mechanism). I also verified that this isn't a case
      of a lost interrupt, or that the command didn't complete somehow: when
      the coherency issue occured I read the seqno via an uncached GTT mapping
      too. While the cached version of the seqno still showed the stale value
      the one read via the uncached mapping was the correct one.
      
      Work around this issue by clflushing the corresponding CPU cacheline
      following any store of the seqno and preceding any reading of it. When
      reading it do this only when the caller expects a coherent view.
      
      v2:
      - fix using the proper logical && instead of a bitwise & (Jani, Mika)
      - limit the workaround to A stepping, on later steppings this HW issue
        is fixed
      v3:
      - use a separate get_seqno/set_seqno vfunc (Chris)
      
      Testcase: igt/store_dword_loop_render
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      319404df
  8. 14 7月, 2015 1 次提交
    • T
      drm/i915: Snapshot seqno of most recently submitted request. · 94f7bbe1
      Tomas Elf 提交于
      The hang checker needs to inspect whether or not the ring request list is empty
      as well as if the given engine has reached or passed the most recently
      submitted request. The problem with this is that the hang checker cannot grab
      the struct_mutex, which is required in order to safely inspect requests since
      requests might be deallocated during inspection. In the past we've had kernel
      panics due to this very unsynchronized access in the hang checker.
      
      One solution to this problem is to not inspect the requests directly since
      we're only interested in the seqno of the most recently submitted request - not
      the request itself. Instead the seqno of the most recently submitted request is
      stored separately, which the hang checker then inspects, circumventing the
      issue of synchronization from the hang checker entirely.
      
      This fixes a regression introduced in
      
      commit 44cdd6d2
      Author: John Harrison <John.C.Harrison@Intel.com>
      Date:   Mon Nov 24 18:49:40 2014 +0000
      
          drm/i915: Convert 'ring_idle()' to use requests not seqnos
      
      v2 (Chris Wilson):
      - Pass current engine seqno to ring_idle() from i915_hangcheck_elapsed() rather
      than compute it over again.
      - Remove extra whitespace.
      
      Issue: VIZ-5998
      Signed-off-by: NTomas Elf <tomas.elf@intel.com>
      Cc: stable@vger.kernel.org
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      [danvet: Add regressing commit citation provided by Chris.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      94f7bbe1
  9. 06 7月, 2015 1 次提交
  10. 03 7月, 2015 1 次提交
    • J
      drm/i915: Reserve space improvements · 79bbcc29
      John Harrison 提交于
      An earlier patch was added to reserve space in the ring buffer for the
      commands issued during 'add_request()'. The initial version was
      pessimistic in the way it handled buffer wrapping and would cause
      premature wraps and thus waste ring space.
      
      This patch updates the code to better handle the wrap case. It no
      longer enforces that the space being asked for and the reserved space
      are a single contiguous block. Instead, it allows the reserve to be on
      the far end of a wrap operation. It still guarantees that the space is
      available so when the wrap occurs, no wait will happen. Thus the wrap
      cannot fail which is the whole point of the exercise.
      
      Also fixed a merge failure with some comments from the original patch.
      
      v2: Incorporated suggestion by David Gordon to move the wrap code
      inside the prepare function and thus allow a single combined
      wait_for_space() call rather than doing one before the wrap and
      another after. This also makes the prepare code much simpler and
      easier to follow.
      
      v3: Fix for 'effective_size' vs 'size' during ring buffer remainder
      calculations (spotted by Tomas Elf).
      
      For: VIZ-5115
      CC: Daniel Vetter <daniel@ffwll.ch>
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: NTomas Elf <tomas.elf@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      79bbcc29
  11. 23 6月, 2015 19 次提交
  12. 15 6月, 2015 2 次提交
  13. 10 4月, 2015 1 次提交
    • C
      drm/i915: Split the batch pool by engine · 06fbca71
      Chris Wilson 提交于
      I woke up one morning and found 50k objects sitting in the batch pool
      and every search seemed to iterate the entire list... Painting the
      screen in oils would provide a more fluid display.
      
      One issue with the current design is that we only check for retirements
      on the current ring when preparing to submit a new batch. This means
      that we can have thousands of "active" batches on another ring that we
      have to walk over. The simplest way to avoid that is to split the pools
      per ring and then our LRU execution ordering will also ensure that the
      inactive buffers remain at the front.
      
      v2: execlists still requires duplicate code.
      v3: execlists requires more duplicate code
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      06fbca71
  14. 01 4月, 2015 1 次提交
  15. 18 3月, 2015 1 次提交
  16. 26 2月, 2015 1 次提交
    • J
      drm/i915: Rename 'flags' to 'dispatch_flags' for better code reading · 8e004efc
      John Harrison 提交于
      There is a flags word that is passed through the execbuffer code path all the
      way from initial decoding of the user parameters down to the very final dispatch
      buffer call. It is simply called 'flags'. Unfortuantely, there are many other
      flags words floating around in the same blocks of code. Even more once the GPU
      scheduler arrives.
      
      This patch makes it more obvious exactly which flags word is which by renaming
      'flags' to 'dispatch_flags'. Note that the bit definitions for this flags word
      already have an 'I915_DISPATCH_' prefix on them and so are not quite so
      ambiguous.
      
      OTC-Jira: VIZ-1587
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      [danvet: Resolve conflict with Chris' rework of the bb parsing.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8e004efc
  17. 24 2月, 2015 1 次提交
  18. 14 2月, 2015 1 次提交
  19. 27 1月, 2015 1 次提交