1. 27 Sep, 2019 11 commits
  2. 26 Sep, 2019 8 commits
  3. 25 Sep, 2019 13 commits
  4. 24 Sep, 2019 5 commits
  5. 23 Sep, 2019 3 commits
    • Chris Wilson's avatar
      drm/i915: Prevent bonded requests from overtaking each other on preemption · e2144503
      Chris Wilson authored
      Force bonded requests to run on distinct engines so that they cannot be
      shuffled onto the same engine where timeslicing will reverse the order.
      A bonded request will often wait on a semaphore signaled by its master,
      creating an implicit dependency -- if we ignore that implicit dependency
      and allow the bonded request to run on the same engine and before its
      master, we will cause a GPU hang. [Whether it will hang the GPU is
      debatable, we should keep on timeslicing and each timeslice should be
      "accidentally" counted as forward progress, in which case it should run
      but at one-half to one-third speed.]
      
      We can prevent this inversion by restricting which engines we allow
      ourselves to jump to upon preemption, i.e. baking in the arrangement
      established at first execution. (We should also consider capturing the
      implicit dependency using i915_sched_add_dependency(), but first we need
      to think about the constraints that requires on the execution/retirement
      ordering.)
      
      Fixes: 8ee36e04 ("drm/i915/execlists: Minimalistic timeslicing")
      References: ee113690 ("drm/i915/execlists: Virtual engine bonding")
      Testcase: igt/gem_exec_balancer/bonded-slice
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190923152844.8914-3-chris@chris-wilson.co.uk
      e2144503
    • Chris Wilson's avatar
      drm/i915: Fixup preempt-to-busy vs reset of a virtual request · cb2377a9
      Chris Wilson authored
      Due to the nature of preempt-to-busy the execlists active tracking and
      the schedule queue may become temporarily desync'ed (between resubmission
      to HW and its ack from HW). This means that we may have unwound a
      request and passed it back to the virtual engine, but it is still
      inflight on the HW and may even result in a GPU hang. If we detect that
      GPU hang and try to reset, the hanging request->engine will no longer
      match the current engine, which means that the request is not on the
      execlists active list and we should not try to find an older incomplete
      request. Given that we have deduced this must be a request on a virtual
      engine, it is the single active request in the context and so must be
      guilty (as the context is still inflight, it is prevented from being
      executed on another engine as we process the reset).
      
      Fixes: 22b7a426 ("drm/i915/execlists: Preempt-to-busy")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190923152844.8914-2-chris@chris-wilson.co.uk
      cb2377a9
    • Chris Wilson's avatar
      drm/i915: Fixup preempt-to-busy vs resubmission of a virtual request · b647c7df
      Chris Wilson authored
      As preempt-to-busy leaves the request on the HW as the resubmission is
      processed, that request may complete in the background and even cause a
      second virtual request to enter queue. This second virtual request
      breaks our "single request in the virtual pipeline" assumptions.
      Furthermore, as the virtual request may be completed and retired, we
      lose the reference the virtual engine assumes is held. Normally, just
      removing the request from the scheduler queue removes it from the
      engine, but the virtual engine keeps track of its singleton request via
      its ve->request. This pointer needs protecting with a reference.
      
      v2: Drop unnecessary motion of rq->engine = owner
      
      Fixes: 22b7a426 ("drm/i915/execlists: Preempt-to-busy")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190923152844.8914-1-chris@chris-wilson.co.uk
      b647c7df