Bug 79612

Summary: [HSW Bisected]igt/kms_plane causes "WARNING: CPU: 3 PID: 4404 at drivers/gpu/drm/i915/intel_display.c:888 display_crc_ctl_write+0x563/0x75d [i915]()"
Product: DRI Reporter: Guo Jinxian <jinxianx.guo>
Component: DRM/IntelAssignee: Daniel Vetter <daniel>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: blocker    
Priority: highest CC: intel-gfx-bugs
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
dmesg
none
Only vblank wait when necessary.
none
dmesg none

Description Guo Jinxian 2014-06-04 03:40:05 UTC
Created attachment 100381 [details]
dmesg

==System Environment==
--------------------------
Regression: yes. 
Good commit on -next-queued:4c0e552882114d1edb588242d45035246ab078a0

Non-working platforms: HSW

==kernel==
--------------------------
origin/drm-intel-nightly: 455a8fc4304af51a913e33763b72dd2849c11d0c(fails)
    drm-intel-nightly: 2014y-06m-02d-19h-49m-25s integration manifest
origin/drm-intel-next-queued: 866997c6fc0d3ed9fa35770d23ba2f48c17919c7(fails)
    drm/i915: Drop unused lut tables from intel_plane
origin/drm-intel-fixes: d23db88c3ab233daed18709e3a24d6c95344117f(works)
    drm/i915: Prevent negative relocation deltas from wrapping

==Bug detailed description==
-----------------------------
igt/kms_plane causes "WARNING: CPU: 3 PID: 4404 at drivers/gpu/drm/i915/intel_display.c:888 display_crc_ctl_write+0x563/0x75d [i915]()"

Failed cases list:
igt/kms_plane/plane-position-covered-pipe-B-plane-1
igt/kms_plane/plane-position-covered-pipe-C-plane-1
igt/kms_plane/plane-position-covered-pipe-C-plane-2

Dmesg shows:
[  150.978613] WARNING: CPU: 3 PID: 4404 at drivers/gpu/drm/i915/intel_display.c:888 display_crc_ctl_write+0x563/0x75d [i915]()
[  150.978614] vblank wait timed out
[  150.978615] Modules linked in: dm_mod snd_hda_codec_realtek snd_hda_codec_hdmi snd_hda_codec_generic iTCO_wdt iTCO_vendor_support dcdbas serio_raw pcspkr i2c_i801 snd_hda_intel snd_hda_controller snd_hda_codec snd_hwdep lpc_ich shpchp mfd_core snd_pcm snd_timer snd soundcore battery acpi_cpufreq i915 video button drm_kms_helper drm
[  150.978627] CPU: 3 PID: 4404 Comm: kms_plane Not tainted 3.15.0-rc3_drm-intel-next-queued_866997_20140603+ #3210
[  150.978628] Hardware name: Dell Inc. OptiPlex 9020/0DNKMN, BIOS A03 09/17/2013
[  150.978630]  0000000000000000 0000000000000009 ffffffff81723690 ffff880002af7e28
[  150.978631]  ffffffff8103517a dead000000200200 ffffffffa0073aac ffff880119b58000
[  150.978633]  ffff880002ca0000 ffff880002ca8068 ffff8800db3f9800 0000000000000001
[  150.978634] Call Trace:
[  150.978638]  [<ffffffff81723690>] ? dump_stack+0x41/0x51
[  150.978641]  [<ffffffff8103517a>] ? warn_slowpath_common+0x73/0x8b
[  150.978646]  [<ffffffffa0073aac>] ? display_crc_ctl_write+0x563/0x75d [i915]
[  150.978647]  [<ffffffff8103522a>] ? warn_slowpath_fmt+0x45/0x4a
[  150.978655]  [<ffffffffa009ce90>] ? intel_wait_for_vblank+0x77/0x1db [i915]
[  150.978660]  [<ffffffffa0073aac>] ? display_crc_ctl_write+0x563/0x75d [i915]
[  150.978663]  [<ffffffff810e0b64>] ? vfs_write+0xba/0x176
[  150.978665]  [<ffffffff810e0f1c>] ? SyS_write+0x41/0x84
[  150.978668]  [<ffffffff8172de62>] ? system_call_fastpath+0x16/0x1b

==Reproduce steps==
---------------------------- 
1. ./kms_plane --run-subtest plane-position-covered-pipe-B-plane-1
Comment 1 Guang Yang 2014-06-05 03:25:31 UTC
update priority because this impact tons of subcases and block QA's work.
Bisect results will coming ASAP.
Comment 2 Daniel Vetter 2014-06-05 06:48:01 UTC
Created attachment 100439 [details] [review]
Only vblank wait when necessary.

Please test this patch for all affected testcases, thanks.
Comment 3 Guo Jinxian 2014-06-06 02:13:49 UTC
9393707190194eb8b42e412b444a03331db6862f is the first bad commit

commit 9393707190194eb8b42e412b444a03331db6862f
Author:     Jesse Barnes <jbarnes@virtuousgeek.org>
AuthorDate: Fri Apr 4 16:12:09 2014 -0700
Commit:     Daniel Vetter <daniel.vetter@ffwll.ch>
CommitDate: Wed Apr 9 14:37:12 2014 +0200

    drm/i915: warn when a vblank wait times out

    This always indicates a bug somewhere.

    Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Comment 4 Guo Jinxian 2014-06-06 02:15:12 UTC
