radeon: don't use ring if cp not going

main
Dave Airlie 2008-08-04 14:56:08 +10:00
parent dff8485151
commit 29649ddede
1 changed files with 4 additions and 0 deletions

View File

@ -55,10 +55,14 @@ int radeon_invalidate_caches(struct drm_device * dev, uint64_t flags)
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
RING_LOCALS; RING_LOCALS;
if (!dev_priv->cp_running)
return 0;
BEGIN_RING(4); BEGIN_RING(4);
RADEON_FLUSH_CACHE(); RADEON_FLUSH_CACHE();
RADEON_FLUSH_ZCACHE(); RADEON_FLUSH_ZCACHE();
ADVANCE_RING(); ADVANCE_RING();
COMMIT_RING();
return 0; return 0;
} }