aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@linux.intel.com>2013-01-22 07:12:17 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-01-22 07:52:26 -0500
commit99433931950f33039d9e1a52b4ed9af3f1b58e84 (patch)
treeca18c2cbe0f14120fd298a7320cfaad95fc455a4 /drivers/gpu/drm/i915/i915_gem.c
parent5559ecadad5a73b27f863e92f4b4f369501dce6f (diff)
drm/i915: use gem_set_seqno() on hardware init
When machine was rebooted or module was reloaded, gem_hw_init() set last_seqno to be identical to next_seqno. This lead to situation that waits for first ever request always passed immediately regardless if it was actually executed. Use gem_set_seqno() to be consistent how hw is initialized on init, wrap and on resume. Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 5226ebcac33a..801f77ece72e 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3941,8 +3941,6 @@ i915_gem_init_hw(struct drm_device *dev)
3941 3941
3942 i915_gem_init_swizzling(dev); 3942 i915_gem_init_swizzling(dev);
3943 3943
3944 dev_priv->next_seqno = dev_priv->last_seqno = (u32)~0 - 0x1000;
3945
3946 ret = intel_init_render_ring_buffer(dev); 3944 ret = intel_init_render_ring_buffer(dev);
3947 if (ret) 3945 if (ret)
3948 return ret; 3946 return ret;
@@ -3959,6 +3957,10 @@ i915_gem_init_hw(struct drm_device *dev)
3959 goto cleanup_bsd_ring; 3957 goto cleanup_bsd_ring;
3960 } 3958 }
3961 3959
3960 ret = i915_gem_set_seqno(dev, ((u32)~0 - 0x1000));
3961 if (ret)
3962 return ret;
3963
3962 /* 3964 /*
3963 * XXX: There was some w/a described somewhere suggesting loading 3965 * XXX: There was some w/a described somewhere suggesting loading
3964 * contexts before PPGTT. 3966 * contexts before PPGTT.