drm/i915/gvt: set the correct default value of CTX STATUS PTR
authorMin He <min.he@intel.com>
Thu, 6 Apr 2017 03:01:45 +0000 (11:01 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Thu, 6 Apr 2017 03:08:04 +0000 (11:08 +0800)
Fix wrong initial csb read pointer value. This fixes the random
engine timeout issue in guest when guest boots up.

Fixes: 8453d674ae7e ("drm/i915/gvt: vGPU execlist virtualization")
Cc: stable@vger.kernel.org # v4.10+
Signed-off-by: Min He <min.he@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/execlist.c

index f1f426a97aa9d43826010d7be90f6bffdbe59426..d186c157f65fefe3c64b45b86f0ffa6ab824df2f 100644 (file)
@@ -775,7 +775,8 @@ static void init_vgpu_execlist(struct intel_vgpu *vgpu, int ring_id)
                        _EL_OFFSET_STATUS_PTR);
 
        ctx_status_ptr.dw = vgpu_vreg(vgpu, ctx_status_ptr_reg);
-       ctx_status_ptr.read_ptr = ctx_status_ptr.write_ptr = 0x7;
+       ctx_status_ptr.read_ptr = 0;
+       ctx_status_ptr.write_ptr = 0x7;
        vgpu_vreg(vgpu, ctx_status_ptr_reg) = ctx_status_ptr.dw;
 }