diff options
author | Mark Kettenis <kettenis@openbsd.org> | 2013-03-09 21:38:08 +0100 |
---|---|---|
committer | Mark Kettenis <kettenis@openbsd.org> | 2013-03-09 21:38:08 +0100 |
commit | 35757ab7fa0ade9db6531574db4adb9a343df11d (patch) | |
tree | b33c6fc06fba668a5d2f97046ce7eff2a6a6945d /sys/dev | |
parent | 83b3d2b7b6061bfa7d433fac12d52ba53307d5de (diff) |
Adjust timeout loops in the reset functions to match the 500ms timeout that
Linux uses.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/i915_drv.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c index cf890710068..fa0bc910edc 100644 --- a/sys/dev/pci/drm/i915_drv.c +++ b/sys/dev/pci/drm/i915_drv.c @@ -1899,10 +1899,10 @@ i965_do_reset(struct drm_device *dev) reg |= ((GRDOM_RENDER | GRDOM_RESET_ENABLE) << 24); pci_conf_write(dev_priv->pc, dev_priv->tag, I965_GDRST, reg); - for (retries = 50; retries > 0 ; retries--) { + for (retries = 500; retries > 0 ; retries--) { if (i965_reset_complete(dev)) break; - DELAY(100); + DELAY(1000); } if (retries == 0) { DRM_ERROR("965 reset timed out\n"); @@ -1914,10 +1914,10 @@ i965_do_reset(struct drm_device *dev) reg |= ((GRDOM_MEDIA | GRDOM_RESET_ENABLE) << 24); pci_conf_write(dev_priv->pc, dev_priv->tag, I965_GDRST, reg); - for (retries = 50; retries > 0 ; retries--) { + for (retries = 500; retries > 0 ; retries--) { if (i965_reset_complete(dev)) break; - DELAY(100); + DELAY(1000); } if (retries == 0) { DRM_ERROR("965 reset 2 timed out\n"); @@ -1937,10 +1937,10 @@ ironlake_do_reset(struct drm_device *dev) gdrst = I915_READ(MCHBAR_MIRROR_BASE + ILK_GDSR); I915_WRITE(MCHBAR_MIRROR_BASE + ILK_GDSR, gdrst | GRDOM_RENDER | GRDOM_RESET_ENABLE); - for (retries = 50; retries > 0 ; retries--) { + for (retries = 500; retries > 0 ; retries--) { if (I915_READ(MCHBAR_MIRROR_BASE + ILK_GDSR) & 0x1) break; - DELAY(100); + DELAY(1000); } if (retries == 0) { DRM_ERROR("ironlake reset timed out\n"); @@ -1951,10 +1951,10 @@ ironlake_do_reset(struct drm_device *dev) gdrst = I915_READ(MCHBAR_MIRROR_BASE + ILK_GDSR); I915_WRITE(MCHBAR_MIRROR_BASE + ILK_GDSR, gdrst | GRDOM_MEDIA | GRDOM_RESET_ENABLE); - for (retries = 50; retries > 0 ; retries--) { + for (retries = 500; retries > 0 ; retries--) { if (I915_READ(MCHBAR_MIRROR_BASE + ILK_GDSR) & 0x1) break; - DELAY(100); + DELAY(1000); } if (retries == 0) { DRM_ERROR("ironlake reset timed out\n"); @@ -1985,10 +1985,10 @@ gen6_do_reset(struct drm_device *dev) I915_WRITE_NOTRACE(GEN6_GDRST, GEN6_GRDOM_FULL); /* Spin waiting for the device to ack the reset request */ - for (retries = 50; retries > 0 ; retries--) { + for (retries = 500; retries > 0 ; retries--) { if ((I915_READ_NOTRACE(GEN6_GDRST) & GEN6_GRDOM_FULL) == 0) break; - DELAY(100); + DELAY(1000); } if (retries == 0) { DRM_ERROR("gen6 reset timed out\n"); |