drm/i915: read HEAD register back in init_ring_common() to enforce ordering
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / drm / i915 / intel_ringbuffer.c
index 629527d205de88dbe1463b9a127987ceafde9dc1..4605c3877c955cc7374583df3b37784e1cd34056 100644 (file)
@@ -396,6 +396,9 @@ static int init_ring_common(struct intel_ring_buffer *ring)
                }
        }
 
+       /* Enforce ordering by reading HEAD register back */
+       I915_READ_HEAD(ring);
+
        /* Initialize the ring. This must happen _after_ we've cleared the ring
         * registers with the above sequence (the readback of the HEAD registers
         * also enforces ordering), otherwise the hw might lose the new ring