[Bug 105539] rc6 enablement fails in suspend resume stress test

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Mar 16 08:32:03 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=105539

Abhijeet Kumar <abhijeet.kumar at intel.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|medium                      |high
           Severity|normal                      |major

--- Comment #1 from Abhijeet Kumar <abhijeet.kumar at intel.com> ---
Way to repro on Ubuntu is use the script below and the attached patch which has
RC6 and DC6 counter status 


while true; do
    echo 0 > /sys/class/rtc/rtc0/wakealarm
    echo `date '+%s' -d '+ 3 seconds'` > /sys/class/rtc/rtc0/wakealarm
    dmesg|grep "DC6" |tail -1
    # sleep 1 #with and without commenting this line
    echo freeze >/sys/power/state
done

In failure case both DC6 and RC6 residency counter wouldn't have incremented.
Example-
2018-02-23T03:12:24.348124-08:00 INFO kernel: [ 480.779917] i915 0000:00:02.0:
Abhijeet: PM residency counters DC5=(0001bc43->0001bc45)
DC6=(0001bbbb->0001bbbb) RC6=(15b1c57c->15b1c57c)


in the above stress test , RC6 is getting disabled which is leading to soix
failure. By making below changes , system is able to enter RC6. Our analysis is
that the resume was called, so RC6 was disabled and system tried to enter
suspend again , where RC6 was not enabled from i915_gem_do_execbuffer.

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 5fdd2414ca31..cebf0fb67f81 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1843,6 +1843,7 @@ static int i915_pm_suspend(struct device *kdev)
 {
        struct pci_dev *pdev = to_pci_dev(kdev);
        struct drm_device *dev = pci_get_drvdata(pdev);
+       struct drm_i915_private *dev_priv = to_i915(dev);

        if (!dev) {
                dev_err(kdev, "DRM not initialized, aborting suspend.\n");
@@ -1852,13 +1853,28 @@ static int i915_pm_suspend(struct device *kdev)
        if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
                return 0;

+     printk(KERN_ERR "Abhijeet RC6 state =  0x%08x\n",
(I915_READ(GEN6_RC_CONTROL) & GEN6_RC_CTL_HW_ENABLE));
+       intel_enable_gt_powersave(dev_priv);
+
+
        return i915_drm_suspend(dev);
 }

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are on the CC list for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20180316/b45673cd/attachment-0001.html>


More information about the intel-gfx-bugs mailing list