From: Changbin Du Date: Mon, 30 Oct 2017 06:19:15 +0000 (+0800) Subject: drm/i915/gvt: Reduce rcs mocs switch latency X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ffe2a503b06cc300e25c1dfc00c85a2240cf97d7;p=openwrt%2Fstaging%2Fblogic.git drm/i915/gvt: Reduce rcs mocs switch latency Use I915_WRITE_FW instead of I915_WRITE to reduce overhead. The overall mmio switch latency lowers from ~600us to ~180us. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang --- diff --git a/drivers/gpu/drm/i915/gvt/render.c b/drivers/gpu/drm/i915/gvt/render.c index e16c3551b4a3..0672178548ef 100644 --- a/drivers/gpu/drm/i915/gvt/render.c +++ b/drivers/gpu/drm/i915/gvt/render.c @@ -209,7 +209,7 @@ static void load_mocs(struct intel_vgpu *vgpu, int ring_id) offset.reg = regs[ring_id]; for (i = 0; i < 64; i++) { gen9_render_mocs[ring_id][i] = I915_READ_FW(offset); - I915_WRITE(offset, vgpu_vreg(vgpu, offset)); + I915_WRITE_FW(offset, vgpu_vreg(vgpu, offset)); offset.reg += 4; }