1. 08 6月, 2017 3 次提交
    • C
      drm/i915/gvt: implement per-vm mmio switching optimization · 0e86cc9c
      Changbin Du 提交于
      Commit ab9da627906a ("drm/i915: make context status notifier head be
      per engine") gives us a chance to inspect every single request. Then
      we can eliminate unnecessary mmio switching for same vGPU. We only
      need mmio switching for different VMs (including host).
      
      This patch introduced a new general API intel_gvt_switch_mmio() to
      replace the old intel_gvt_load/restore_render_mmio(). This function
      can be further optimized for vGPU to vGPU switching.
      
      To support individual ring switch, we track the owner who occupy
      each ring. When another VM or host request a ring we do the mmio
      context switching. Otherwise no need to switch the ring.
      
      This optimization is very useful if only one guest has plenty of
      workloads and the host is mostly idle. The best case is no mmio
      switching will happen.
      
      v2:
        o fix missing ring switch issue. (chuanxiao)
        o support individual ring switch.
      Signed-off-by: NChangbin Du <changbin.du@intel.com>
      Reviewed-by: NChuanxiao Dong <chuanxiao.dong@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      0e86cc9c
    • C
      drm/i915/gvt: refactor function intel_vgpu_submit_execlist · 5d0f5de1
      Changbin Du 提交于
      The function intel_vgpu_submit_execlist could be more simpler. It
      actually does:
        1) validate the submission. The first context must be valid,
           and all two must be privilege_access.
        2) submit valid contexts. The first one need emulate schedule_in.
      
      We do not need a bitmap, valid desc copy valid_desc. Local variable
      emulate_schedule_in also can be optimized out.
      
      v2: dump desc content in err msg (Zhi Wang)
      Signed-off-by: NChangbin Du <changbin.du@intel.com>
      Reviewed-by: NZhi Wang <zhi.a.wang@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      5d0f5de1
    • C
      drm/i915/gvt: rewrite the trace gvt:gvt_command using trace style approach · ffc19776
      Changbin Du 提交于
      The gvt:gvt_command trace involve unnecessary overhead even this trace is
      not enabled. We need improve it.
      
      The kernel trace infrastructure provide a full api to define a trace event.
      We should leverage them if possible. And one important thing is that a trace
      point should store raw data but not format string.
      
      This patch include two part work:
      1) Refactor the gvt_command trace definition, including:
        o only store raw trace data.
        o use __dynamic_array() to declare a variable size buffer.
        o use __print_array() to format raw cmd data.
        o rename vm_id as vgpu_id.
      
      2) Improve the trace invoking, including:
        o remove the cycles calculation for handler. We can get this data
          by any perf tool.
        o do not make a backup for raw cmd data which just doesn't make sense.
      
      With this patch, this trace has no overhead if it is not enabled. And we are
      trace style now.
      
      The final output example:
        gvt workload 0-211   [000] ...1   120.555964: gvt_command: vgpu1 ring 0: buf_type 0, ip_gma e161e880, raw cmd {0x4000000}
        gvt workload 0-211   [000] ...1   120.556014: gvt_command: vgpu1 ring 0: buf_type 0, ip_gma e161e884, raw cmd {0x7a000004,0x1004000,0xe1511018,0x0,0x7d,0x0}
        gvt workload 0-211   [000] ...1   120.556062: gvt_command: vgpu1 ring 0: buf_type 0, ip_gma e161e89c, raw cmd {0x7a000004,0x140000,0x0,0x0,0x0,0x0}
        gvt workload 0-211   [000] ...1   120.556110: gvt_command: vgpu1 ring 0: buf_type 0, ip_gma e161e8b4, raw cmd {0x10400002,0xe1511018,0x0,0x7d}
      Signed-off-by: NChangbin Du <changbin.du@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      ffc19776
  2. 29 5月, 2017 1 次提交
  3. 26 5月, 2017 8 次提交
  4. 25 5月, 2017 1 次提交
    • J
      drm/i915: Serialize GTT/Aperture accesses on BXT · 0ef34ad6
      Jon Bloomfield 提交于
      BXT has a H/W issue with IOMMU which can lead to system hangs when
      Aperture accesses are queued within the GAM behind GTT Accesses.
      
      This patch avoids the condition by wrapping all GTT updates in stop_machine
      and using a flushing read prior to restarting the machine.
      
      The stop_machine guarantees no new Aperture accesses can begin while
      the PTE writes are being emmitted. The flushing read ensures that
      any following Aperture accesses cannot begin until the PTE writes
      have been cleared out of the GAM's fifo.
      
      Only FOLLOWING Aperture accesses need to be separated from in flight
      PTE updates. PTE Writes may follow tightly behind already in flight
      Aperture accesses, so no flushing read is required at the start of
      a PTE update sequence.
      
      This issue was reproduced by running
      	igt/gem_readwrite and
      	igt/gem_render_copy
      simultaneously from different processes, each in a tight loop,
      with INTEL_IOMMU enabled.
      
      This patch was originally published as:
      	drm/i915: Serialize GTT Updates on BXT
      
      v2: Move bxt/iommu detection into static function
          Remove #ifdef CONFIG_INTEL_IOMMU protection
          Make function names more reflective of purpose
          Move flushing read into static function
      
      v3: Tidy up for checkpatch.pl
      
      Testcase: igt/gem_concurrent_blit
      Signed-off-by: NJon Bloomfield <jon.bloomfield@intel.com>
      Cc: John Harrison <john.C.Harrison@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1495641251-30022-1-git-send-email-jon.bloomfield@intel.comReviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      0ef34ad6
  5. 24 5月, 2017 2 次提交
  6. 23 5月, 2017 2 次提交
  7. 22 5月, 2017 3 次提交
  8. 20 5月, 2017 1 次提交
  9. 19 5月, 2017 7 次提交
  10. 18 5月, 2017 12 次提交