1. 30 11月, 2019 1 次提交
  2. 28 11月, 2019 1 次提交
  3. 25 11月, 2019 1 次提交
  4. 16 11月, 2019 1 次提交
  5. 13 11月, 2019 1 次提交
  6. 11 11月, 2019 3 次提交
  7. 08 11月, 2019 1 次提交
  8. 06 11月, 2019 2 次提交
    • C
      drm/i915/gem: Fix error path to unlock if the GEM context is closed · feba2b81
      Chris Wilson 提交于
      When inside the lock, remember to unlock even if you want to leave
      early.
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Fixes: a4e7ccda ("drm/i915: Move context management under GEM")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191106144155.25727-1-chris@chris-wilson.co.uk
      feba2b81
    • J
      drm/i915/cmdparser: Add support for backward jumps · f8c08d8f
      Jon Bloomfield 提交于
      To keep things manageable, the pre-gen9 cmdparser does not
      attempt to track any form of nested BB_START's. This did not
      prevent usermode from using nested starts, or even chained
      batches because the cmdparser is not strictly enforced pre gen9.
      
      Instead, the existence of a nested BB_START would cause the batch
      to be emitted in insecure mode, and any privileged capabilities
      would not be available.
      
      For Gen9, the cmdparser becomes mandatory (for BCS at least), and
      so not providing any form of nested BB_START support becomes
      overly restrictive. Any such batch will simply not run.
      
      We make heavy use of backward jumps in igt, and it is much easier
      to add support for this restricted subset of nested jumps, than to
      rewrite the whole of our test suite to avoid them.
      
      Add the required logic to support limited backward jumps, to
      instructions that have already been validated by the parser.
      
      Note that it's not sufficient to simply approve any BB_START
      that jumps backwards in the buffer because this would allow an
      attacker to embed a rogue instruction sequence within the
      operand words of a harmless instruction (say LRI) and jump to
      that.
      
      We introduce a bit array to track every instr offset successfully
      validated, and test the target of BB_START against this. If the
      target offset hits, it is re-written to the same offset in the
      shadow buffer and the BB_START cmd is allowed.
      
      Note: This patch deliberately ignores checkpatch issues in the
      cmdtables, in order to match the style of the surrounding code.
      We'll correct the entire file in one go in a later patch.
      
      v2: set dispatch secure late (Mika)
      v3: rebase (Mika)
      v4: Clear whitelist on each parse
          Minor review updates (Chris)
      v5: Correct backward jump batching
      v6: fix compilation error due to struct eb shuffle (Mika)
      
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: Tyler Hicks <tyhicks@canonical.com>
      Signed-off-by: NJon Bloomfield <jon.bloomfield@intel.com>
      Signed-off-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: NChris Wilson <chris.p.wilson@intel.com>
      f8c08d8f
  9. 01 11月, 2019 1 次提交
  10. 30 10月, 2019 1 次提交
    • C
      drm/i915/gem: Make context persistence optional · a0e04715
      Chris Wilson 提交于
      Our existing behaviour is to allow contexts and their GPU requests to
      persist past the point of closure until the requests are complete. This
      allows clients to operate in a 'fire-and-forget' manner where they can
      setup a rendering pipeline and hand it over to the display server and
      immediately exit. As the rendering pipeline is kept alive until
      completion, the display server (or other consumer) can use the results
      in the future and present them to the user.
      
      The compute model is a little different. They have little to no buffer
      sharing between processes as their kernels tend to operate on a
      continuous stream, feeding the results back to the client application.
      These kernels operate for an indeterminate length of time, with many
      clients wishing that the kernel was always running for as long as they
      keep feeding in the data, i.e. acting like a DSP.
      
      Not all clients want this persistent "desktop" behaviour and would prefer
      that the contexts are cleaned up immediately upon closure. This ensures
      that when clients are run without hangchecking (e.g. for compute kernels
      of indeterminate runtime), any GPU hang or other unexpected workloads
      are terminated with the process and does not continue to hog resources.
      
      The default behaviour for new contexts is the legacy persistence mode,
      as some desktop applications are dependent upon the existing behaviour.
      New clients will have to opt in to immediate cleanup on context
      closure. If the hangchecking modparam is disabled, so is persistent
      context support -- all contexts will be terminated on closure.
      
      We expect this behaviour change to be welcomed by compute users, who
      have often been caught between a rock and a hard place. They disable
      hangchecking to avoid their kernels being "unfairly" declared hung, but
      have also experienced true hangs that the system was then unable to
      clean up. Naturally, this leads to bug reports.
      
      Testcase: igt/gem_ctx_persistence
      Link: https://github.com/intel/compute-runtime/pull/228Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Michał Winiarski <michal.winiarski@intel.com>
      Cc: Jon Bloomfield <jon.bloomfield@intel.com>
      Reviewed-by: NJon Bloomfield <jon.bloomfield@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Acked-by: NJason Ekstrand <jason@jlekstrand.net>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191029202338.8841-1-chris@chris-wilson.co.uk
      a0e04715
  11. 26 10月, 2019 1 次提交
  12. 24 10月, 2019 2 次提交
  13. 18 10月, 2019 1 次提交
  14. 04 10月, 2019 6 次提交
  15. 25 9月, 2019 1 次提交
  16. 20 9月, 2019 1 次提交
    • C
      drm/i915: Mark i915_request.timeline as a volatile, rcu pointer · d19d71fc
      Chris Wilson 提交于
      The request->timeline is only valid until the request is retired (i.e.
      before it is completed). Upon retiring the request, the context may be
      unpinned and freed, and along with it the timeline may be freed. We
      therefore need to be very careful when chasing rq->timeline that the
      pointer does not disappear beneath us. The vast majority of users are in
      a protected context, either during request construction or retirement,
      where the timeline->mutex is held and the timeline cannot disappear. It
      is those few off the beaten path (where we access a second timeline) that
      need extra scrutiny -- to be added in the next patch after first adding
      the warnings about dangerous access.
      
      One complication, where we cannot use the timeline->mutex itself, is
      during request submission onto hardware (under spinlocks). Here, we want
      to check on the timeline to finalize the breadcrumb, and so we need to
      impose a second rule to ensure that the request->timeline is indeed
      valid. As we are submitting the request, it's context and timeline must
      be pinned, as it will be used by the hardware. Since it is pinned, we
      know the request->timeline must still be valid, and we cannot submit the
      idle barrier until after we release the engine->active.lock, ergo while
      submitting and holding that spinlock, a second thread cannot release the
      timeline.
      
      v2: Don't be lazy inside selftests; hold the timeline->mutex for as long
      as we need it, and tidy up acquiring the timeline with a bit of
      refactoring (i915_active_add_request)
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190919111912.21631-1-chris@chris-wilson.co.uk
      d19d71fc
  17. 03 9月, 2019 1 次提交
  18. 31 8月, 2019 1 次提交
  19. 24 8月, 2019 1 次提交
  20. 20 8月, 2019 1 次提交
  21. 17 8月, 2019 1 次提交
  22. 10 8月, 2019 3 次提交
  23. 08 8月, 2019 1 次提交
  24. 06 8月, 2019 1 次提交
  25. 02 8月, 2019 1 次提交
  26. 31 7月, 2019 1 次提交
  27. 30 7月, 2019 2 次提交
  28. 17 7月, 2019 1 次提交