summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroga <oga@openbsd.org>2010-03-29 00:56:00 +0000
committeroga <oga@openbsd.org>2010-03-29 00:56:00 +0000
commit335dae028acc79d2b78309ea54ec9de294183a97 (patch)
tree466d66923cc0cff10a72b1e19873cbafbb2e0439
parent- add another check in decrypt_internal_special() (diff)
downloadwireguard-openbsd-335dae028acc79d2b78309ea54ec9de294183a97.tar.xz
wireguard-openbsd-335dae028acc79d2b78309ea54ec9de294183a97.zip
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.c2
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);