1. 21 5月, 2019 1 次提交
    • 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
  2. 05 5月, 2019 1 次提交
    • C
      drm/i915/gvt: Add in context mmio 0x20D8 to gen9 mmio list · 75fdb811
      Colin Xu 提交于
      Depends on GEN family and I915_PARAM_HAS_CONTEXT_ISOLATION, Mesa driver
      will decide whether constant buffer 0 address is relative or absolute,
      and load GPU initial state by lri to context mmio INSTPM (GEN8)
      or 0x20D8 (>=GEN9).
      Mesa Commit fa8a764b62
      ("i965: Use absolute addressing for constant buffer 0 on Kernel 4.16+.")
      
      INSTPM is already added to gen8_engine_mmio_list, but 0x20D8 is missed
      in gen9_engine_mmio_list. From GVT point of view, different guest could
      have different context so should switch those mmio accordingly.
      
      v2: Update fixes commit ID.
      
      Fixes: 17865713 ("drm/i915/gvt: vGPU context switch")
      Reviewed-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: NColin Xu <colin.xu@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      (cherry picked from commit 1e8b15a1)
      75fdb811
  3. 16 4月, 2019 1 次提交
  4. 27 3月, 2019 1 次提交
  5. 21 3月, 2019 1 次提交
  6. 08 3月, 2019 1 次提交
  7. 06 3月, 2019 1 次提交
  8. 22 2月, 2019 1 次提交
    • C
      drm/i915/gvt: Add in context mmio 0x20D8 to gen9 mmio list · 1e8b15a1
      Colin Xu 提交于
      Depends on GEN family and I915_PARAM_HAS_CONTEXT_ISOLATION, Mesa driver
      will decide whether constant buffer 0 address is relative or absolute,
      and load GPU initial state by lri to context mmio INSTPM (GEN8)
      or 0x20D8 (>=GEN9).
      Mesa Commit fa8a764b62
      ("i965: Use absolute addressing for constant buffer 0 on Kernel 4.16+.")
      
      INSTPM is already added to gen8_engine_mmio_list, but 0x20D8 is missed
      in gen9_engine_mmio_list. From GVT point of view, different guest could
      have different context so should switch those mmio accordingly.
      
      v2: Update fixes commit ID.
      
      Fixes: 17865713 ("drm/i915/gvt: vGPU context switch")
      Reviewed-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: NColin Xu <colin.xu@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      1e8b15a1
  9. 10 1月, 2019 1 次提交
  10. 12 11月, 2018 1 次提交
  11. 31 10月, 2018 1 次提交
  12. 30 8月, 2018 1 次提交
  13. 07 8月, 2018 1 次提交
  14. 05 7月, 2018 1 次提交
  15. 13 6月, 2018 1 次提交
  16. 18 5月, 2018 1 次提交
  17. 30 4月, 2018 1 次提交
  18. 09 3月, 2018 1 次提交
    • X
      drm/i915/gvt: Add runtime_pm_get/put into gvt_switch_mmio · b24881e0
      Xiong Zhang 提交于
      If user continuously create vgpu, boot guest, shoutdown guest and destroy
      vgpu from remote, the following calltrace exists in dmesg sometimes:
      [ 6412.954721] RPM wakelock ref not held during HW access
      [ 6412.954795] WARNING: CPU: 7 PID: 11941 at
      linux/drivers/gpu/drm/i915/intel_drv.h:1800
      intel_uncore_forcewake_get.part.7+0x96/0xa0 [i915]
      [ 6412.954915] Call Trace:
      [ 6412.954951] intel_uncore_forcewake_get+0x18/0x20 [i915]
      [ 6412.954989] intel_gvt_switch_mmio+0x8e/0x770 [i915]
      [ 6412.954996] ? __slab_free+0x14d/0x2c0
      [ 6412.955001] ? __slab_free+0x14d/0x2c0
      [ 6412.955006] ? __slab_free+0x14d/0x2c0
      [ 6412.955041] intel_vgpu_stop_schedule+0x92/0xd0 [i915]
      [ 6412.955073] intel_gvt_deactivate_vgpu+0x48/0x60 [i915]
      [ 6412.955078] __intel_vgpu_release+0x55/0x260 [kvmgt]
      
      when this happens, gvt_switch_mmio is called at vgpu destroy, host i915 is
      idle and doesn't hold RPM wakelock, igd is in powersave mode, but
      gvt_switch_mmio require igd power on to access register, so
      intel_runtime_pm_get should be added to make sure igd power on before
      gvt_switch_mmio.
      
      v2: Move runtime_pm_get/put into gvt_switch_mmio.(Zhenyu)
      Signed-off-by: NXiong Zhang <xiong.y.zhang@intel.com>
      Signed-off-by: NZhi Wang <zhi.a.wang@intel.com>
      b24881e0
  19. 06 3月, 2018 3 次提交
  20. 14 2月, 2018 1 次提交
  21. 01 2月, 2018 2 次提交
  22. 22 12月, 2017 1 次提交
    • Z
      drm/i915/gvt: cleanup usage for typed mmio reg vs. offset · 90551a12
      Zhenyu Wang 提交于
      We had previous hack that tried to accept either i915_reg_t or offset
      value to access vGPU virtual/shadow regs which broke that purpose to
      be type safe in context. This one trys to explicitly separate the usage
      of typed mmio reg with real offset.
      
      Old vgpu_vreg(offset) helper is used only for offset now with new
      vgpu_vreg_t(reg) is used for i915_reg_t only. Convert left usage
      of that to new helper.
      
      Also fixed left KASAN warning issues caused by previous hack.
      
      v2: rebase, fixup against recent mmio switch change
      Reviewed-by: NZhi Wang <zhi.a.wang@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      90551a12
  23. 18 12月, 2017 4 次提交
  24. 08 12月, 2017 4 次提交
  25. 21 11月, 2017 1 次提交
  26. 16 11月, 2017 3 次提交
  27. 22 9月, 2017 1 次提交
  28. 10 8月, 2017 2 次提交