Bug 78687

Summary: [All]Subcases dpms-lpsp and dpms-non-lpsp of igt/pm_pc8 fail
Product: DRI Reporter: Guo Jinxian <jinxianx.guo>
Component: DRM/IntelAssignee: Intel GFX Bugs mailing list <intel-gfx-bugs>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium CC: intel-gfx-bugs, james.ausmus, przanoni, yi.sun
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
dmesg none

Description Guo Jinxian 2014-05-14 08:18:29 UTC
==System Environment==
--------------------------
Regression: No. 
These case were not support before

Non-working platforms: BYT

==kernel==
--------------------------
-nightly: 2be456541ea41728002ccca2de5235f48d14326e (fails)
-queued: 70e1e0ec02dfe93650fb2c70824dc81e3eb5b2cc (fails)
    Author: Damien Lespiau <damien.lespiau@intel.com>
    Date:   Tue May 13 23:32:24 2014 +0100

    drm/i915: Use for_each_crtc() when iterating through the CRTCs

    Patch done using the following semantic patch (thanks Daniel for the
    help!)

      @@
      iterator name list_for_each_entry;
      iterator name for_each_crtc;
      struct drm_crtc * crtc;
      struct drm_device * dev;
      @@
      -list_for_each_entry(crtc,&dev->mode_config.crtc_list, head) {
      +for_each_crtc(dev,crtc) {
        ...
      }

    Followed by a couple of fixups by hand (that spatch doesn't match the
    cases where list_for_each_entry() is not followed by a set of '{', '}',
    but I couldn't figure out a way to leave the '{' out of the iterator
    match).

    Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

-fixes: 05adaf1f101f25f40f12c29403e6488f0e45f6b6 (skips)
    Author: Jani Nikula <jani.nikula@intel.com>
    Date:   Fri May 9 14:52:34 2014 +0300

    drm/i915/vlv: reset VLV media force wake request register

    Media force wake get hangs the machine when the system is booted without
    displays attached. The assumption is that (at least some versions of)
    the firmware has skipped some initialization in that case.

    Empirical evidence suggests we need to reset the media force wake
    request register in addition to the render one to avoid hangs.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75895
    Reported-by: Imre Deak <imre.deak@intel.com>
    Reported-by: Darren Hart <dvhart@linux.intel.com>
    Tested-by: Darren Hart <dvhart@linux.intel.com>
    Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Jani Nikula <jani.nikula@intel.com>

==Bug detailed description==
-----------------------------
Subcases dpms-lpsp and dpms-non-lpsp of igt/pm_pc8 fail

Output:
./pm_pc8 --run-subtest dpms-non-lpsp
IGT-Version: 1.6-gd848a36 (x86_64) (Linux: 3.15.0-rc3_drm-intel-nightly_2be456_20140514+ x86_64)
Runtime PM support: 1
PC8 residency support: 0
Test assertion failure function modeset_subtest, file pm_pc8.c:846:
Last errno: 2, No such file or directory
Failed assertion: wait_for_suspended()
Subtest dpms-non-lpsp: FAIL

==Reproduce steps==
---------------------------- 
1. ./pm_pc8 --run-subtest dpms-non-lpsp
Comment 1 Guo Jinxian 2014-05-14 08:25:11 UTC
Created attachment 99017 [details]
dmesg
Comment 2 Imre Deak 2014-05-14 11:41:36 UTC
For the record: this should fail for all platforms not just BYT. (and will be fixed after merging Daniel's DPMS RPM patchset).
Comment 3 Daniel Vetter 2014-05-15 14:15:30 UTC
Yeah this will be fixed with my runtime pm for dpms series on all platforms.

BDW will also start failing here as soon as we enable runtime pm again.
Comment 4 Jani Nikula 2014-09-05 13:39:48 UTC
Please re-test with current drm-intel-nightly.
Comment 5 Guo Jinxian 2014-09-10 02:37:21 UTC
(In reply to comment #4)
> Please re-test with current drm-intel-nightly.

Test passed on HSW
[root@x-hsw24 tests]# ./pm_rpm --run-subtest dpms-non-lpsp
IGT-Version: 1.8-gd9d3f4b (x86_64) (Linux: 3.17.0-rc4_drm-intel-nightly_4a3d32_20140909+ x86_64)
Runtime PM support: 1
PC8 residency support: 0
Subtest dpms-non-lpsp: SUCCESS (1.151s)

Test skipped on BYT BDW and BSW
root@x-bdw05:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./pm_rpm --run-subtest dpms-non-lpsp
IGT-Version: 1.8-gd9d3f4b (x86_64) (Linux: 3.17.0-rc4_drm-intel-nightly_4a3d32_20140909+ x86_64)
Test requirement not met in function setup_environment, file pm_rpm.c:720:
Test requirement: drmSetMaster(drm_fd) == 0
Can't become DRM master, please check if no other DRM client is running.
Last errno: 22, Invalid argument
Subtest dpms-non-lpsp: SKIP

[root@x-bsw01 tests]# ./pm_rpm --run-subtest dpms-non-lpsp
IGT-Version: 1.8-gd9d3f4b (x86_64) (Linux: 3.17.0-rc4_drm-intel-nightly_4a3d32_20140909+ x86_64)
Runtime PM support: 1
PC8 residency support: 0
Test requirement not met in function modeset_subtest, file pm_rpm.c:790:
Test requirement: enable_one_screen_with_type(&ms_data, type)
Last errno: 2, No such file or directory
Subtest dpms-non-lpsp: SKIP (0.501s)

root@x-bytm02:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./pm_rpm --run-subtest dpms-non-lpsp
IGT-Version: 1.8-gd9d3f4b (x86_64) (Linux: 3.17.0-rc4_drm-intel-nightly_4a3d32_20140909+ x86_64)
Runtime PM support: 1
PC8 residency support: 0
Test requirement not met in function modeset_subtest, file pm_rpm.c:790:
Test requirement: enable_one_screen_with_type(&ms_data, type)
Last errno: 2, No such file or directory
Subtest dpms-non-lpsp: SKIP (0.668s)
Comment 6 Paulo Zanoni 2014-10-08 21:10:09 UTC
(In reply to Guo Jinxian from comment #5)
> (In reply to comment #4)
> > Please re-test with current drm-intel-nightly.
> 
> Test passed on HSW
> [root@x-hsw24 tests]# ./pm_rpm --run-subtest dpms-non-lpsp
> IGT-Version: 1.8-gd9d3f4b (x86_64) (Linux:
> 3.17.0-rc4_drm-intel-nightly_4a3d32_20140909+ x86_64)
> Runtime PM support: 1
> PC8 residency support: 0
> Subtest dpms-non-lpsp: SUCCESS (1.151s)

This is the expected case with the current tree :)

> 
> Test skipped on BYT BDW and BSW
> root@x-bdw05:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./pm_rpm
> --run-subtest dpms-non-lpsp
> IGT-Version: 1.8-gd9d3f4b (x86_64) (Linux:
> 3.17.0-rc4_drm-intel-nightly_4a3d32_20140909+ x86_64)
> Test requirement not met in function setup_environment, file pm_rpm.c:720:
> Test requirement: drmSetMaster(drm_fd) == 0
> Can't become DRM master, please check if no other DRM client is running.

This means that there's a problem in your testing environment: some other application needs to be killed. Please retest.
(I recently sent an email to Gordon Jin with a possible BKM to share with QA regarding this error message)

> Last errno: 22, Invalid argument
> Subtest dpms-non-lpsp: SKIP
> 
> [root@x-bsw01 tests]# ./pm_rpm --run-subtest dpms-non-lpsp
> IGT-Version: 1.8-gd9d3f4b (x86_64) (Linux:
> 3.17.0-rc4_drm-intel-nightly_4a3d32_20140909+ x86_64)
> Runtime PM support: 1
> PC8 residency support: 0
> Test requirement not met in function modeset_subtest, file pm_rpm.c:790:
> Test requirement: enable_one_screen_with_type(&ms_data, type)
> Last errno: 2, No such file or directory
> Subtest dpms-non-lpsp: SKIP (0.501s)

This means you don't have any attached screens that are either DP, HDMI or VGA. The "lpsp" test needs an eDP output, the "non-lpsp" test needs non-eDP outputs.

> 
> root@x-bytm02:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./pm_rpm
> --run-subtest dpms-non-lpsp
> IGT-Version: 1.8-gd9d3f4b (x86_64) (Linux:
> 3.17.0-rc4_drm-intel-nightly_4a3d32_20140909+ x86_64)
> Runtime PM support: 1
> PC8 residency support: 0
> Test requirement not met in function modeset_subtest, file pm_rpm.c:790:
> Test requirement: enable_one_screen_with_type(&ms_data, type)
> Last errno: 2, No such file or directory
> Subtest dpms-non-lpsp: SKIP (0.668s)

Same thing here.

Considering that we merged Daniel's DPMS work a long time ago, and that the expectation is that everything works fine, I really think we should close this bug report, and then consider any other possible failures regarding the "dpms" tests as new bugs.
Comment 7 Guo Jinxian 2014-10-13 03:21:05 UTC
On latest -nightly(ea4bec8e96ea8b33b49a7892c1c7f20041a56da6), the test result on attached screen device passes, if doesn't attached screen, the result skips. Verified.

[root@x-hsw24 tests]# ./pm_rpm --run-subtest dpms-non-lpsp
IGT-Version: 1.8-gb23329f (x86_64) (Linux: 3.17.0_drm-intel-nightly_ea4bec_20141009+ x86_64)
Runtime PM support: 1
PC8 residency support: 0
Subtest dpms-non-lpsp: SUCCESS (1.125s)

root@x-bdw05:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./pm_rpm --run-subtest dpms-non-lpsp
IGT-Version: 1.8-gb7d80d1 (x86_64) (Linux: 3.17.0_drm-intel-nightly_ead7d7_20141013+ x86_64)
Runtime PM support: 1
PC8 residency support: 1
Test requirement not met in function modeset_subtest, file pm_rpm.c:786:
Test requirement: enable_one_screen_with_type(&ms_data, type)
Last errno: 2, No such file or directory
Subtest dpms-non-lpsp: SKIP (1.088s)

[root@x-bsw01 tests]# ./pm_rpm --run-subtest dpms-non-lpsp
IGT-Version: 1.8-gb7d80d1 (x86_64) (Linux: 3.17.0_drm-intel-nightly_ea4bec_20141012+ x86_64)
Runtime PM support: 1
PC8 residency support: 0
Test requirement not met in function modeset_subtest, file pm_rpm.c:786:
Test requirement: enable_one_screen_with_type(&ms_data, type)
Last errno: 2, No such file or directory
Subtest dpms-non-lpsp: SKIP (2.307s)
Comment 8 Jari Tahvanainen 2017-09-04 10:21:31 UTC
Closing old verified+fixed.

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.