1. 18 10月, 2019 1 次提交
  2. 04 10月, 2019 2 次提交
  3. 06 9月, 2019 2 次提交
  4. 10 8月, 2019 2 次提交
  5. 09 8月, 2019 1 次提交
  6. 08 8月, 2019 2 次提交
  7. 02 8月, 2019 1 次提交
  8. 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
  9. 17 6月, 2019 1 次提交
  10. 14 6月, 2019 1 次提交
  11. 11 6月, 2019 2 次提交
  12. 03 6月, 2019 1 次提交
  13. 28 5月, 2019 4 次提交
  14. 21 5月, 2019 2 次提交
    • Y
      drm/i915/gvt: use cmd to restore in-context mmios to hw for gen9 platform · df2ea3c2
      Yan Zhao 提交于
      for restore-inhibit context, hardware will not load in-context mmios
      (engine context part) to hardware, but hardware will save the mmio
      values in hardware back to context image. So, in order to save correct
      values of vGPU back to context image, values of vGPU mmios have to be
      loaded into hardware first for restore-inhibit context.
      
      In this patch, the mechanism is applied to all gen9 platform.
      
      The reason excluding gen8 platforms is only because of lacking of testing
      on those platforms.
      
      v3: for mocs registers, goto in-context mmios save-restore path for skl
      platform as well (weinan li)
      v2: update vreg when scanning indirect context for inhibit context for
      gen9
      
      Cc: Weinan Li <weinan.z.li@intel.com>
      Acked-by: NWeinan Li <weinan.z.li@intel.com>
      Signed-off-by: NYan Zhao <yan.y.zhao@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      df2ea3c2
    • W
      drm/i915/gvt: emit init breadcrumb for gvt request · a8c2d5ab
      Weinan 提交于
      "To track whether a request has started on HW, we can emit a breadcrumb at
      the beginning of the request and check its timeline's HWSP to see if the
      breadcrumb has advanced past the start of this request." It means all the
      request which timeline's has_init_breadcrumb is true, then the
      emit_init_breadcrumb process must have before emitting the real commands,
      otherwise, the scheduler might get a wrong state of this request during
      reset. If the request is exactly the guilty one, the scheduler won't
      terminate it with the wrong state. To avoid this, do emit_init_breadcrumb
      for all the requests from gvt.
      
      v2: cc to stable kernel
      
      Fixes: 85474441 ("drm/i915: Identify active requests")
      Cc: stable@vger.kernel.org
      Acked-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: NWeinan <weinan.z.li@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      a8c2d5ab
  15. 27 4月, 2019 3 次提交
  16. 25 4月, 2019 1 次提交
  17. 02 4月, 2019 1 次提交
  18. 29 3月, 2019 1 次提交
  19. 21 3月, 2019 1 次提交
  20. 15 3月, 2019 1 次提交
  21. 06 3月, 2019 1 次提交
  22. 04 3月, 2019 1 次提交
  23. 01 3月, 2019 2 次提交
    • Z
      drm/i915/gvt: Don't submit request for error workload dispatch · f552e7bd
      Zhenyu Wang 提交于
      As vGPU shadow ctx is loaded with guest context state, arbitrarily
      submitting request in error workload dispatch path would cause trouble.
      So don't try to submit in error path now like in previous code.
      This is to fix VM failure when GPU hang happens.
      
      Fixes: f0e99437 ("drm/i915/gvt: Fix workload request allocation before request add")
      Reviewed-by: NXiong Zhang <xiong.y.zhang@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      f552e7bd
    • W
      drm/i915/gvt: stop scheduling workload when vgpu is inactive · 9f498477
      Weinan Li 提交于
      There is one corner case that workload_thread may pick and dispatch one
      workload of vgpu after it's already deactivated. Below is the scenario:
      
      1. deactive_vgpu got the vgpu_lock, it found pending workload was
      submitted, then it released the vgpu_lock and wait for vgpu idle.
      2. before deactive_vgpu got the vgpu_lock back, workload_thread might pick
      one new valid workload, then it was blocked by the vgpu_lock.
      3. deactive_vgpu got the vgpu_lock again, finished the last processes of
      deactivating, then release the vgpu_lock.
      4. workload_thread got the vgpu_lock, then it will try to dispatch the
      fetched workload. It's not expected one workload of deactivated vgpu is
      dispatched.
      
      The solution is to add condition check of the vgpu's active flag and stop
      to schedule when it's inactive.
      Reviewed-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: NWeinan Li <weinan.z.li@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      9f498477
  24. 23 1月, 2019 1 次提交
  25. 15 1月, 2019 1 次提交
    • C
      drm/i915: Markup paired operations on wakerefs · 16e4dd03
      Chris Wilson 提交于
      The majority of runtime-pm operations are bounded and scoped within a
      function; these are easy to verify that the wakeref are handled
      correctly. We can employ the compiler to help us, and reduce the number
      of wakerefs tracked when debugging, by passing around cookies provided
      by the various rpm_get functions to their rpm_put counterpart. This
      makes the pairing explicit, and given the required wakeref cookie the
      compiler can verify that we pass an initialised value to the rpm_put
      (quite handy for double checking error paths).
      
      For regular builds, the compiler should be able to eliminate the unused
      local variables and the program growth should be minimal. Fwiw, it came
      out as a net improvement as gcc was able to refactor rpm_get and
      rpm_get_if_in_use together,
      
      v2: Just s/rpm_put/rpm_put_unchecked/ everywhere, leaving the manual
      mark up for smaller more targeted patches.
      v3: Mention the cookie in Returns
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190114142129.24398-2-chris@chris-wilson.co.uk
      16e4dd03