drm/i915: Fix assert_plane() warning on bootup with external display
Subsystems (2)
PATCH v8 1/1 drm/i915: Fix assert_plane() warning on bootup with external display
On KBL, WHL RVPs, booting up with an external display connected, triggers below warning, when the BiOS brings up the external display too. This warning is not seen during hotplug.
[ 3.615226] ------------[ cut here ]------------ [ 3.619829] plane 1A assertion failure (expected on, current off) [ 3.632039] WARNING: CPU: 2 PID: 354 at drivers/gpu/drm/i915/intel_display.c:1294 assert_plane+0x71/0xbb [ 3.633920] iwlwifi 0000:00:14.3: loaded firmware version 38.c0e03d94.0 op_mode iwlmvm [ 3.647157] Modules linked in: iwlwifi cfg80211 btusb btrtl btbcm btintel bluetooth ecdh_generic [ 3.647163] CPU: 2 PID: 354 Comm: frecon Not tainted 4.17.0-rc7-50176-g655af12d39c2 #3 [ 3.647165] Hardware name: Intel Corporation CoffeeLake Client Platform/WhiskeyLake U DDR4 ERB, BIOS CNLSFWR1.R00.X140.B00.1804040304 04/04/2018 [ 3.684509] RIP: 0010:assert_plane+0x71/0xbb [ 3.764451] Call Trace: [ 3.766888] intel_atomic_commit_tail+0xa97/0xb77 [ 3.771569] intel_atomic_commit+0x26a/0x279 [ 3.771572] drm_atomic_helper_set_config+0x5c/0x76 [ 3.780670] __drm_mode_set_config_internal+0x66/0x109 [ 3.780672] drm_mode_setcrtc+0x4c9/0x5cc [ 3.780674] ? drm_mode_getcrtc+0x162/0x162 [ 3.789774] ? drm_mode_getcrtc+0x162/0x162 [ 3.798108] drm_ioctl_kernel+0x8d/0xe4 [ 3.801926] drm_ioctl+0x27d/0x368 [ 3.805311] ? drm_mode_getcrtc+0x162/0x162 [ 3.805314] ? selinux_file_ioctl+0x14e/0x199 [ 3.805317] vfs_ioctl+0x21/0x2f [ 3.813812] do_vfs_ioctl+0x491/0x4b4 [ 3.813813] ? security_file_ioctl+0x37/0x4b [ 3.813816] ksys_ioctl+0x55/0x75 [ 3.820672] __x64_sys_ioctl+0x1a/0x1e [ 3.820674] do_syscall_64+0x51/0x5f [ 3.820678] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 3.828221] RIP: 0033:0x7b5e04953967 [ 3.835504] RSP: 002b:00007fff2eafb6f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 3.835505] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007b5e04953967 [ 3.835505] RDX: 00007fff2eafb730 RSI: 00000000c06864a2 RDI: 000000000000000f [ 3.835506] RBP: 00007fff2eafb720 R08: 0000000000000000 R09: 0000000000000000 [ 3.835507] R10: 0000000000000070 R11: 0000000000000246 R12: 000000000000000f [ 3.879988] R13: 000056bc9dd7d210 R14: 00007fff2eafb730 R15: 00000000c06864a2 [ 3.887081] Code: 48 c7 c7 06 71 a5 be 84 c0 48 c7 c2 06 fd a3 be 48 89 f9 48 0f 44 ca 84 db 48 0f 45 d7 48 c7 c7 df d3 a4 be 31 c0 e8 af a0 c0 ff <0f> 0b eb 2b 48 c7 c7 06 fd a3 be 84 c0 48 c7 c2 06 71 a5 be 48 [ 3.905845] WARNING: CPU: 2 PID: 354 at drivers/gpu/drm/i915/intel_display.c:1294 assert_plane+0x71/0xbb [ 3.920964] ---[ end trace dac692f4ac46391a ]---
The warning is seen when mode_setcrtc() is called for pipeB during bootup and before we get a mode_setcrtc() for pipeA, while doing update_crtcs() in intel_atomic_commit_tail(). Now since, plane1A is still active after commit, update_crtcs() is done for pipeA and eventually update_plane() for plane1A.
intel_plane_state->ctl for plane1A is not updated since set_modecrtc() is called for pipeB. So intel_plane_state->ctl for plane 1A will be 0x0. So doing an update_plane() for plane1A, will result in clearing PLANE_CTL_ENABLE bit, and hence the warning.
To fix this warning, force all active planes to recompute their states in probe.
Changes in v8:
- Actually add Reviewed-by: Ville Syrjälä <[email protected]>
Changes in v7:
- Move call to intel_initial_commit() after sanitize_watermarks() Otherwise the plane update will still consult potentially bogus watermarks we read out from the hardware. (Ville)
- Carry Reviewed-by: Ville Syrjälä <[email protected]> from v6
Changes in v6:
- Handle EDEADLK for drm_atomic_get_crtc_state() and drm_atomic_add_affected_planes()
- Remove optimization of calling intel_initial_commit() only when there is more than one active pipe in probe.
- Avoid using intel_ types.
Changes in v5:
- Drop drm_modeset_lock_all_ctx() since locks will be taken later.
Changes in v4:
- Handle locking in intel_initial_commit()
- Move the for loop inside intel_initial_commit() so that drm_atomic_commit() is called only once
- Call intel_initial_commit() only for more than one active crtc on boot.
- Save the return value of intel_initial_commit() and print a message in case of an error
Changes in v3:
- Add comments
Changes in v2:
- Force all planes to recompute their states.(Ville Syrjälä)
- Update the commit message
--- drivers/gpu/drm/i915/intel_display.c | 61 ++++++++++++++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +59 -2
@@ -15092,12 +15092,61 @@ static void intel_update_fdi_pll_freq(struct drm_i915_private *dev_priv)DRM_DEBUG_DRIVER ("FDI PLL freq=%d\n" , dev_priv->fdi_pll_freq); } +static int intel_initial_commit (struct drm_device *dev) +{ +struct drm_atomic_state *state =NULL ; +struct drm_modeset_acquire_ctx ctx; +struct drm_crtc *crtc; +struct drm_crtc_state *crtc_state; +int ret =0 ; + + state =drm_atomic_state_alloc (dev); +if (!state) +return -ENOMEM ; + +drm_modeset_acquire_init (&ctx,0 ); + +retry: + state->acquire_ctx = &ctx; + +drm_for_each_crtc (crtc, dev) { + crtc_state =drm_atomic_get_crtc_state (state, crtc); +if (IS_ERR (crtc_state)) { + ret =PTR_ERR (crtc_state); + goto out; + } + +if (crtc_state->active) { + ret =drm_atomic_add_affected_planes (state, crtc); +if (ret) + goto out; + } + } + + ret =drm_atomic_commit (state); + +out: +if (ret == -EDEADLK ) { +drm_atomic_state_clear (state); +drm_modeset_backoff (&ctx); + goto retry; + } + +drm_atomic_state_put (state); + +drm_modeset_drop_locks (&ctx); +drm_modeset_acquire_fini (&ctx); + +return ret; +} +int intel_modeset_init (struct drm_device *dev) {struct drm_i915_private *dev_priv =to_i915 (dev);struct i915_ggtt *ggtt = &dev_priv->ggtt;enum pipe pipe;struct intel_crtc *crtc; +int ret; dev_priv->modeset_wq =alloc_ordered_workqueue ("i915_modeset" ,0 );
@@ -15172,8 +15221,6 @@ int intel_modeset_init(struct drm_device *dev) INTEL_INFO(dev_priv)->num_pipes > 1 ? "s" : "");for_each_pipe (dev_priv, pipe) { -int ret; - ret =intel_crtc_init (dev_priv, pipe);if (ret) {drm_mode_config_cleanup (dev);
@@ -15229,6 +15276,16 @@ int intel_modeset_init(struct drm_device *dev)if (!HAS_GMCH_DISPLAY (dev_priv))sanitize_watermarks (dev); +/* +* Force all active planes to recompute their states. So that on +* mode_setcrtc after probe, all the intel_plane_state variables +* are already calculated and there is no assert_plane warnings +* during bootup. +*/ + ret =intel_initial_commit (dev); +if (ret) +DRM_DEBUG_KMS ("Initial commit in probe failed.\n" ); +return 0 ; }
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: Fix assert_plane() warning on bootup with external display (rev8)
== Series Details ==
== Series Details ==
Series: drm/i915: Fix assert_plane() warning on bootup with external display (rev8)
URL : https://patchwork.freedesktop.org/series/44909/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4448 -> Patchwork_9576 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/44909/revisions/8/mbox/
== Known issues ==
Here are the changes found in Patchwork_9576 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_frontbuffer_tracking@basic:
fi-skl-guc: NOTRUN -> FAIL (fdo#103167)
==== Possible fixes ====
igt@kms_flip@basic-flip-vs-dpms:
fi-skl-6700hq: DMESG-WARN (fdo#105998) -> PASS
igt@kms_frontbuffer_tracking@basic:
fi-hsw-peppy: DMESG-FAIL (fdo#106103, fdo#102614) -> PASS fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103
== Participating hosts (46 -> 42) ==
Additional (1): fi-skl-guc
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* Linux: CI_DRM_4448 -> Patchwork_9576
CI_DRM_4448: e094950bd5b5767bab1d2a5c259635dc6091f8cc @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4543: 366eed37c7c71217e1cb1f3be5e26358a41f0001 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9576: 7b57b62848f96c2c2e92917e603c4bf1ee1909f5 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
7b57b62848f9 drm/i915: Fix assert_plane() warning on bootup with external display
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9576/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915: Fix assert_plane() warning on bootup with external display (rev8)
In reply to Azhar Shaikh== Series Details ==
== Series Details ==
Series: drm/i915: Fix assert_plane() warning on bootup with external display (rev8)
URL : https://patchwork.freedesktop.org/series/44909/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4448_full -> Patchwork_9576_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9576_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_9576_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9576_full:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_schedule@deep-bsd1:
shard-kbl: PASS -> SKIP
igt@gem_exec_schedule@deep-bsd2:
shard-kbl: SKIP -> PASS +3== Known issues ==
Here are the changes found in Patchwork_9576_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_render_linear_blits@basic:
shard-kbl: PASS -> INCOMPLETE (fdo#103665)
igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
shard-glk: PASS -> FAIL (fdo#106509, fdo#105454)
igt@kms_draw_crc@draw-method-rgb565-mmap-wc-ytiled:
shard-glk: PASS -> FAIL (fdo#103184)
igt@kms_setmode@basic:
shard-apl: PASS -> FAIL (fdo#99912)
==== Possible fixes ====
igt@gem_render_copy_redux@normal:
shard-kbl: INCOMPLETE (fdo#103665, fdo#106650) -> PASS
igt@kms_flip@2x-blocking-wf_vblank:
shard-glk: FAIL (fdo#100368) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103184 https://bugs.freedesktop.org/show_bug.cgi?id=103184
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#105454 https://bugs.freedesktop.org/show_bug.cgi?id=105454
fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509
fdo#106650 https://bugs.freedesktop.org/show_bug.cgi?id=106650
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4448 -> Patchwork_9576
CI_DRM_4448: e094950bd5b5767bab1d2a5c259635dc6091f8cc @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4543: 366eed37c7c71217e1cb1f3be5e26358a41f0001 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9576: 7b57b62848f96c2c2e92917e603c4bf1ee1909f5 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9576/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 112 lines
-----Original Message-----
From: Shaikh, Azhar
Sent: Friday, July 6, 2018 11:38 AM
To: [email protected]
Cc: [email protected]; Navare, Manasi D <[email protected]>; Shaikh, Azhar <[email protected]>
Subject: [PATCH v8] drm/i915: Fixassert_plane()warning on bootup with external displayOn KBL, WHL RVPs, booting up with an external display connected, triggers below warning, when the BiOS brings up the external display too. This warning is not seen during hotplug.
[ 3.615226] ------------[ cut here ]------------ [ 3.619829] plane 1A assertion failure (expected on, current off) [ 3.632039] WARNING: CPU: 2 PID: 354 at drivers/gpu/drm/i915/intel_display.c:1294 assert_plane+0x71/0xbb [ 3.633920] iwlwifi 0000:00:14.3: loaded firmware version 38.c0e03d94.0 op_mode iwlmvm [ 3.647157] Modules linked in: iwlwifi cfg80211 btusb btrtl btbcm btintel bluetooth ecdh_generic [ 3.647163] CPU: 2 PID: 354 Comm: frecon Not tainted 4.17.0-rc7-50176- g655af12d39c2 #3 [ 3.647165] Hardware name: Intel Corporation CoffeeLake Client Platform/WhiskeyLake U DDR4 ERB, BIOS CNLSFWR1.R00.X140.B00.1804040304 04/04/2018 [ 3.684509] RIP: 0010:assert_plane+0x71/0xbb [ 3.764451] Call Trace: [ 3.766888] intel_atomic_commit_tail+0xa97/0xb77 [ 3.771569] intel_atomic_commit+0x26a/0x279 [ 3.771572] drm_atomic_helper_set_config+0x5c/0x76 [ 3.780670] __drm_mode_set_config_internal+0x66/0x109 [ 3.780672] drm_mode_setcrtc+0x4c9/0x5cc [ 3.780674] ? drm_mode_getcrtc+0x162/0x162 [ 3.789774] ? drm_mode_getcrtc+0x162/0x162 [ 3.798108] drm_ioctl_kernel+0x8d/0xe4 [ 3.801926] drm_ioctl+0x27d/0x368 [ 3.805311] ? drm_mode_getcrtc+0x162/0x162 [ 3.805314] ? selinux_file_ioctl+0x14e/0x199 [ 3.805317] vfs_ioctl+0x21/0x2f [ 3.813812] do_vfs_ioctl+0x491/0x4b4 [ 3.813813] ? security_file_ioctl+0x37/0x4b [ 3.813816] ksys_ioctl+0x55/0x75 [ 3.820672] __x64_sys_ioctl+0x1a/0x1e [ 3.820674] do_syscall_64+0x51/0x5f [ 3.820678] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 3.828221] RIP: 0033:0x7b5e04953967 [ 3.835504] RSP: 002b:00007fff2eafb6f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 3.835505] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007b5e04953967 [ 3.835505] RDX: 00007fff2eafb730 RSI: 00000000c06864a2 RDI: 000000000000000f [ 3.835506] RBP: 00007fff2eafb720 R08: 0000000000000000 R09: 0000000000000000 [ 3.835507] R10: 0000000000000070 R11: 0000000000000246 R12: 000000000000000f [ 3.879988] R13: 000056bc9dd7d210 R14: 00007fff2eafb730 R15: 00000000c06864a2 [ 3.887081] Code: 48 c7 c7 06 71 a5 be 84 c0 48 c7 c2 06 fd a3 be 48 89 f9 48 0f 44 ca 84 db 48 0f 45 d7 48 c7 c7 df d3 a4 be 31 c0 e8 af a0 c0 ff <0f> 0b eb 2b 48 c7 c7 06 fd a3 be 84 c0 48 c7 c2 06 71 a5 be 48 [ 3.905845] WARNING: CPU: 2 PID: 354 at drivers/gpu/drm/i915/intel_display.c:1294 assert_plane+0x71/0xbb [ 3.920964] ---[ end trace dac692f4ac46391a ]---The warning is seen when
mode_setcrtc()is called for pipeB during bootup and before we get amode_setcrtc()for pipeA, while doingupdate_crtcs()inintel_atomic_commit_tail().
Now since, plane1A is still active after commit,update_crtcs()is done for pipeA and eventuallyupdate_plane()for plane1A.
intel_plane_state->ctlfor plane1A is not updated sinceset_modecrtc()is called for pipeB. Sointel_plane_state->ctlfor plane 1A will be0x0. So doing anupdate_plane()for plane1A, will result in clearingPLANE_CTL_ENABLEbit, and hence the warning.To fix this warning, force all active planes to recompute their states in probe.
Changes in v8:
- Actually add Reviewed-by: Ville Syrjälä <[email protected]>Changes in v7:
- Move call tointel_initial_commit()aftersanitize_watermarks()Otherwise the plane update will still consult potentially bogus watermarks we read out from the hardware. (Ville)
- Carry Reviewed-by: Ville Syrjälä <[email protected]> from v6Changes in v6:
- Handle EDEADLK fordrm_atomic_get_crtc_state()anddrm_atomic_add_affected_planes()
- Remove optimization of callingintel_initial_commit()only when there is more than one active pipe in probe.
- Avoid usingintel_types.Changes in v5:
- Dropdrm_modeset_lock_all_ctx()since locks will be taken later.Changes in v4:
- Handle locking inintel_initial_commit()
- Move the for loop insideintel_initial_commit()so thatdrm_atomic_commit()is called only once
- Callintel_initial_commit()only for more than one active crtc on boot.
- Save the return value ofintel_initial_commit()and print a message in case of an errorChanges in v3:
- Add comments
Quoted 7 lines
Changes in v2:
- Force all planes to recompute their states.(Ville Syrjälä)
- Update the commit messageSigned-off-by Azhar Shaikh <[email protected]>Reviewed-by Ville Syrjälä <[email protected]>---
Can someone please merge/push this change?
Quoted 98 lines
drivers/gpu/drm/i915/intel_display.c| 61
++++++++++++++++++++++++++++++++++--1 file changed, 59 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_display.c +58
-3@@ -15092,12 +15092,61 @@ static void intel_update_fdi_pll_freq(struct drm_i915_private *dev_priv) DRM_DEBUG_DRIVER("FDI PLL freq=%d\n", dev_priv->fdi_pll_freq); } +static int intel_initial_commit (struct drm_device *dev) { +struct drm_atomic_state *state =NULL ; +struct drm_modeset_acquire_ctx ctx; +struct drm_crtc *crtc; +struct drm_crtc_state *crtc_state; +int ret =0 ; + + state =drm_atomic_state_alloc (dev); +if (!state) +return -ENOMEM ; + +drm_modeset_acquire_init (&ctx,0 ); + +retry: + state->acquire_ctx = &ctx; + +drm_for_each_crtc (crtc, dev) { + crtc_state =drm_atomic_get_crtc_state (state, crtc); +if (IS_ERR (crtc_state)) { + ret =PTR_ERR (crtc_state); + goto out; + } + +if (crtc_state->active) { + ret =drm_atomic_add_affected_planes (state, crtc); +if (ret) + goto out; + } + } + + ret =drm_atomic_commit (state); + +out: +if (ret == -EDEADLK ) { +drm_atomic_state_clear (state); +drm_modeset_backoff (&ctx); + goto retry; + } + +drm_atomic_state_put (state); + +drm_modeset_drop_locks (&ctx); +drm_modeset_acquire_fini (&ctx); + +return ret; +} +int intel_modeset_init (struct drm_device *dev) {struct drm_i915_private *dev_priv =to_i915 (dev);struct i915_ggtt *ggtt = &dev_priv->ggtt;enum pipe pipe;struct intel_crtc *crtc; +int ret; dev_priv->modeset_wq =alloc_ordered_workqueue ("i915_modeset" ,0 );@@ -15172,8 +15221,6 @@ int intel_modeset_init(struct drm_device *dev) INTEL_INFO(dev_priv)->num_pipes > 1 ? "s" : "");for_each_pipe (dev_priv, pipe) { -int ret; - ret =intel_crtc_init (dev_priv, pipe);if (ret) {drm_mode_config_cleanup (dev);@@ -15229,6 +15276,16 @@ int intel_modeset_init(struct drm_device *dev)if (!HAS_GMCH_DISPLAY (dev_priv))sanitize_watermarks (dev); +/* +* Force all active planes to recompute their states. So that on +* mode_setcrtc after probe, all the intel_plane_state variables +* are already calculated and there is no assert_plane warnings +* during bootup. +*/ + ret =intel_initial_commit (dev); +if (ret) +DRM_DEBUG_KMS ("Initial commit in probe failed.\n" ); +return 0 ; } --
Quoted 1 line
1.9.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Ville Syrjälä
AppliedQuoted 116 lines · Azhar
Quoted 116 lines
-----Original Message-----
From: Shaikh, Azhar
Sent: Friday, July 6, 2018 11:38 AM
To: [email protected]
Cc: [email protected]; Navare, Manasi D <[email protected]>; Shaikh, Azhar <[email protected]>
Subject: [PATCH v8] drm/i915: Fixassert_plane()warning on bootup with external displayOn KBL, WHL RVPs, booting up with an external display connected, triggers below warning, when the BiOS brings up the external display too. This warning is not seen during hotplug.
[ 3.615226] ------------[ cut here ]------------ [ 3.619829] plane 1A assertion failure (expected on, current off) [ 3.632039] WARNING: CPU: 2 PID: 354 at drivers/gpu/drm/i915/intel_display.c:1294 assert_plane+0x71/0xbb [ 3.633920] iwlwifi 0000:00:14.3: loaded firmware version 38.c0e03d94.0 op_mode iwlmvm [ 3.647157] Modules linked in: iwlwifi cfg80211 btusb btrtl btbcm btintel bluetooth ecdh_generic [ 3.647163] CPU: 2 PID: 354 Comm: frecon Not tainted 4.17.0-rc7-50176- g655af12d39c2 #3 [ 3.647165] Hardware name: Intel Corporation CoffeeLake Client Platform/WhiskeyLake U DDR4 ERB, BIOS CNLSFWR1.R00.X140.B00.1804040304 04/04/2018 [ 3.684509] RIP: 0010:assert_plane+0x71/0xbb [ 3.764451] Call Trace: [ 3.766888] intel_atomic_commit_tail+0xa97/0xb77 [ 3.771569] intel_atomic_commit+0x26a/0x279 [ 3.771572] drm_atomic_helper_set_config+0x5c/0x76 [ 3.780670] __drm_mode_set_config_internal+0x66/0x109 [ 3.780672] drm_mode_setcrtc+0x4c9/0x5cc [ 3.780674] ? drm_mode_getcrtc+0x162/0x162 [ 3.789774] ? drm_mode_getcrtc+0x162/0x162 [ 3.798108] drm_ioctl_kernel+0x8d/0xe4 [ 3.801926] drm_ioctl+0x27d/0x368 [ 3.805311] ? drm_mode_getcrtc+0x162/0x162 [ 3.805314] ? selinux_file_ioctl+0x14e/0x199 [ 3.805317] vfs_ioctl+0x21/0x2f [ 3.813812] do_vfs_ioctl+0x491/0x4b4 [ 3.813813] ? security_file_ioctl+0x37/0x4b [ 3.813816] ksys_ioctl+0x55/0x75 [ 3.820672] __x64_sys_ioctl+0x1a/0x1e [ 3.820674] do_syscall_64+0x51/0x5f [ 3.820678] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 3.828221] RIP: 0033:0x7b5e04953967 [ 3.835504] RSP: 002b:00007fff2eafb6f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 3.835505] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007b5e04953967 [ 3.835505] RDX: 00007fff2eafb730 RSI: 00000000c06864a2 RDI: 000000000000000f [ 3.835506] RBP: 00007fff2eafb720 R08: 0000000000000000 R09: 0000000000000000 [ 3.835507] R10: 0000000000000070 R11: 0000000000000246 R12: 000000000000000f [ 3.879988] R13: 000056bc9dd7d210 R14: 00007fff2eafb730 R15: 00000000c06864a2 [ 3.887081] Code: 48 c7 c7 06 71 a5 be 84 c0 48 c7 c2 06 fd a3 be 48 89 f9 48 0f 44 ca 84 db 48 0f 45 d7 48 c7 c7 df d3 a4 be 31 c0 e8 af a0 c0 ff <0f> 0b eb 2b 48 c7 c7 06 fd a3 be 84 c0 48 c7 c2 06 71 a5 be 48 [ 3.905845] WARNING: CPU: 2 PID: 354 at drivers/gpu/drm/i915/intel_display.c:1294 assert_plane+0x71/0xbb [ 3.920964] ---[ end trace dac692f4ac46391a ]---The warning is seen when
mode_setcrtc()is called for pipeB during bootup and before we get amode_setcrtc()for pipeA, while doingupdate_crtcs()inintel_atomic_commit_tail().
Now since, plane1A is still active after commit,update_crtcs()is done for pipeA and eventuallyupdate_plane()for plane1A.
intel_plane_state->ctlfor plane1A is not updated sinceset_modecrtc()is called for pipeB. Sointel_plane_state->ctlfor plane 1A will be0x0. So doing anupdate_plane()for plane1A, will result in clearingPLANE_CTL_ENABLEbit, and hence the warning.To fix this warning, force all active planes to recompute their states in probe.
Changes in v8:
- Actually add Reviewed-by: Ville Syrjälä <[email protected]>Changes in v7:
- Move call tointel_initial_commit()aftersanitize_watermarks()Otherwise the plane update will still consult potentially bogus watermarks we read out from the hardware. (Ville)
- Carry Reviewed-by: Ville Syrjälä <[email protected]> from v6Changes in v6:
- Handle EDEADLK fordrm_atomic_get_crtc_state()anddrm_atomic_add_affected_planes()
- Remove optimization of callingintel_initial_commit()only when there is more than one active pipe in probe.
- Avoid usingintel_types.Changes in v5:
- Dropdrm_modeset_lock_all_ctx()since locks will be taken later.Changes in v4:
- Handle locking inintel_initial_commit()
- Move the for loop insideintel_initial_commit()so thatdrm_atomic_commit()is called only once
- Callintel_initial_commit()only for more than one active crtc on boot.
- Save the return value ofintel_initial_commit()and print a message in case of an errorChanges in v3:
- Add commentsChanges in v2:
- Force all planes to recompute their states.(Ville Syrjälä)
- Update the commit message
Quoted 5 lines
Quoted 3 lines
Signed-off-by Azhar Shaikh <[email protected]>Reviewed-by Ville Syrjälä <[email protected]>---
Can someone please merge/push this change?
Pushed to dinq. Thanks for the patch.
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx