Bug 79108 - [IVB Bisected]igt/kms_flip subcases vblank-vs-suspend and vblank-vs-suspend-interruptible fail
Summary: [IVB Bisected]igt/kms_flip subcases vblank-vs-suspend and vblank-vs-suspend-i...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: Other All
: highest normal
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
: 79713 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-05-23 07:56 UTC by Guo Jinxian
Modified: 2016-10-07 08:42 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg (125.76 KB, text/plain)
2014-05-23 07:56 UTC, Guo Jinxian
no flags Details
dmesg (120.13 KB, text/plain)
2014-06-19 06:36 UTC, Guo Jinxian
no flags Details
dmesg (120.19 KB, text/plain)
2014-06-24 06:50 UTC, Guo Jinxian
no flags Details

Description Guo Jinxian 2014-05-23 07:56:25 UTC
Created attachment 99618 [details]
dmesg

==System Environment==
--------------------------
Regression: Yes. 
Good commit on -next-queued(bc76e320f21f8bd790a72bd5dc06909617432352)

Non-working platforms: IVB

==kernel==
--------------------------
origin/drm-intel-nightly: de544db7ec687241b9471859fa6823366dfde654(fails)
    drm-intel-nightly: 2014y-05m-22d-23h-48m-26s integration manifest
origin/drm-intel-next-queued: e6a7e5d0fd778bc6cf295414b9937723091c9bb6(fails)
    drm/i915: Kill private_default_ctx off    
origin/drm-intel-fixes: f93e94efebbe0b9ad5048076f171ea2b054ca4fb(works)
    drm/i915: Fix dynamic allocation of physical handles

==Bug detailed description==
-----------------------------
igt/kms_flip subcases vblank-vs-suspend and vblank-vs-suspend-interruptible fail

Output:
 ./kms_flip --run-subtest flip-vs-rmfb
IGT-Version: 1.6-gc75dcbd (x86_64) (Linux: 3.15.0-rc3_drm-intel-next-queued_f83d65_20140523+ x86_64)
Using monotonic timestamps
Beginning flip-vs-rmfb on crtc 5, connector 13
  1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x48 65000
.............................................................................Test assertion failure function set_flag, file kms_flip.c:339:
Last errno: 0, Success
Failed assertion: !(*v & flag)
Subtest flip-vs-rmfb: FAIL


==Reproduce steps==
---------------------------- 
1. ./kms_flip --run-subtest flip-vs-rmfb
Comment 1 Daniel Vetter 2014-06-18 16:18:20 UTC
Please bisect where this regression has been introduced.
Comment 2 Guo Jinxian 2014-06-19 06:36:21 UTC
Created attachment 101331 [details]
dmesg

46470fc932ac8a0e8317a220b3f4ea4ed903338e is the first bad commit

The commit unable to revert.

commit 46470fc932ac8a0e8317a220b3f4ea4ed903338e
Author:     Mika Kuoppala <mika.kuoppala@linux.intel.com>
AuthorDate: Wed May 21 19:01:06 2014 +0300
Commit:     Daniel Vetter <daniel.vetter@ffwll.ch>
CommitDate: Thu May 22 14:10:37 2014 +0200

    drm/i915: Add null state batch to active list

    for proper refcounting to take place as we use
    i915_add_request() for it.

    i915_add_request() also takes the context for the request
    from ring->last_context so move the null state batch
    submission after the ring context has been set.

    v2: we need to check for correct ring now (Ville Syrjälä)
    v3: no need to expose i915_gem_move_object_to_active (Chris Wilson)
    v4: cargoculted vma/active/inactive error handling removed (Chris Wilson)

    Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Cc: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Damien Lespiau <damien.lespiau@intel.com>
    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>

The error message had changed.
Output:
[root@x-ivb9 tests]# ./kms_flip --run-subtest flip-vs-rmfb
IGT-Version: 1.7-g27d37a1 (x86_64) (Linux: 3.15.0-rc3_drm-intel-next-queued_46470f_20140527+ x86_64)
Using monotonic timestamps
Beginning flip-vs-rmfb on crtc 5, connector 13
  1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x40 65000
Beginning flip-vs-rmfb on crtc 8, connector 13
  1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x40 65000
Beginning flip-vs-rmfb on crtc 11, connector 13
  1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x40 65000
