diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2010-03-29 00:56:01 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2010-03-29 00:56:01 +0000 |
commit | 60b6125f1ad61de92915c9f04172ce8aa7276009 (patch) | |
tree | 3187b8683f7809af71b14770f5ef099d7bcf9b25 | |
parent | e2c630159c40548728c6246d7c2958b6af543a45 (diff) |
Don't try and idle the engine via the ring if the cp is not running.
It means we've cleaned up the ring and bad things will happen (like
panics) on X closedown.
tested by (and ok) beck@
-rw-r--r-- | sys/dev/pci/drm/radeon_cp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/radeon_cp.c b/sys/dev/pci/drm/radeon_cp.c index fde2ff13bd2..00fa0f221c7 100644 --- a/sys/dev/pci/drm/radeon_cp.c +++ b/sys/dev/pci/drm/radeon_cp.c @@ -1924,6 +1924,8 @@ radeon_do_cp_idle(drm_radeon_private_t *dev_priv) { DRM_DEBUG("\n"); + if (dev_priv->cp_running == 0) + return (0); if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) { BEGIN_RING(5); |