CHERRY-PICK: drm/i915: Add wait_for in init_ring_common
authorSean Paul <seanpaul@chromium.org>
Fri, 16 Mar 2012 16:43:22 +0000 (12:43 -0400)
committerGrant Grundler <grundler@google.com>
Thu, 24 May 2012 22:06:11 +0000 (15:06 -0700)
commit370aa737e3dc8cc788a15ef5da850739306b46c0
tree0a14658dcb3e4b8c20a4f8681fbef594f8f16d8e
parent11320a5e86071aa9f83265da946efa61bf2f1415
CHERRY-PICK: drm/i915: Add wait_for in init_ring_common

I have seen a number of "blt ring initialization failed" messages
where the ctl or start registers are not the correct value. Upon further
inspection, if the code just waited a little bit, it would read the
correct value. Adding the wait_for to these reads should eliminate the
issue.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit f01db988ef6f6c70a6cc36ee71e4a98a68901229)

TEST=Tested on lumpy with 1000's of suspend/resume cycles
BUG=chrome-os-partner:8366

Change-Id: I9544a5a65efb0775302ccf001d4dc1b43a429963
Reviewed-on: https://gerrit.chromium.org/gerrit/18459
Tested-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Ready: Sean Paul <seanpaul@chromium.org>
drivers/gpu/drm/i915/intel_ringbuffer.c