1. 16 5月, 2020 1 次提交
  2. 08 5月, 2020 3 次提交
  3. 29 4月, 2020 1 次提交
  4. 24 4月, 2020 1 次提交
  5. 17 4月, 2020 1 次提交
    • Y
      drm/i915/gvt: skip populate shadow context if guest context not changed · fb55c735
      Yan Zhao 提交于
      Software is not expected to populate engine context except when using
      restore inhibit bit or golden state to initialize it for the first time.
      
      Therefore, if a newly submitted guest context is the same as the last
      shadowed one, no need to populate its engine context from guest again.
      
      Currently using lrca + ring_context_gpa to identify whether two guest
      contexts are the same.
      
      The reason of why context id is not included as an identifier is that
      i915 recently changed the code and context id is only unique for a
      context when OA is enabled. And when OA is on, context id is generated
      based on lrca. Therefore, in that case, if two contexts are of the same
      lrca, they have identical context ids as well.
      (This patch also works with old guest kernel like 4.20.)
      
      for guest context, if its ggtt entry is modified after last context
      shadowing, it is also deemed as not the same context as last shadowed one.
      
      v7:
      -removed local variable "valid". use the one in s->last_ctx diretly
      
      v6:
      -change type of lrca of last ctx to be u32. as currently it's all
      protected by vgpu lock (Kevin Tian)
      -reset valid of last ctx to false once it needs to be repopulated before
      population completes successfully (Kevin Tian)
      
      v5:
      -merge all 3 patches into one patch  (Zhenyu Wang)
      
      v4:
      - split the series into 3 patches.
      - don't turn on optimization until last patch in this series (Kevin Tian)
      - define lrca to be atomic in this patch rather than update its type in
      the second patch (Kevin Tian)
      
      v3: updated commit message to describe engine context and context id
      clearly (Kevin Tian)
      v2: rebased to 5.6.0-rc4+Signed-off-by: Yan Zhao <yan.y.zhao@intel.com>
      Reviewed-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Reviewed-by: NKevin Tian <kevin.tian@intel.com>
      Cc: Kevin Tian <kevin.tian@intel.com>
      Suggested-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: NYan Zhao <yan.y.zhao@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20200417091334.32628-1-yan.y.zhao@intel.com
      fb55c735
  6. 15 4月, 2020 2 次提交
  7. 27 3月, 2020 1 次提交
  8. 06 3月, 2020 2 次提交
  9. 24 2月, 2020 1 次提交
  10. 21 2月, 2020 2 次提交
  11. 08 1月, 2020 1 次提交
  12. 22 12月, 2019 1 次提交
  13. 20 12月, 2019 1 次提交
  14. 01 11月, 2019 1 次提交
  15. 24 10月, 2019 2 次提交
  16. 21 10月, 2019 1 次提交
  17. 18 10月, 2019 1 次提交
  18. 04 10月, 2019 2 次提交
  19. 06 9月, 2019 2 次提交
  20. 10 8月, 2019 2 次提交
  21. 09 8月, 2019 1 次提交
  22. 08 8月, 2019 2 次提交
  23. 02 8月, 2019 1 次提交
  24. 30 7月, 2019 4 次提交
    • C
      drm/i915/gt: Provide a local intel_context.vm · f5d974f9
      Chris Wilson 提交于
      Track the currently bound address space used by the HW context. Minor
      conversions to use the local intel_context.vm are made, leaving behind
      some more surgery required to make intel_context the primary through the
      selftests.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190730143209.4549-2-chris@chris-wilson.co.uk
      f5d974f9
    • C
      drm/i915/gvt: Adding ppgtt to GVT GEM context after shadow pdps settled. · 41874148
      Colin Xu 提交于
      Windows guest can't run after force-TDR with host log:
      ...
      gvt: vgpu 1: workload shadow ppgtt isn't ready
      gvt: vgpu 1: fail to dispatch workload, skip
      ...
      
      The error is raised by set_context_ppgtt_from_shadow(), when it checks
      and found the shadow_mm isn't marked as shadowed.
      
      In work thread before each submission, a shadow_mm is set to shadowed in:
      shadow_ppgtt_mm()
      <-intel_vgpu_pin_mm()
      <-prepare_workload()
      <-dispatch_workload()
      <-workload_thread()
      However checking whether or not shadow_mm is shadowed is prior to it:
      set_context_ppgtt_from_shadow()
      <-dispatch_workload()
      <-workload_thread()
      
      In normal case, create workload will check the existence of shadow_mm,
      if not it will create a new one and marked as shadowed. If already exist
      it will reuse the old one. Since shadow_mm is reused, checking of shadowed
      in set_context_ppgtt_from_shadow() actually always see the state set in
      creation, but not the state set in intel_vgpu_pin_mm().
      
      When force-TDR, all engines are reset, since it's not dmlr level, all
      ppgtt_mm are invalidated but not destroyed. Invalidation will mark all
      reused shadow_mm as not shadowed but still keeps in ppgtt_mm_list_head.
      If workload submission phase those shadow_mm are reused with shadowed
      not set, then set_context_ppgtt_from_shadow() will report error.
      
      Pin for context after shadow_mm pinned and shadow pdps settled.
      
      v2:
      Move set_context_ppgtt_from_shadow() after prepare_workload(). (zhenyu)
      v3:
      Move set_context_ppgtt_from_shadow() after shadow pdps updated.(zhenyu)
      
      Fixes: 4f15665c ("drm/i915: Add ppgtt to GVT GEM context")
      Cc: stable@vger.kernel.org
      Signed-off-by: NColin Xu <colin.xu@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      41874148
    • X
      drm/i915/gvt: grab runtime pm first for forcewake use · ef5b0b44
      Xiaolin Zhang 提交于
      in workload_thread, it should grab runtime pm wakelock and later
      uncore forcewake get will check rpm wakelock held successfully.
      otherwise, sometimes, rpm wakelock not hold and print call trace below:
      
       Call Trace:
        intel_uncore_forcewake_get+0x15/0x20 [i915]
        workload_thread+0x5f9/0x16f0 [i915]
        ? __switch_to_asm+0x34/0x70
        ? __switch_to_asm+0x40/0x70
        ? __switch_to_asm+0x34/0x70
        ? __switch_to_asm+0x40/0x70
        ? __switch_to_asm+0x34/0x70
        ? __switch_to+0x85/0x3f0
        ? __switch_to_asm+0x40/0x70
        ? do_wait_intr_irq+0x90/0x90
        kthread+0x121/0x140
        ? intel_vgpu_clean_workloads+0x100/0x100 [i915]
        ? kthread_park+0x90/0x90
        ret_from_fork+0x35/0x40
       --[ end trace 86525f742a02e12c ]--
      
      v2: adapted to use rpm structure.
      
      Fixes: 251d46b0 ("drm/i915/gvt: Pin the per-engine GVT shadow contexts")
      Reviewed-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: NXiaolin Zhang <xiaolin.zhang@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      ef5b0b44
    • X
      drm/i915/gvt: Checking workload's gma earlier · 2089a76a
      Xiong Zhang 提交于
      Workload contains RB and WA_CTX which are in ggtt space,
      if they aren't in valid ggtt space, the workload shouldn't be
      shadowed and scanned. So checking them earlier to avoid shadow
      them.
      Reviewed-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: NXiong Zhang <xiong.y.zhang@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      2089a76a
  25. 17 6月, 2019 1 次提交
  26. 14 6月, 2019 1 次提交
  27. 11 6月, 2019 1 次提交