1. 26 9月, 2016 2 次提交
  2. 09 9月, 2016 4 次提交
    • C
      drm/i915: Update reset path to fix incomplete requests · 821ed7df
      Chris Wilson 提交于
      Update reset path in preparation for engine reset which requires
      identification of incomplete requests and associated context and fixing
      their state so that engine can resume correctly after reset.
      
      The request that caused the hang will be skipped and head is reset to the
      start of breadcrumb. This allows us to resume from where we left-off.
      Since this request didn't complete normally we also need to cleanup elsp
      queue manually. This is vital if we employ nonblocking request
      submission where we may have a web of dependencies upon the hung request
      and so advancing the seqno manually is no longer trivial.
      
      ABI: gem_reset_stats / DRM_IOCTL_I915_GET_RESET_STATS
      
      We change the way we count pending batches. Only the active context
      involved in the reset is marked as either innocent or guilty, and not
      mark the entire world as pending. By inspection this only affects
      igt/gem_reset_stats (which assumes implementation details) and not
      piglit.
      
      ARB_robustness gives this guide on how we expect the user of this
      interface to behave:
      
       * Provide a mechanism for an OpenGL application to learn about
         graphics resets that affect the context.  When a graphics reset
         occurs, the OpenGL context becomes unusable and the application
         must create a new context to continue operation. Detecting a
         graphics reset happens through an inexpensive query.
      
      And with regards to the actual meaning of the reset values:
      
         Certain events can result in a reset of the GL context. Such a reset
         causes all context state to be lost. Recovery from such events
         requires recreation of all objects in the affected context. The
         current status of the graphics reset state is returned by
      
      	enum GetGraphicsResetStatusARB();
      
         The symbolic constant returned indicates if the GL context has been
         in a reset state at any point since the last call to
         GetGraphicsResetStatusARB. NO_ERROR indicates that the GL context
         has not been in a reset state since the last call.
         GUILTY_CONTEXT_RESET_ARB indicates that a reset has been detected
         that is attributable to the current GL context.
         INNOCENT_CONTEXT_RESET_ARB indicates a reset has been detected that
         is not attributable to the current GL context.
         UNKNOWN_CONTEXT_RESET_ARB indicates a detected graphics reset whose
         cause is unknown.
      
      The language here is explicit in that we must mark up the guilty batch,
      but is loose enough for us to relax the innocent (i.e. pending)
      accounting as only the active batches are involved with the reset.
      
      In the future, we are looking towards single engine resetting (with
      minimal locking), where it seems inappropriate to mark the entire world
      as innocent since the reset occurred on a different engine. Reducing the
      information available means we only have to encounter the pain once, and
      also reduces the information leaking from one context to another.
      
      v2: Legacy ringbuffer submission required a reset following hibernation,
      or else we restore stale values to the RING_HEAD and walked over
      stolen garbage.
      
      v3: GuC requires replaying the requests after a reset.
      
      v4: Restore engine IRQ after reset (so waiters will be woken!)
          Rearm hangcheck if resetting with a waiter.
      
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Cc: Arun Siluvery <arun.siluvery@linux.intel.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-13-chris@chris-wilson.co.uk
      821ed7df
    • C
      drm/i915: Perform a direct reset of the GPU from the waiter · 221fe799
      Chris Wilson 提交于
      If a waiter is holding the struct_mutex, then the reset worker cannot
      reset the GPU until the waiter returns. We do not want to return -EAGAIN
      form i915_wait_request as that breaks delicate operations like
      i915_vma_unbind() which often cannot be restarted easily, and returning
      -EIO is just as useless (and has in the past proven dangerous). The
      remaining WARN_ON(i915_wait_request) serve as a valuable reminder that
      handling errors from an indefinite wait are tricky.
      
      We can keep the current semantic that knowing after a reset is complete,
      so is the request, by performing the reset ourselves if we hold the
      mutex.
      
      uevent emission is still handled by the reset worker, so it may appear
      slightly out of order with respect to the actual reset (and concurrent
      use of the device).
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-11-chris@chris-wilson.co.uk
      221fe799
    • C
      drm/i915: Mark up all locked waiters · 22dd3bb9
      Chris Wilson 提交于
      In the next patch we want to handle reset directly by a locked waiter in
      order to avoid issues with returning before the reset is handled. To
      handle the reset, we must first know whether we hold the struct_mutex.
      If we do not hold the struct_mtuex we can not perform the reset, but we do
      not block the reset worker either (and so we can just continue to wait for
      request completion) - otherwise we must relinquish the mutex.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-10-chris@chris-wilson.co.uk
      22dd3bb9
    • C
      drm/i915: Expand bool interruptible to pass flags to i915_wait_request() · ea746f36
      Chris Wilson 提交于
      We need finer control over wakeup behaviour during i915_wait_request(),
      so expand the current bool interruptible to a bitmask.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-9-chris@chris-wilson.co.uk
      ea746f36
  3. 08 9月, 2016 1 次提交
  4. 02 9月, 2016 1 次提交
    • I
      drm/i915: sseu: Use sseu_dev_info in device info · 43b67998
      Imre Deak 提交于
      Move all slice/subslice/eu related properties to the sseu_dev_info
      struct.
      
      No functional change.
      
      v2:
      - s/info/sseu/ based on the new struct name. (Ben)
      
      Reviewed-by: Robert Bragg <robert@sixbynine.org> (v1)
      Reviewed-by: Ben Widawsky <benjamin.widawsky@intel.com> (v1)
      Tested-by: Ben Widawsky <benjamin.widawsky@intel.com> (v1)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      43b67998
  5. 19 8月, 2016 2 次提交
  6. 17 8月, 2016 1 次提交
  7. 15 8月, 2016 11 次提交
  8. 12 8月, 2016 1 次提交
    • C
      drm/i915: Support for creating write combined type vmaps · d31d7cb1
      Chris Wilson 提交于
      vmaps has a provision for controlling the page protection bits, with which
      we can use to control the mapping type, e.g. WB, WC, UC or even WT.
      To allow the caller to choose their mapping type, we add a parameter to
      i915_gem_object_pin_map - but we still only allow one vmap to be cached
      per object. If the object is currently not pinned, then we recreate the
      previous vmap with the new access type, but if it was pinned we report an
      error. This effectively limits the access via i915_gem_object_pin_map to a
      single mapping type for the lifetime of the object. Not usually a problem,
      but something to be aware of when setting up the object's vmap.
      
      We will want to vary the access type to enable WC mappings of ringbuffer
      and context objects on !llc platforms, as well as other objects where we
      need coherent access to the GPU's pages without going through the GTT
      
      v2: Remove the redundant braces around pin count check and fix the marker
           in documentation (Chris)
      
      v3:
      - Add a new enum for the vmalloc mapping type & pass that as an argument to
         i915_object_pin_map. (Tvrtko)
      - Use PAGE_MASK to extract or filter the mapping type info and remove a
         superfluous BUG_ON.(Tvrtko)
      
      v4:
      - Rename the enums and clean up the pin_map function. (Chris)
      
      v5: Drop the VM_NO_GUARD, minor cosmetics.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1471001999-17787-1-git-send-email-chris@chris-wilson.co.uk
      d31d7cb1
  9. 11 8月, 2016 1 次提交
  10. 10 8月, 2016 2 次提交
  11. 05 8月, 2016 4 次提交
  12. 04 8月, 2016 5 次提交
  13. 03 8月, 2016 5 次提交