Test assertion failure function run_test_on_crtc_set, file kms_flip.c:1316:
Last errno: 13, Permission denied
Failed assertion: crtc_count > 1 || crtc_idxs[0] < 2
set_mode may only fail on the 3rd pipe or in multiple crtc tests
Subtest flip-vs-rmfb: FAIL
Test assertion failure function kmstest_set_connector_dpms, file igt_kms.c:208:
Last errno: 13, Permission denied
Failed assertion: drmModeConnectorSetProperty(fd, connector->connector_id, dpms, mode) == 0
Test assertion failure function kmstest_set_connector_dpms, file igt_kms.c:208:
Last errno: 13, Permission denied
Failed assertion: drmModeConnectorSetProperty(fd, connector->connector_id, dpms, mode) == 0
Comment 3 Chris Wilson 2014-06-23 09:48:58 UTC
Reviewed patch on mailing list: http://patchwork.freedesktop.org/patch/26884/
Comment 4 Jani Nikula 2014-06-23 09:55:29 UTC
(In reply to comment #3)
> Reviewed patch on mailing list: http://patchwork.freedesktop.org/patch/26884/

Does the referenced patch fix the issue?
Comment 5 Guo Jinxian 2014-06-24 06:50:25 UTC
Created attachment 101639 [details]
dmesg

(In reply to comment #4)
> (In reply to comment #3)
> > Reviewed patch on mailing list: http://patchwork.freedesktop.org/patch/26884/
> 
> Does the referenced patch fix the issue?

The result have another failure with this patch.

Output:
[root@x-ivb9 tests]# ./kms_flip --run-subtest flip-vs-rmfb
IGT-Version: 1.7-gfedb9b6 (x86_64) (Linux: 3.15.0-rc8_kcloud_8775ca_20140624+ x86_64)
Using monotonic timestamps
Beginning flip-vs-rmfb on crtc 6, connector 16
  1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x40 65000
Beginning flip-vs-rmfb on crtc 10, connector 16
  1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x40 65000
Beginning flip-vs-rmfb on crtc 14, connector 16
  1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x40 65000
Test assertion failure function run_test_on_crtc_set, file kms_flip.c:1316:
Last errno: 13, Permission denied
Failed assertion: crtc_count > 1 || crtc_idxs[0] < 2
set_mode may only fail on the 3rd pipe or in multiple crtc tests
Subtest flip-vs-rmfb: FAIL
Test assertion failure function kmstest_set_connector_dpms, file igt_kms.c:208:
Last errno: 13, Permission denied
Failed assertion: drmModeConnectorSetProperty(fd, connector->connector_id, dpms, mode) == 0
Test assertion failure function kmstest_set_connector_dpms, file igt_kms.c:208:
Last errno: 13, Permission denied
Failed assertion: drmModeConnectorSetProperty(fd, connector->connector_id, dpms, mode) == 0
Comment 6 Jani Nikula 2014-06-24 07:41:52 UTC
(In reply to comment #5)
> The result have another failure with this patch.

Chris?
Comment 7 Guo Jinxian 2014-08-08 01:56:23 UTC
Test still failed on latest -nightly(5a299a5a794999ddcc44578c0cfd58da83bac62b) on byt

Case list:
igt/kms_flip/absolute-wf_vblank
igt/kms_flip/absolute-wf_vblank-interruptible
igt/kms_flip/bcs-flip-vs-dpms
igt/kms_flip/bcs-flip-vs-dpms-interruptible
igt/kms_flip/bcs-flip-vs-modeset
igt/kms_flip/bcs-flip-vs-modeset-interruptible
igt/kms_flip/bcs-flip-vs-panning
igt/kms_flip/bcs-flip-vs-panning-interruptible
igt/kms_flip/bcs-wf_vblank-vs-dpms
igt/kms_flip/bcs-wf_vblank-vs-dpms-interruptible
igt/kms_flip/bcs-wf_vblank-vs-modeset
igt/kms_flip/bcs-wf_vblank-vs-modeset-interruptible
igt/kms_flip/blocking-absolute-wf_vblank
igt/kms_flip/blocking-absolute-wf_vblank-interruptible
igt/kms_flip/blocking-wf_vblank
igt/kms_flip/bo-too-big
igt/kms_flip/bo-too-big-interruptible
igt/kms_flip/busy-flip
igt/kms_flip/busy-flip-interruptible
igt/kms_flip/dpms-off-confusion
igt/kms_flip/dpms-off-confusion-interruptible
igt/kms_flip/dpms-vs-vblank-race
igt/kms_flip/dpms-vs-vblank-race-interruptible
igt/kms_flip/flip-vs-absolute-wf_vblank
igt/kms_flip/flip-vs-absolute-wf_vblank-interruptible
igt/kms_flip/flip-vs-blocking-wf-vblank
igt/kms_flip/flip-vs-dpms
igt/kms_flip/flip-vs-dpms-interruptible
igt/kms_flip/flip-vs-dpms-off-vs-modeset
igt/kms_flip/flip-vs-dpms-off-vs-modeset-interruptible
igt/kms_flip/flip-vs-expired-vblank
igt/kms_flip/flip-vs-expired-vblank-interruptible
igt/kms_flip/flip-vs-fences
igt/kms_flip/flip-vs-fences-interruptible
igt/kms_flip/flip-vs-modeset
igt/kms_flip/flip-vs-modeset-interruptible
igt/kms_flip/flip-vs-modeset-vs-hang
igt/kms_flip/flip-vs-modeset-vs-hang-interruptible
igt/kms_flip/flip-vs-panning
igt/kms_flip/flip-vs-panning-interruptible
igt/kms_flip/flip-vs-panning-vs-hang
igt/kms_flip/flip-vs-panning-vs-hang-interruptible
igt/kms_flip/flip-vs-rmfb
igt/kms_flip/flip-vs-rmfb-interruptible
igt/kms_flip/flip-vs-wf_vblank
igt/kms_flip/flip-vs-wf_vblank-interruptible
igt/kms_flip/modeset-vs-vblank-race
igt/kms_flip/modeset-vs-vblank-race-interruptible
igt/kms_flip/nonexisting-fb
igt/kms_flip/nonexisting-fb-interruptible
igt/kms_flip/plain-flip
igt/kms_flip/plain-flip-fb-recreate
igt/kms_flip/plain-flip-fb-recreate-interruptible
igt/kms_flip/plain-flip-interruptible
igt/kms_flip/plain-flip-ts-check
igt/kms_flip/plain-flip-ts-check-interruptible
igt/kms_flip/rcs-flip-vs-dpms
igt/kms_flip/rcs-flip-vs-dpms-interruptible
igt/kms_flip/rcs-flip-vs-modeset
igt/kms_flip/rcs-flip-vs-modeset-interruptible
igt/kms_flip/rcs-flip-vs-panning
igt/kms_flip/rcs-flip-vs-panning-interruptible
igt/kms_flip/rcs-wf_vblank-vs-dpms
igt/kms_flip/rcs-wf_vblank-vs-dpms-interruptible
igt/kms_flip/rcs-wf_vblank-vs-modeset
igt/kms_flip/rcs-wf_vblank-vs-modeset-interruptible
igt/kms_flip/single-buffer-flip-vs-dpms-off-vs-modeset
igt/kms_flip/single-buffer-flip-vs-dpms-off-vs-modeset-interruptible
igt/kms_flip/vblank-vs-dpms-suspend
igt/kms_flip/vblank-vs-dpms-suspend-interruptible
igt/kms_flip/vblank-vs-hang
igt/kms_flip/vblank-vs-hang-interruptible
igt/kms_flip/vblank-vs-modeset-suspend
igt/kms_flip/vblank-vs-modeset-suspend-interruptible
igt/kms_flip/vblank-vs-suspend
igt/kms_flip/vblank-vs-suspend-interruptible
igt/kms_flip/wf_vblank
igt/kms_flip/wf_vblank-interruptible
igt/kms_flip/wf_vblank-ts-check
igt/kms_flip/wf_vblank-ts-check-interruptible
igt/kms_flip/wf_vblank-vs-dpms
igt/kms_flip/wf_vblank-vs-dpms-interruptible
igt/kms_flip/wf_vblank-vs-modeset
igt/kms_flip/wf_vblank-vs-modeset-interruptible


Output:
[root@x-ivb9 tests]# ./kms_flip --run-subtest bcs-wf_vblank-vs-modeset-interruptible
IGT-Version: 1.7-g17d63e4 (x86_64) (Linux: 3.16.0_drm-intel-nightly_5a299a_20140807_debug+ x86_64)
Using monotonic timestamps
Beginning bcs-wf_vblank-vs-modeset-interruptible on crtc 8, connector 18
  1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x40 65000
Beginning bcs-wf_vblank-vs-modeset-interruptible on crtc 12, connector 18
  1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x40 65000
Beginning bcs-wf_vblank-vs-modeset-interruptible on crtc 16, connector 18
  1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x40 65000
Test assertion failure function run_test_on_crtc_set, file kms_flip.c:1316:
Failed assertion: crtc_count > 1 || crtc_idxs[0] < 2
Last errno: 13, Permission denied
set_mode may only fail on the 3rd pipe or in multiple crtc tests
Subtest bcs-wf_vblank-vs-modeset-interruptible: FAIL
Test assertion failure function kmstest_set_connector_dpms, file igt_kms.c:222:
Failed assertion: drmModeConnectorSetProperty(fd, connector->connector_id, dpms, mode) == 0
Last errno: 13, Permission denied
Comment 8 Chris Wilson 2014-08-08 07:41:57 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > The result have another failure with this patch.
> 
> Chris?

The failure isn't from that patch, obviously.
Comment 9 Imre Deak 2014-09-18 15:46:56 UTC
> Output:
> [root@x-ivb9 tests]# ./kms_flip --run-subtest
> bcs-wf_vblank-vs-modeset-interruptible
> IGT-Version: 1.7-g17d63e4 (x86_64) (Linux:
> 3.16.0_drm-intel-nightly_5a299a_20140807_debug+ x86_64)
> Using monotonic timestamps
> Beginning bcs-wf_vblank-vs-modeset-interruptible on crtc 8, connector 18
>   1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x40 65000
> Beginning bcs-wf_vblank-vs-modeset-interruptible on crtc 12, connector 18
>   1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x40 65000
> Beginning bcs-wf_vblank-vs-modeset-interruptible on crtc 16, connector 18
>   1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x40 65000
> Test assertion failure function run_test_on_crtc_set, file kms_flip.c:1316:
> Failed assertion: crtc_count > 1 || crtc_idxs[0] < 2
> Last errno: 13, Permission denied
> set_mode may only fail on the 3rd pipe or in multiple crtc tests
> Subtest bcs-wf_vblank-vs-modeset-interruptible: FAIL
> Test assertion failure function kmstest_set_connector_dpms, file
> igt_kms.c:222:
> Failed assertion: drmModeConnectorSetProperty(fd, connector->connector_id,
> dpms, mode) == 0
> Last errno: 13, Permission denied

Could you test https://github.com/ideak/intel-gpu-tools/commits/open_any_master ?
Comment 10 Imre Deak 2014-09-18 16:03:13 UTC
*** Bug 79713 has been marked as a duplicate of this bug. ***
Comment 11 Guo Jinxian 2014-09-25 08:20:30 UTC
(In reply to comment #9)
> > Output:
> > [root@x-ivb9 tests]# ./kms_flip --run-subtest
> > bcs-wf_vblank-vs-modeset-interruptible
> > IGT-Version: 1.7-g17d63e4 (x86_64) (Linux:
> > 3.16.0_drm-intel-nightly_5a299a_20140807_debug+ x86_64)
> > Using monotonic timestamps
> > Beginning bcs-wf_vblank-vs-modeset-interruptible on crtc 8, connector 18
> >   1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x40 65000
> > Beginning bcs-wf_vblank-vs-modeset-interruptible on crtc 12, connector 18
> >   1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x40 65000
> > Beginning bcs-wf_vblank-vs-modeset-interruptible on crtc 16, connector 18
> >   1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x40 65000
> > Test assertion failure function run_test_on_crtc_set, file kms_flip.c:1316:
> > Failed assertion: crtc_count > 1 || crtc_idxs[0] < 2
> > Last errno: 13, Permission denied
> > set_mode may only fail on the 3rd pipe or in multiple crtc tests
> > Subtest bcs-wf_vblank-vs-modeset-interruptible: FAIL
> > Test assertion failure function kmstest_set_connector_dpms, file
> > igt_kms.c:222:
> > Failed assertion: drmModeConnectorSetProperty(fd, connector->connector_id,
> > dpms, mode) == 0
> > Last errno: 13, Permission denied
> 
> Could you test
> https://github.com/ideak/intel-gpu-tools/commits/open_any_master ?

Test passed with this igt code:
[root@x-ivb9 tests]# ./kms_flip --run-subtest bcs-wf_vblank-vs-modeset-interruptible
Using monotonic timestamps
[root@x-ivb9 tests]# echo $?
0

commit 8ad8e62c50f5e2d6fc2e06c80cd99906ff8d6e19
Author: Imre Deak <imre.deak@intel.com>
Date:   Wed Jul 31 11:59:38 2013 +0300

    tests: add kms_setmode

    Signed-off-by: Imre Deak <imre.deak@intel.com>
Comment 12 Imre Deak 2014-09-29 10:12:18 UTC
(In reply to comment #11)
> (In reply to comment #9)
> > > Output:
> > > [root@x-ivb9 tests]# ./kms_flip --run-subtest
> > > bcs-wf_vblank-vs-modeset-interruptible
> > > IGT-Version: 1.7-g17d63e4 (x86_64) (Linux:
> > > 3.16.0_drm-intel-nightly_5a299a_20140807_debug+ x86_64)
> > > Using monotonic timestamps
> > > Beginning bcs-wf_vblank-vs-modeset-interruptible on crtc 8, connector 18
> > >   1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x40 65000
> > > Beginning bcs-wf_vblank-vs-modeset-interruptible on crtc 12, connector 18
> > >   1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x40 65000
> > > Beginning bcs-wf_vblank-vs-modeset-interruptible on crtc 16, connector 18
> > >   1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x40 65000
> > > Test assertion failure function run_test_on_crtc_set, file kms_flip.c:1316:
> > > Failed assertion: crtc_count > 1 || crtc_idxs[0] < 2
> > > Last errno: 13, Permission denied
> > > set_mode may only fail on the 3rd pipe or in multiple crtc tests
> > > Subtest bcs-wf_vblank-vs-modeset-interruptible: FAIL
> > > Test assertion failure function kmstest_set_connector_dpms, file
> > > igt_kms.c:222:
> > > Failed assertion: drmModeConnectorSetProperty(fd, connector->connector_id,
> > > dpms, mode) == 0
> > > Last errno: 13, Permission denied
> > 
> > Could you test
> > https://github.com/ideak/intel-gpu-tools/commits/open_any_master ?
> 
> Test passed with this igt code:
> [root@x-ivb9 tests]# ./kms_flip --run-subtest
> bcs-wf_vblank-vs-modeset-interruptible
> Using monotonic timestamps
> [root@x-ivb9 tests]# echo $?
> 0
> 
> commit 8ad8e62c50f5e2d6fc2e06c80cd99906ff8d6e19
> Author: Imre Deak <imre.deak@intel.com>
> Date:   Wed Jul 31 11:59:38 2013 +0300
> 
>     tests: add kms_setmode
> 
>     Signed-off-by: Imre Deak <imre.deak@intel.com>

The above commit is not the branch I pointed to. The correct one is open_any_master, could you retest with that?
Comment 13 Guo Jinxian 2014-09-30 01:16:45 UTC
(In reply to comment #12)
> The above commit is not the branch I pointed to. The correct one is
> open_any_master, could you retest with that?

Test passes with the 'open_any_master' branch.

[root@x-ivb9 tests]# ./kms_flip --run-subtest bcs-wf_vblank-vs-modeset-interruptible
IGT-Version: 1.8-gec1780d (x86_64) (Linux: 3.17.0-rc6_drm-intel-nightly_7101d8_20140929_debug+ x86_64)
Using monotonic timestamps
Beginning bcs-wf_vblank-vs-modeset-interruptible on crtc 8, connector 18
  1680x1050 60 1680 1784 1960 2240 1050 1053 1059 1089 0x6 0x48 146250
.....
bcs-wf_vblank-vs-modeset-interruptible on crtc 8, connector 18: PASSED

Beginning bcs-wf_vblank-vs-modeset-interruptible on crtc 12, connector 18
  1680x1050 60 1680 1784 1960 2240 1050 1053 1059 1089 0x6 0x48 146250
....
bcs-wf_vblank-vs-modeset-interruptible on crtc 12, connector 18: PASSED

Beginning bcs-wf_vblank-vs-modeset-interruptible on crtc 16, connector 18
  1680x1050 60 1680 1784 1960 2240 1050 1053 1059 1089 0x6 0x48 146250
....
bcs-wf_vblank-vs-modeset-interruptible on crtc 16, connector 18: PASSED

Subtest bcs-wf_vblank-vs-modeset-interruptible: SUCCESS (62.359s)
You have new mail in /var/spool/mail/root
[root@x-ivb9 tests]# echo $?
0


commit ec1780dbaa566c535e12285462459662ec8973ba
Author: Imre Deak <imre.deak@intel.com>
Date:   Thu Sep 18 18:31:29 2014 +0300

    test/kms, pm: use drm_open_any_master

    Signed-off-by: Imre Deak <imre.deak@intel.com>
Comment 14 Imre Deak 2014-09-30 13:58:20 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > The above commit is not the branch I pointed to. The correct one is
> > open_any_master, could you retest with that?
> 
> Test passes with the 'open_any_master' branch.

Thanks. I pushed this change to igt, so we can close this bug. Note that this issue can resurface if another DRM master is running at the same time as the test, but we'll get a better explanation for the exit reason (the exit status will be also SKIP instead of an error).
Comment 15 Guo Jinxian 2014-10-08 03:45:50 UTC
Verified.
Comment 16 Jari Tahvanainen 2016-10-07 08:42:01 UTC
Closing 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.