Bug 69837

Summary: [HSW bisected]Resume from S3 causes garbage on screen
Product: DRI Reporter: cancan,feng <cancan.feng>
Component: DRM/IntelAssignee: Intel GFX Bugs mailing list <intel-gfx-bugs>
Status: CLOSED DUPLICATE QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: major    
Priority: high CC: intel-gfx-bugs
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
dmesg of system booting and S3
none
picture of garbage on screen none

Description cancan,feng 2013-09-26 07:13:34 UTC
Created attachment 86619 [details]
dmesg of system booting and S3

Bug detailed description:
--------------------------------------------
Resume from S3 will cause garbage on screen, just like the picture which I attached. This is a regression, I have bisected it on -next-queued branch. I will attach the whole dmesg of system booting and S3, in which you can find the details.

Bisect result:
--------------------------------------------
c6916417c8575637659686ff0e4f744babf0cb4e is the first bad commit
commit c6916417c8575637659686ff0e4f744babf0cb4e
Author: Ben Widawsky <ben@bwidawsk.net>
Date:   Tue Sep 24 09:58:00 2013 -0700

    drm/i915: Use the new vm [un]bind functions

Reproduce Steps:
---------------------------------------------
1. boot machine
2. echo mem > /sys/power/state
Comment 1 cancan,feng 2013-09-26 07:19:05 UTC
Created attachment 86620 [details]
picture of garbage on screen
Comment 2 Chris Wilson 2013-09-26 07:51:50 UTC
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index e763d48..f989b42 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -509,7 +509,7 @@ void i915_gem_restore_gtt_mappings(struct drm_device *dev)
                struct i915_vma *vma = i915_gem_obj_to_vma(obj,
                                                           &dev_priv->gtt.base);
                i915_gem_clflush_object(obj, obj->pin_display);
-               vma->vm->bind_vma(vma, obj->cache_level, 0);
+               vma->vm->bind_vma(vma, obj->cache_level, obj->has_global_gtt_mapping ? GLOBAL_BIND : 0);
        }
Comment 3 cancan,feng 2013-09-26 08:16:09 UTC
(In reply to comment #2)
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c
> b/drivers/gpu/drm/i915/i915_gem_gtt.c
index e763d48..f989b42 100644
---
> a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++
> b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -509,7 +509,7 @@ void
> i915_gem_restore_gtt_mappings(struct drm_device *dev)
                struct
> i915_vma *vma = i915_gem_obj_to_vma(obj,
                                   
> &dev_priv->gtt.base);
                i915_gem_clflush_object(obj,
> obj->pin_display);
-               vma->vm->bind_vma(vma, obj->cache_level,
> 0);
+               vma->vm->bind_vma(vma, obj->cache_level,
> obj->has_global_gtt_mapping ? GLOBAL_BIND : 0);
        }


It doesn't work..
Comment 4 Chris Wilson 2013-09-27 10:30:50 UTC

*** This bug has been marked as a duplicate of bug 69834 ***
Comment 5 Elizabeth 2017-10-06 14:42:47 UTC
Closing old verified.

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.