|
@@ -1105,7 +1105,13 @@ bool nouveau_wait_until(struct drm_device *dev, uint64_t timeout,
|
|
|
/* Waits for PGRAPH to go completely idle */
|
|
|
bool nouveau_wait_for_idle(struct drm_device *dev)
|
|
|
{
|
|
|
- if (!nv_wait(dev, NV04_PGRAPH_STATUS, 0xffffffff, 0x00000000)) {
|
|
|
+ struct drm_nouveau_private *dev_priv = dev->dev_private;
|
|
|
+ uint32_t mask = ~0;
|
|
|
+
|
|
|
+ if (dev_priv->card_type == NV_40)
|
|
|
+ mask &= ~NV40_PGRAPH_STATUS_SYNC_STALL;
|
|
|
+
|
|
|
+ if (!nv_wait(dev, NV04_PGRAPH_STATUS, mask, 0)) {
|
|
|
NV_ERROR(dev, "PGRAPH idle timed out with status 0x%08x\n",
|
|
|
nv_rd32(dev, NV04_PGRAPH_STATUS));
|
|
|
return false;
|