Bug 90733 - [BSW Bisected]kms_flip and kms_plane cause WARNING: CPU: 0 PID: 4116 at drivers/gpu/drm/i915/i915_gem.c:5273 i915_gem_track_fb+0x6e/0x10c [i915]()
Summary: [BSW Bisected]kms_flip and kms_plane cause WARNING: CPU: 0 PID: 4116 at drive...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: highest normal
Assignee: Maarten Lankhorst
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
: 90860 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-05-29 03:21 UTC by lu hua
Modified: 2016-12-09 14:03 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg (124.82 KB, text/plain)
2015-05-29 03:21 UTC, lu hua
no flags Details

Description lu hua 2015-05-29 03:21:32 UTC
Created attachment 116134 [details]
dmesg

==System Environment==
--------------------------
Regression: yes

good commit:  drm-intel-nightly/6cf0fff478fa64991c2b7f2a44f2815d7a43a0b5
bad commit: drm-intel-nightly/b44f6771cba2cc90525d037445330ed766377aa9

Non-working platforms: BSW

==kernel==
--------------------------
drm-intel-nightly/b44f6771cba2cc90525d037445330ed766377aa9
commit b44f6771cba2cc90525d037445330ed766377aa9
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Thu May 28 13:39:29 2015 +0200

    drm-intel-nightly: 2015y-05m-28d-11h-38m-51s UTC integration manifest


==Bug detailed description==
-----------------------------
All kms_flip and kms_plane cases cause WARNING: CPU: 0 PID: 4116 at drivers/gpu/drm/i915/i915_gem.c:5273 i915_gem_track_fb+0x6e/0x10c [i915]()
Only reproduce it on BSW with the latest drm-intel-nightly kernel. 

150+ cases have this error.

Test on the latest drm-intel-next-queued, drm-intel-fixes, drm-fixes, drm-next and core-stuff branch, I am unable to reproduce this error.

run ./kms_plane --run-subtest plane-panning-top-left-pipe-A-plane-1
output:
Testing connector eDP-1 using pipe A plane 1
Subtest plane-panning-top-left-pipe-A-plane-1: SUCCESS (5.345s)

dmesg:
[  223.165105] WARNING: CPU: 0 PID: 4259 at drivers/gpu/drm/i915/i915_gem.c:5273 i915_gem_track_fb+0x6e/0x10c [i915]()
[  223.165110] WARN_ON(!(old->frontbuffer_bits & frontbuffer_bits))
[  223.165155] Modules linked in: ipv6 bnep bluetooth rfkill dm_mod iTCO_wdt iTCO_vendor_support snd_hda_codec_realtek snd_hda_codec_generic serio_raw pcspkr snd_hda_intel lpc_ich i2c_i801 mfd_core snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_timer snd soundcore battery ac acpi_cpufreq i915 button video drm_kms_helper drm
[  223.165162] CPU: 0 PID: 4259 Comm: kms_plane Not tainted 4.1.0-rc5_drm-intel-nightly_b44f67_20150529_debug+ #592
[  223.165173]  0000000000000009 ffff880174b337f8 ffffffff8189346a 0000000000000000
[  223.165180]  ffff880174b33848 ffff880174b33838 ffffffff81045347 0000000000000000
[  223.165186]  ffffffffa00bc274 ffff880077bc98c0 ffff880077bc98c0 0000000000000010
[  223.165189] Call Trace:
[  223.165199]  [<ffffffff8189346a>] dump_stack+0x45/0x57
[  223.165206]  [<ffffffff81045347>] warn_slowpath_common+0xa1/0xbb
[  223.165255]  [<ffffffffa00bc274>] ? i915_gem_track_fb+0x6e/0x10c [i915]
[  223.165259]  [<ffffffff810453a7>] warn_slowpath_fmt+0x46/0x48
[  223.165308]  [<ffffffffa00bc274>] i915_gem_track_fb+0x6e/0x10c [i915]
[  223.165371]  [<ffffffffa00f91ea>] intel_prepare_plane_fb+0x133/0x151 [i915]
[  223.165389]  [<ffffffffa0069dbf>] drm_atomic_helper_prepare_planes+0x58/0xb9 [drm_kms_helper]
[  223.165449]  [<ffffffffa01088f0>] intel_atomic_commit+0x4c/0x140 [i915]
[  223.165487]  [<ffffffffa001b915>] drm_atomic_commit+0x4d/0x52 [drm]
[  223.165502]  [<ffffffffa006b430>] drm_atomic_helper_plane_set_property+0x6c/0xab [drm_kms_helper]
[  223.165533]  [<ffffffffa000c015>] drm_mode_plane_set_obj_prop+0x2b/0x56 [drm]
[  223.165547]  [<ffffffffa006c970>] restore_fbdev_mode+0x6a/0xd5 [drm_kms_helper]
[  223.165564]  [<ffffffffa006e2bf>] drm_fb_helper_restore_fbdev_mode_unlocked+0x27/0x5e [drm_kms_helper]
[  223.165578]  [<ffffffffa006e32c>] drm_fb_helper_set_par+0x36/0x3a [drm_kms_helper]
[  223.165633]  [<ffffffffa01056b6>] intel_fbdev_set_par+0x1a/0x5f [i915]
[  223.165639]  [<ffffffff8140dac2>] fb_set_var+0x2aa/0x3a0
[  223.165647]  [<ffffffff810851b2>] ? __lock_acquire+0x9f0/0x1291
[  223.165654]  [<ffffffff81405c4f>] fbcon_blank+0x89/0x251
[  223.165707]  [<ffffffff81464418>] do_unblank_screen+0xfa/0x173
[  223.165712]  [<ffffffff8145c211>] vt_ioctl+0x522/0x1009
[  223.165717]  [<ffffffff810854bc>] ? __lock_acquire+0xcfa/0x1291
[  223.165722]  [<ffffffff81451cb5>] tty_ioctl+0xb2c/0xba8
[  223.165731]  [<ffffffff8116d77c>] ? __fd_install+0x28/0xa6
[  223.165740]  [<ffffffff8114aa4a>] ? kmem_cache_free+0xeb/0x18d
[  223.165746]  [<ffffffff8116046d>] ? putname+0x4a/0x4e
[  223.165752]  [<ffffffff8108453a>] ? trace_hardirqs_on_caller+0x16e/0x18a
[  223.165759]  [<ffffffff811634d7>] do_vfs_ioctl+0x3bb/0x47a
[  223.165763]  [<ffffffff8116046d>] ? putname+0x4a/0x4e
[  223.165769]  [<ffffffff8116cf86>] ? __fget_light+0x50/0x75
[  223.165774]  [<ffffffff811635e9>] SyS_ioctl+0x53/0x82
[  223.165781]  [<ffffffff8189b497>] system_call_fastpath+0x12/0x6f
[  223.165786] ---[ end trace d2e5bd9439b99f8c ]---

