Summary: | [845g regression] Suspend does not work on 845g with kernel 3.8.0-rc6 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | DRI | Reporter: | clockley1 <clockley1> | ||||||||||
Component: | DRM/Intel | Assignee: | Chris Wilson <chris> | ||||||||||
Status: | CLOSED WORKSFORME | QA Contact: | Intel GFX Bugs mailing list <intel-gfx-bugs> | ||||||||||
Severity: | normal | ||||||||||||
Priority: | high | CC: | ballogyor | ||||||||||
Version: | unspecified | ||||||||||||
Hardware: | Other | ||||||||||||
OS: | All | ||||||||||||
Whiteboard: | |||||||||||||
i915 platform: | i915 features: | ||||||||||||
Attachments: |
|
Description
clockley1
2013-05-15 02:14:37 UTC
How exactly does your machine go down when failing at suspend/resume? Hard-hang, only unuseable gpu or something else? To test whether disabling the mentioned patch fixes things you can change the - if (flags & I915_DISPATCH_PINNED) { + if (1) { condition in i830_dispatch_execbuffer. It wakes up but the screen is blank and the caps lock key does not work, did not test over network. To check the manual revert can you please try this diff on top of 3.10? diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index e51ab55..2f91c1f 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -1117,7 +1117,7 @@ i830_dispatch_execbuffer(struct intel_ring_buffer *ring, { int ret; - if (flags & I915_DISPATCH_PINNED) { + if (1 || flags & I915_DISPATCH_PINNED) { ret = intel_ring_begin(ring, 4); if (ret) return ret; (In reply to comment #3) > To check the manual revert can you please try this diff on top of 3.10? > > diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c > b/drivers/gpu/drm/i915/intel_ringbuffer.c > index e51ab55..2f91c1f 100644 > --- a/drivers/gpu/drm/i915/intel_ringbuffer.c > +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c > @@ -1117,7 +1117,7 @@ i830_dispatch_execbuffer(struct intel_ring_buffer > *ring, > { > int ret; > > - if (flags & I915_DISPATCH_PINNED) { > + if (1 || flags & I915_DISPATCH_PINNED) { > ret = intel_ring_begin(ring, 4); > if (ret) > return ret; Downloaded 'https://www.kernel.org/pub/linux/kernel/v3.x/testing/linux-3.10-rc6.tar.xz' and compiled with patch; this kernel does not even suspend. The screen stays on and displays screen corruption not unlike a hung gpu. Created attachment 81001 [details] [review] Workaround that works on my system This patch requires the "if (1 || flags & I915_DISPATCH_PINNED) {" patch. Created attachment 81002 [details] [review] next patch This patch requires the last patch. I have not thoroughly tested the patches. They may have intended side effects and probably break other hardware. *** Bug 66099 has been marked as a duplicate of this bug. *** Can you please try: diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/inte index 1d5d613..d1b3cc1 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -1715,7 +1715,9 @@ int intel_init_render_ring_buffer(struct drm_device *dev) struct drm_i915_gem_object *obj; int ret; - obj = i915_gem_alloc_object(dev, I830_BATCH_LIMIT); + obj = i915_gem_object_create_stolen(dev, I830_BATCH_LIMIT); + if (obj == NULL) + obj = i915_gem_alloc_object(dev, I830_BATCH_LIMIT); if (obj == NULL) { DRM_ERROR("Failed to allocate batch bo\n"); return -ENOMEM; Though I suspect we may need a SRC_COLOR command to clear the ring->private on every ring init. (In reply to comment #9) > Can you please try: > > diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c > b/drivers/gpu/drm/i915/inte > index 1d5d613..d1b3cc1 100644 > --- a/drivers/gpu/drm/i915/intel_ringbuffer.c > +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c > @@ -1715,7 +1715,9 @@ int intel_init_render_ring_buffer(struct drm_device > *dev) > struct drm_i915_gem_object *obj; > int ret; > > - obj = i915_gem_alloc_object(dev, I830_BATCH_LIMIT); > + obj = i915_gem_object_create_stolen(dev, I830_BATCH_LIMIT); > + if (obj == NULL) > + obj = i915_gem_alloc_object(dev, I830_BATCH_LIMIT); > if (obj == NULL) { > DRM_ERROR("Failed to allocate batch bo\n"); > return -ENOMEM; > > Though I suspect we may need a SRC_COLOR command to clear the ring->private > on every ring init. Sorry about the delay, unfortunately this patch does not work, at least on this machine. Created attachment 81948 [details] [review] fix up ring cleanup Can you please test the attached patch? Please test this on the first broken kernel, not the latest one in case we've accidentally broken something else in between. You need Daniel's ring cleanup patch, and I think (the second chunk) of: diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index d7ca64e..738f54b 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -1281,6 +1281,11 @@ static int intel_init_ring_buffer(struct drm_device *dev, return ret; } + /* Stop the ring if it's running. */ + I915_WRITE_CTL(ring, 0); + I915_WRITE_HEAD(ring, 0); + ring->write_tail(ring, 0); + obj = NULL; if (!HAS_LLC(dev)) obj = i915_gem_object_create_stolen(dev, ring->size); @@ -1821,10 +1826,17 @@ int intel_init_render_ring_buffer(struct drm_device *dev) return -ENOMEM; } - ret = i915_gem_object_pin(obj, 0, true, false); + ret = i915_gem_object_pin(obj, 0, false, false); if (ret != 0) { drm_gem_object_unreference(&obj->base); - DRM_ERROR("Failed to ping batch bo\n"); + DRM_ERROR("Failed to pin batch bo\n"); + return ret; + } + + ret = i915_gem_object_set_to_gtt_domain(obj, true); + if (ret) { + drm_gem_object_unreference(&obj->base); + DRM_ERROR("Failed to flush batch bo\n"); return ret; } Does that mean I get a tested-by from you Chris on my patch? In the maybe we need to clear the bounce buffer vein: commit 388b0e149e6de91b3800adbb5aa02f20b5a80e5d Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Thu Jul 11 11:34:42 2013 +0100 drm/i915: Clear the workaround batch bo for gen2 Can you please test with my userptr branch at http://cgit.freedesktop.org/~ickle/linux-2.6 ? No need to test as that branch died upon resume here. The resume from suspend is still broken on 845G with kernel version 3.10.5. I can't see anything, just a blank screen. The last working version is 3.7.10. Note to self, -nightly still broken. And there is a hang during suspend if using glxgears -fullscreen. The latest kernel from "http://cgit.freedesktop.org/~danvet/drm-intel/?h=drm-intel-next" works for me. (In reply to comment #18) > The latest kernel from > "http://cgit.freedesktop.org/~danvet/drm-intel/?h=drm-intel-next" works for > me. Are you happy to close this as working now but cause unknown? Sure, that's fine. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.