(In reply to comment #2)
> Created attachment 100439 [details] [review] [review]
> Only vblank wait when necessary.
> 
> Please test this patch for all affected testcases, thanks.

With the patch on latest -next-queued(9783dd21bc2143f410a6e86ed165d4c92a9298b7), this but unable to reproduce.
Comment 5 Daniel Vetter 2014-06-06 06:21:33 UTC
Oops I've forgotten to tell you that I don't really need the bisect result here since the WARNING itself was good enough. I'll try to remember that next time around.
Comment 6 Daniel Vetter 2014-06-06 09:36:59 UTC
commit 78658196a51ddcdc315017705e50bd268d307508
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Fri Jun 6 08:22:08 2014 +0200

    drm/i915: Only wait one vblank when disabling crc if the pipe is on
Comment 7 Guo Jinxian 2014-06-10 07:49:42 UTC
Test passed on latest -nightly(969b3c5a312e849fa7a3dc0937a6acf34cdd7e25)
Comment 8 Guo Jinxian 2014-07-01 07:31:59 UTC
Created attachment 102054 [details]
dmesg

This bug still able to reproduce on latest -fixes(84b4e042c4707bd1bf05094a51111403d680dc39)

[   57.103584] WARNING: CPU: 6 PID: 4217 at drivers/gpu/drm/i915/intel_display.c:861 display_crc_ctl_write+0x568/0x762 [i915]()
[   57.103585] vblank wait timed out
[   57.103586] Modules linked in: ip6table_filter ip6_tables ipv6 iptable_filter ip_tables ebtable_nat ebtables x_tables dm_mod snd_hda_codec_realtek snd_hda_codec_hdmi snd_hda_codec_generic iTCO_wdt iTCO_vendor_support serio_raw pcspkr i2c_i801 lpc_ich mfd_core snd_hda_intel snd_hda_controller snd_hda_codec snd_hwdep snd_pcm snd_timer snd soundcore battery wmi tpm_infineon tpm_tis tpm acpi_cpufreq i915 video button drm_kms_helper drm
[   57.103599] CPU: 6 PID: 4217 Comm: kms_plane Not tainted 3.16.0-rc2_drm-intel-fixes_84b4e0_20140701+ #104
[   57.103600] Hardware name: ASUS All Series/Z87-EXPERT, BIOS 1008 05/17/2013
[   57.103601]  0000000000000000 0000000000000009 ffffffff8177f9bf ffff880252b5fe28
[   57.103602]  ffffffff8103983c dead000000200200 ffffffffa00766f7 ffff8802566a8000
[   57.103604]  ffff880250eb0000 ffff880250eb80c8 ffff880255dd3000 0000000000000001
[   57.103605] Call Trace:
[   57.103609]  [<ffffffff8177f9bf>] ? dump_stack+0x41/0x51
[   57.103612]  [<ffffffff8103983c>] ? warn_slowpath_common+0x78/0x90
[   57.103617]  [<ffffffffa00766f7>] ? display_crc_ctl_write+0x568/0x762 [i915]
[   57.103619]  [<ffffffff810398ec>] ? warn_slowpath_fmt+0x45/0x4a
[   57.103627]  [<ffffffffa00a29ff>] ? intel_wait_for_vblank+0x77/0x1db [i915]
[   57.103632]  [<ffffffffa00766f7>] ? display_crc_ctl_write+0x568/0x762 [i915]
[   57.103635]  [<ffffffff8110b7fd>] ? vfs_write+0xb0/0x183
[   57.103637]  [<ffffffff8110bbde>] ? SyS_write+0x41/0x84
[   57.103639]  [<ffffffff81785552>] ? system_call_fastpath+0x16/0x1b
Comment 9 Jani Nikula 2014-09-08 12:18:37 UTC
(In reply to comment #8)
> This bug still able to reproduce on latest
> -fixes(84b4e042c4707bd1bf05094a51111403d680dc39)

I presume this was just because the fix was committed to drm-intel-next-queued, and at the time fixes didn't have the commit yet. This is upstream now, please reopen if the problem persists.

commit a33d7105c4e905c895c41d8caf6bd8f85b2e3ce7
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Fri Jun 6 08:22:08 2014 +0200

    drm/i915: Only wait one vblank when disabling crc if the pipe is on
Comment 10 Guo Jinxian 2014-09-10 07:53:41 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > This bug still able to reproduce on latest
> > -fixes(84b4e042c4707bd1bf05094a51111403d680dc39)
> 
> I presume this was just because the fix was committed to
> drm-intel-next-queued, and at the time fixes didn't have the commit yet.
> This is upstream now, please reopen if the problem persists.
> 
> commit a33d7105c4e905c895c41d8caf6bd8f85b2e3ce7
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date:   Fri Jun 6 08:22:08 2014 +0200
> 
>     drm/i915: Only wait one vblank when disabling crc if the pipe is on

The warning unable to reproduce on latest -nightly(99f444f7f8308ca93d56a3802a3e1a8abcad7f57), but the test failed. I will report a new bug for this failure.

[root@x-hsw24 tests]# ./kms_plane --run-subtest plane-position-covered-pipe-B-plane-1
IGT-Version: 1.8-gd9d3f4b (x86_64) (Linux: 3.17.0-rc4_drm-intel-nightly_99f444_20140910+ x86_64)
Testing connector VGA-1 using pipe B plane 1
Test assertion failure function test_plane_position_with_output, file kms_plane.c:197:
Failed assertion: igt_crc_equal(&test.reference_crc, &crc)
Subtest plane-position-covered-pipe-B-plane-1: FAIL (0.294s)
[root@x-hsw24 tests]# dmesg -r|egrep "<[1-4]>"|grep drm
[root@x-hsw24 tests]#
Comment 11 Jari Tahvanainen 2016-11-22 08:23:12 UTC
Closing verified+fixed. commit a33d710.

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.