drm/radeon/kms: wait for cp idle before stopping it.
authorJerome Glisse <jglisse@redhat.com>
Wed, 9 Sep 2009 20:23:45 +0000 (22:23 +0200)
committerDave Airlie <airlied@redhat.com>
Thu, 10 Sep 2009 00:12:41 +0000 (10:12 +1000)
commit45600232b3dbb97817c9e15de848c742901893e1
treedc8953d21cfc3d48faedcabef87e62dee3242ee1
parent5d93b135fc051be3740cbe55729fc7b86a7069d7
drm/radeon/kms: wait for cp idle before stopping it.

If we stop CP and that it's still processing thing GPU hang might
happen, this patch wait for CP idle (the wait can timeout) so we
can avoid shutting down CP at bad time. This is especialy usefull
when reseting the GPU as it seems GPU reset fails to properly reset
CP when the CP wasn't stop after being idle.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/r100.c
drivers/gpu/drm/radeon/r100d.h