==Reproduce steps==
---------------------------- 
1. ./kms_plane --run-subtest plane-panning-top-left-pipe-A-plane-1
Comment 1 Ander Conselvan de Oliveira 2015-05-29 05:45:22 UTC
Please bisect.
Comment 2 lu hua 2015-05-29 05:58:31 UTC
I only meet it on drm-intel-nightly kernel.
Comment 3 Ander Conselvan de Oliveira 2015-05-29 06:11:06 UTC
(In reply to lu hua from comment #2)
> I only meet it on drm-intel-nightly kernel.

Sounds like a regression in nightly. You even listed a good commit and a bad commit, so please bisect between them.
Comment 4 lu hua 2015-06-01 07:13:53 UTC
It's drm-misc branch issue. Bisect is in process.
bad commit:e2f5d2ea479b9b2619965d43db70939589afe43a
good commit:1b26a5e1932beb34c4213934d8faf02217fc40e4
Comment 5 lu hua 2015-06-01 08:46:01 UTC
Bisect shows: 57744aa7cfb5969c5a0621f4cfa45bb83d391064 is the first bad commit.
commit 57744aa7cfb5969c5a0621f4cfa45bb83d391064
Author:     Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
AuthorDate: Tue May 19 16:41:03 2015 +0200
Commit:     Daniel Vetter <daniel.vetter@ffwll.ch>
CommitDate: Thu May 21 10:29:07 2015 +0200

    drm/atomic: add all affected planes in drm_atomic_helper_check_modeset

    Drivers may need to recalculate plane state when a modeset occurs,
    not reliably adding them might cause hard to debug bugs.

    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Comment 6 Ander Conselvan de Oliveira 2015-06-02 06:33:48 UTC
Please run one of the failing tests with 'drm.debug=0x1e log_buf_len=4M' in the kernel command line and attach full dmesg again.
Comment 7 Ander Conselvan de Oliveira 2015-06-03 08:55:45 UTC
Should be fixed in this patch sereis: http://lists.freedesktop.org/archives/intel-gfx/2015-June/067761.html
Comment 8 Maarten Lankhorst 2015-06-03 14:25:35 UTC
Ok, this will be fixed with convert to atomic, part 2.

http://mid.gmane.org/1433155811-9671-1-git-send-email-maarten.lankhorst@linux.intel.com
Comment 9 wendy.wang 2015-06-04 08:32:16 UTC
(In reply to Ander Conselvan de Oliveira from comment #7)
> Should be fixed in this patch sereis:
> http://lists.freedesktop.org/archives/intel-gfx/2015-June/067761.html

Hello Ander,
Can you give us a branch which contains all your serious patches? Because when apply your patch, several patches fail to apply.
Comment 10 wendy.wang 2015-06-04 08:34:53 UTC
(In reply to Maarten Lankhorst from comment #8)
> Ok, this will be fixed with convert to atomic, part 2.
> 
> http://mid.gmane.org/1433155811-9671-1-git-send-email-maarten.
> lankhorst@linux.intel.com

Lankhorst, do you have a branch contains all your patches for us to verify?
Comment 11 Jani Nikula 2015-06-04 08:53:20 UTC
The series has been merged, please retest with current drm-intel-nightly.
Comment 12 lu hua 2015-06-05 01:46:24 UTC
Test on the latest drm-intel-nightly kernel.It works well. Close it.
Comment 13 lu hua 2015-06-05 01:46:59 UTC
Verified.Fixed.
Comment 14 Ander Conselvan de Oliveira 2015-06-05 07:33:25 UTC
*** Bug 90860 has been marked as a duplicate of this bug. ***
Comment 15 Jari Tahvanainen 2016-12-09 14:03:17 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.