summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gvt/render.c
diff options
context:
space:
mode:
authorChangbin Du <changbin.du@intel.com>2017-12-08 09:56:22 +0300
committerZhenyu Wang <zhenyuw@linux.intel.com>2017-12-08 11:18:26 +0300
commitcf27b950346d5201c291c4e189ed1436a136ae4d (patch)
tree768dc1324b3091c0352880b02465bc398e42d53e /drivers/gpu/drm/i915/gvt/render.c
parent83164886e4559f87015a33780852a64cdd6e4e50 (diff)
downloadlinux-cf27b950346d5201c291c4e189ed1436a136ae4d.tar.xz
drm/i915/gvt: Remove MMIO barrier in MMIO switch
After engine mmio switched, software still need write workload submission registers. So we can remove the MMIO barriar in MMIO switch. Signed-off-by: Changbin Du <changbin.du@intel.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/render.c')
-rw-r--r--drivers/gpu/drm/i915/gvt/render.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/gpu/drm/i915/gvt/render.c b/drivers/gpu/drm/i915/gvt/render.c
index 3e675f81815f..4c8e1285c607 100644
--- a/drivers/gpu/drm/i915/gvt/render.c
+++ b/drivers/gpu/drm/i915/gvt/render.c
@@ -275,7 +275,6 @@ static void switch_mmio_to_vgpu(struct intel_vgpu *vgpu, int ring_id)
u32 ctx_ctrl = reg_state[CTX_CONTEXT_CONTROL_VAL];
u32 inhibit_mask =
_MASKED_BIT_ENABLE(CTX_CTRL_ENGINE_CTX_RESTORE_INHIBIT);
- i915_reg_t last_reg = _MMIO(0);
struct engine_mmio *mmio;
u32 v;
@@ -305,17 +304,12 @@ static void switch_mmio_to_vgpu(struct intel_vgpu *vgpu, int ring_id)
v = vgpu_vreg(vgpu, mmio->reg);
I915_WRITE_FW(mmio->reg, v);
- last_reg = mmio->reg;
trace_render_mmio(vgpu->id, "load",
i915_mmio_reg_offset(mmio->reg),
mmio->value, v);
}
- /* Make sure the swiched MMIOs has taken effect. */
- if (likely(i915_mmio_reg_offset(last_reg)))
- I915_READ_FW(last_reg);
-
handle_tlb_pending_event(vgpu, ring_id);
}
@@ -323,7 +317,6 @@ static void switch_mmio_to_vgpu(struct intel_vgpu *vgpu, int ring_id)
static void switch_mmio_to_host(struct intel_vgpu *vgpu, int ring_id)
{
struct drm_i915_private *dev_priv = vgpu->gvt->dev_priv;
- i915_reg_t last_reg = _MMIO(0);
struct engine_mmio *mmio;
u32 v;
@@ -347,16 +340,11 @@ static void switch_mmio_to_host(struct intel_vgpu *vgpu, int ring_id)
continue;
I915_WRITE_FW(mmio->reg, v);
- last_reg = mmio->reg;
trace_render_mmio(vgpu->id, "restore",
i915_mmio_reg_offset(mmio->reg),
mmio->value, v);
}
-
- /* Make sure the swiched MMIOs has taken effect. */
- if (likely(i915_mmio_reg_offset(last_reg)))
- I915_READ_FW(last_reg);
}
/**