* [Intel-gfx] [PATCH v2] drm/i915: Add missing deinitialization cases of load failure @ 2020-04-15 19:14 José Roberto de Souza 2020-04-15 19:22 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork ` (6 more replies) 0 siblings, 7 replies; 13+ messages in thread From: José Roberto de Souza @ 2020-04-15 19:14 UTC (permalink / raw) To: intel-gfx; +Cc: Jani Nikula The intel_display_power_put_async() used in TC cold sequences made easy to hit the missing deinitialization of driver in case of load failure as seen in the stack trace bellow. intel_modeset_driver_remove_noirq() had to be removed from i915_driver_modeset_remove_noirq() as those are different initialialition steps with IRQ and GEM initialization in between then. [drm:__intel_engine_init_ctx_wa [i915]] Initialized 3 context workarounds on rcs'0 [drm:__i915_inject_probe_error [i915]] Injecting failure -19 at checkpoint 36 [__uc_init:294] [drm:i915_hdcp_component_unbind [i915]] I915 HDCP comp unbind [drm:edp_panel_vdd_off_sync [i915]] Turning [ENCODER:275:DDI A] VDD off [drm:edp_panel_vdd_off_sync [i915]] PP_STATUS: 0x00000000 PP_CONTROL: 0x00000060 [drm:intel_power_well_disable [i915]] disabling AUX A general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b6b6b: 0000 [#1] PREEMPT SMP NOPTI CPU: 3 PID: 1142 Comm: kworker/u16:20 Tainted: G U 5.6.0-CI-Patchwork_17226+ #1 Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWI1.R00.2457.A16.1912270059 12/27/2019 Workqueue: events_unbound intel_display_power_put_async_work [i915] RIP: 0010:__intel_display_power_put_domain+0xa5/0x180 [i915] Code: 48 85 c0 78 54 44 89 e1 41 bd 01 00 00 00 49 c7 c4 80 44 41 a0 49 d3 e5 eb 0d 48 83 eb 10 48 3b 9d 08 ad 00 00 78 32 48 8b 03 <4c> 85 68 10 74 ea 8b 53 08 85 d2 74 2d 83 ea 01 85 d2 89 53 08 75 RSP: 0018:ffffc9000061fdb0 EFLAGS: 00010206 RAX: 6b6b6b6b6b6b6b6b RBX: ffff8884948f5df0 RCX: 000000000000003d RDX: 0000000080000001 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff888479be0000 R08: ffff88849a180920 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa0414480 R13: 2000000000000000 R14: ffff888479beb320 R15: 2000000000000000 FS: 0000000000000000(0000) GS:ffff88849ff80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005634fa8ed670 CR3: 0000000005610004 CR4: 0000000000760ee0 PKRU: 55555554 Call Trace: release_async_put_domains+0x9b/0x110 [i915] intel_display_power_put_async_work+0x91/0xf0 [i915] process_one_work+0x260/0x600 ? worker_thread+0xc9/0x380 worker_thread+0x37/0x380 ? process_one_work+0x600/0x600 kthread+0x119/0x130 ? kthread_park+0x80/0x80 ret_from_fork+0x24/0x50 Modules linked in: i915(+) vgem snd_hda_codec_hdmi mei_hdcp x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul cdc_ether usbnet mii snd_intel_dspcfg ghash_clmulni_intel snd_hda_codec snd_hwdep snd_hda_core e1000e ptp mei_me snd_pcm pps_core mei intel_lpss_pci prime_numbers [last unloaded: i915] ---[ end trace b402d1b4060f8b97 ]--- BUG: sleeping function called from invalid context at kernel/sched/completion.c:99 in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 1142, name: kworker/u16:20 INFO: lockdep is turned off. Preemption disabled at: [<0000000000000000>] 0x0 CPU: 3 PID: 1142 Comm: kworker/u16:20 Tainted: G UD 5.6.0-CI-Patchwork_17226+ #1 Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWI1.R00.2457.A16.1912270059 12/27/2019 Workqueue: events_unbound intel_display_power_put_async_work [i915] Call Trace: dump_stack+0x71/0x9b ___might_sleep+0x178/0x260 wait_for_completion+0x37/0x1a0 virt_efi_query_variable_info+0x161/0x1b0 efi_query_variable_store+0xb3/0x1a0 ? efivar_entry_set_safe+0x19c/0x220 efivar_entry_set_safe+0x19c/0x220 ? efi_pstore_write+0x10b/0x150 ? efi_pstore_write+0xa0/0x150 efi_pstore_write+0x10b/0x150 pstore_dump+0x123/0x340 kmsg_dump+0x87/0x1b0 oops_end+0x3e/0x90 do_general_protection+0x1c3/0x2f0 general_protection+0x2d/0x40 RIP: 0010:__intel_display_power_put_domain+0xa5/0x180 [i915] Code: 48 85 c0 78 54 44 89 e1 41 bd 01 00 00 00 49 c7 c4 80 44 41 a0 49 d3 e5 eb 0d 48 83 eb 10 48 3b 9d 08 ad 00 00 78 32 48 8b 03 <4c> 85 68 10 74 ea 8b 53 08 85 d2 74 2d 83 ea 01 85 d2 89 53 08 75 RSP: 0018:ffffc9000061fdb0 EFLAGS: 00010206 RAX: 6b6b6b6b6b6b6b6b RBX: ffff8884948f5df0 RCX: 000000000000003d RDX: 0000000080000001 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff888479be0000 R08: ffff88849a180920 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa0414480 R13: 2000000000000000 R14: ffff888479beb320 R15: 2000000000000000 release_async_put_domains+0x9b/0x110 [i915] intel_display_power_put_async_work+0x91/0xf0 [i915] process_one_work+0x260/0x600 ? worker_thread+0xc9/0x380 worker_thread+0x37/0x380 ? process_one_work+0x600/0x600 kthread+0x119/0x130 ? kthread_park+0x80/0x80 ret_from_fork+0x24/0x50 ------------[ cut here ]------------ WARNING: CPU: 3 PID: 1142 at kernel/rcu/tree_plugin.h:293 rcu_note_context_switch+0x87/0x650 Modules linked in: i915(+) vgem snd_hda_codec_hdmi mei_hdcp x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul cdc_ether usbnet mii snd_intel_dspcfg ghash_clmulni_intel snd_hda_codec snd_hwdep snd_hda_core e1000e ptp mei_me snd_pcm pps_core mei intel_lpss_pci prime_numbers [last unloaded: i915] v2: - fixed handling in case of failure in drm_vblank_init() - moved i915_gem_driver_remove() call to before i915_driver_modeset_remove_noirq() this match initialization order too Closes: https://gitlab.freedesktop.org/drm/intel/issues/1647 Cc: Imre Deak <imre.deak@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Jani Nikula <jani.nikula@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> --- drivers/gpu/drm/i915/i915_drv.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 641f5e03b661..e31535744060 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -228,7 +228,7 @@ static int i915_driver_modeset_probe_noirq(struct drm_i915_private *i915) ret = drm_vblank_init(&i915->drm, INTEL_NUM_PIPES(i915)); if (ret) - goto out; + return ret; } intel_bios_init(i915); @@ -248,8 +248,11 @@ static int i915_driver_modeset_probe_noirq(struct drm_i915_private *i915) return 0; cleanup_vga_client: + intel_csr_ucode_fini(i915); + intel_power_domains_driver_remove(i915); intel_vga_unregister(i915); out: + intel_bios_driver_remove(i915); return ret; } @@ -308,13 +311,13 @@ static void i915_driver_modeset_remove(struct drm_i915_private *i915) /* part #2: call after irq uninstall */ static void i915_driver_modeset_remove_noirq(struct drm_i915_private *i915) { - intel_modeset_driver_remove_noirq(i915); + intel_csr_ucode_fini(i915); - intel_bios_driver_remove(i915); + intel_power_domains_driver_remove(i915); intel_vga_unregister(i915); - intel_csr_ucode_fini(i915); + intel_bios_driver_remove(i915); } static void intel_init_dpio(struct drm_i915_private *dev_priv) @@ -992,7 +995,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent) out_cleanup_irq: intel_irq_uninstall(i915); out_cleanup_modeset: - /* FIXME */ + i915_driver_modeset_remove_noirq(i915); out_cleanup_hw: i915_driver_hw_remove(i915); intel_memory_regions_driver_release(i915); @@ -1029,12 +1032,13 @@ void i915_driver_remove(struct drm_i915_private *i915) intel_irq_uninstall(i915); - i915_driver_modeset_remove_noirq(i915); + intel_modeset_driver_remove_noirq(i915); - i915_reset_error_state(i915); i915_gem_driver_remove(i915); - intel_power_domains_driver_remove(i915); + i915_driver_modeset_remove_noirq(i915); + + i915_reset_error_state(i915); i915_driver_hw_remove(i915); -- 2.26.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Add missing deinitialization cases of load failure 2020-04-15 19:14 [Intel-gfx] [PATCH v2] drm/i915: Add missing deinitialization cases of load failure José Roberto de Souza @ 2020-04-15 19:22 ` Patchwork 2020-04-15 19:36 ` [Intel-gfx] [PATCH v2] " Chris Wilson ` (5 subsequent siblings) 6 siblings, 0 replies; 13+ messages in thread From: Patchwork @ 2020-04-15 19:22 UTC (permalink / raw) To: José Roberto de Souza; +Cc: intel-gfx == Series Details == Series: drm/i915: Add missing deinitialization cases of load failure URL : https://patchwork.freedesktop.org/series/75987/ State : warning == Summary == $ dim checkpatch origin/drm-tip 40cdb21a2c1e drm/i915: Add missing deinitialization cases of load failure -:17: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #17: [drm:__intel_engine_init_ctx_wa [i915]] Initialized 3 context workarounds on rcs'0 total: 0 errors, 1 warnings, 0 checks, 59 lines checked _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Intel-gfx] [PATCH v2] drm/i915: Add missing deinitialization cases of load failure 2020-04-15 19:14 [Intel-gfx] [PATCH v2] drm/i915: Add missing deinitialization cases of load failure José Roberto de Souza 2020-04-15 19:22 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork @ 2020-04-15 19:36 ` Chris Wilson 2020-04-16 19:10 ` Souza, Jose 2020-04-15 19:39 ` [Intel-gfx] ✗ Fi.CI.DOCS: warning for " Patchwork ` (4 subsequent siblings) 6 siblings, 1 reply; 13+ messages in thread From: Chris Wilson @ 2020-04-15 19:36 UTC (permalink / raw) To: José Roberto de Souza, intel-gfx; +Cc: Jani Nikula Quoting José Roberto de Souza (2020-04-15 20:14:08) > + i915_reset_error_state(i915); If you are bored, we should move this to unregister as that is the last point at which it can be accessed from userspace. Hopefully I remember next time we are rearranging this sequence. -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Intel-gfx] [PATCH v2] drm/i915: Add missing deinitialization cases of load failure 2020-04-15 19:36 ` [Intel-gfx] [PATCH v2] " Chris Wilson @ 2020-04-16 19:10 ` Souza, Jose 0 siblings, 0 replies; 13+ messages in thread From: Souza, Jose @ 2020-04-16 19:10 UTC (permalink / raw) To: intel-gfx, chris; +Cc: Nikula, Jani On Wed, 2020-04-15 at 20:36 +0100, Chris Wilson wrote: > Quoting José Roberto de Souza (2020-04-15 20:14:08) > > + i915_reset_error_state(i915); > > If you are bored, we should move this to unregister as that is the > last > point at which it can be accessed from userspace. Hopefully I > remember > next time we are rearranging this sequence. What if some error happen up to i915_gem_driver_remove()? We would leak a i915_gpu_coredump. Looks to me that i915_reset_error_state() should be called after i915_gem_driver_remove(). > -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 13+ messages in thread
* [Intel-gfx] ✗ Fi.CI.DOCS: warning for drm/i915: Add missing deinitialization cases of load failure 2020-04-15 19:14 [Intel-gfx] [PATCH v2] drm/i915: Add missing deinitialization cases of load failure José Roberto de Souza 2020-04-15 19:22 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork 2020-04-15 19:36 ` [Intel-gfx] [PATCH v2] " Chris Wilson @ 2020-04-15 19:39 ` Patchwork 2020-04-15 19:45 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork ` (3 subsequent siblings) 6 siblings, 0 replies; 13+ messages in thread From: Patchwork @ 2020-04-15 19:39 UTC (permalink / raw) To: José Roberto de Souza; +Cc: intel-gfx == Series Details == Series: drm/i915: Add missing deinitialization cases of load failure URL : https://patchwork.freedesktop.org/series/75987/ State : warning == Summary == $ make htmldocs 2>&1 > /dev/null | grep i915 /home/cidrm/kernel/Documentation/gpu/i915.rst:610: WARNING: duplicate label gpu/i915:layout, other instance in /home/cidrm/kernel/Documentation/gpu/i915.rst _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 13+ messages in thread
* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Add missing deinitialization cases of load failure 2020-04-15 19:14 [Intel-gfx] [PATCH v2] drm/i915: Add missing deinitialization cases of load failure José Roberto de Souza ` (2 preceding siblings ...) 2020-04-15 19:39 ` [Intel-gfx] ✗ Fi.CI.DOCS: warning for " Patchwork @ 2020-04-15 19:45 ` Patchwork 2020-04-15 19:51 ` [Intel-gfx] [PATCH v2] " Chris Wilson ` (2 subsequent siblings) 6 siblings, 0 replies; 13+ messages in thread From: Patchwork @ 2020-04-15 19:45 UTC (permalink / raw) To: José Roberto de Souza; +Cc: intel-gfx == Series Details == Series: drm/i915: Add missing deinitialization cases of load failure URL : https://patchwork.freedesktop.org/series/75987/ State : success == Summary == CI Bug Log - changes from CI_DRM_8302 -> Patchwork_17316 ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/index.html Known issues ------------ Here are the changes found in Patchwork_17316 that come from known issues: ### IGT changes ### #### Warnings #### * igt@i915_pm_rpm@module-reload: - fi-kbl-x1275: [FAIL][1] ([i915#62] / [i915#95]) -> [SKIP][2] ([fdo#109271]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/fi-kbl-x1275/igt@i915_pm_rpm@module-reload.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/fi-kbl-x1275/igt@i915_pm_rpm@module-reload.html [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62 [i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95 Participating hosts (52 -> 45) ------------------------------ Missing (7): fi-hsw-4200u fi-skl-6770hq fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus Build changes ------------- * CI: CI-20190529 -> None * Linux: CI_DRM_8302 -> Patchwork_17316 CI-20190529: 20190529 CI_DRM_8302: e022648f1633f24b4ec326805f1de22209826519 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5591: f57b7fdbe8d04ce3edf0433a03c7d9d5c3d96680 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_17316: 40cdb21a2c1ee7f94a8f8754870d0d3ee3b85f11 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 40cdb21a2c1e drm/i915: Add missing deinitialization cases of load failure == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/index.html _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Intel-gfx] [PATCH v2] drm/i915: Add missing deinitialization cases of load failure 2020-04-15 19:14 [Intel-gfx] [PATCH v2] drm/i915: Add missing deinitialization cases of load failure José Roberto de Souza ` (3 preceding siblings ...) 2020-04-15 19:45 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork @ 2020-04-15 19:51 ` Chris Wilson 2020-04-16 16:08 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " Patchwork 2020-04-16 16:42 ` [Intel-gfx] [PATCH v2] " Imre Deak 6 siblings, 0 replies; 13+ messages in thread From: Chris Wilson @ 2020-04-15 19:51 UTC (permalink / raw) To: José Roberto de Souza, intel-gfx; +Cc: Jani Nikula Quoting José Roberto de Souza (2020-04-15 20:14:08) > The intel_display_power_put_async() used in TC cold sequences made > easy to hit the missing deinitialization of driver in case of load > failure as seen in the stack trace bellow. > > intel_modeset_driver_remove_noirq() had to be removed from > i915_driver_modeset_remove_noirq() as those are different > initialialition steps with IRQ and GEM initialization in between then. > > [drm:__intel_engine_init_ctx_wa [i915]] Initialized 3 context workarounds on rcs'0 > [drm:__i915_inject_probe_error [i915]] Injecting failure -19 at checkpoint 36 [__uc_init:294] > [drm:i915_hdcp_component_unbind [i915]] I915 HDCP comp unbind > [drm:edp_panel_vdd_off_sync [i915]] Turning [ENCODER:275:DDI A] VDD off > [drm:edp_panel_vdd_off_sync [i915]] PP_STATUS: 0x00000000 PP_CONTROL: 0x00000060 > [drm:intel_power_well_disable [i915]] disabling AUX A > general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b6b6b: 0000 [#1] PREEMPT SMP NOPTI > CPU: 3 PID: 1142 Comm: kworker/u16:20 Tainted: G U 5.6.0-CI-Patchwork_17226+ #1 > Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWI1.R00.2457.A16.1912270059 12/27/2019 > Workqueue: events_unbound intel_display_power_put_async_work [i915] > RIP: 0010:__intel_display_power_put_domain+0xa5/0x180 [i915] > Code: 48 85 c0 78 54 44 89 e1 41 bd 01 00 00 00 49 c7 c4 80 44 41 a0 49 d3 e5 eb 0d 48 83 eb 10 48 3b 9d 08 ad 00 00 78 32 48 8b 03 <4c> 85 68 10 74 ea 8b 53 08 85 d2 74 2d 83 ea 01 85 d2 89 53 08 75 > RSP: 0018:ffffc9000061fdb0 EFLAGS: 00010206 > RAX: 6b6b6b6b6b6b6b6b RBX: ffff8884948f5df0 RCX: 000000000000003d > RDX: 0000000080000001 RSI: 0000000000000000 RDI: 0000000000000000 > RBP: ffff888479be0000 R08: ffff88849a180920 R09: 0000000000000000 > R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa0414480 > R13: 2000000000000000 R14: ffff888479beb320 R15: 2000000000000000 > FS: 0000000000000000(0000) GS:ffff88849ff80000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 00005634fa8ed670 CR3: 0000000005610004 CR4: 0000000000760ee0 > PKRU: 55555554 > Call Trace: > release_async_put_domains+0x9b/0x110 [i915] > intel_display_power_put_async_work+0x91/0xf0 [i915] > process_one_work+0x260/0x600 > ? worker_thread+0xc9/0x380 > worker_thread+0x37/0x380 > ? process_one_work+0x600/0x600 > kthread+0x119/0x130 > ? kthread_park+0x80/0x80 > ret_from_fork+0x24/0x50 > Modules linked in: i915(+) vgem snd_hda_codec_hdmi mei_hdcp x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul cdc_ether usbnet mii snd_intel_dspcfg ghash_clmulni_intel snd_hda_codec snd_hwdep snd_hda_core e1000e ptp mei_me snd_pcm pps_core mei intel_lpss_pci prime_numbers [last unloaded: i915] > ---[ end trace b402d1b4060f8b97 ]--- > BUG: sleeping function called from invalid context at kernel/sched/completion.c:99 > in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 1142, name: kworker/u16:20 > INFO: lockdep is turned off. > Preemption disabled at: > [<0000000000000000>] 0x0 > CPU: 3 PID: 1142 Comm: kworker/u16:20 Tainted: G UD 5.6.0-CI-Patchwork_17226+ #1 > Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWI1.R00.2457.A16.1912270059 12/27/2019 > Workqueue: events_unbound intel_display_power_put_async_work [i915] > Call Trace: > dump_stack+0x71/0x9b > ___might_sleep+0x178/0x260 > wait_for_completion+0x37/0x1a0 > virt_efi_query_variable_info+0x161/0x1b0 > efi_query_variable_store+0xb3/0x1a0 > ? efivar_entry_set_safe+0x19c/0x220 > efivar_entry_set_safe+0x19c/0x220 > ? efi_pstore_write+0x10b/0x150 > ? efi_pstore_write+0xa0/0x150 > efi_pstore_write+0x10b/0x150 > pstore_dump+0x123/0x340 > kmsg_dump+0x87/0x1b0 > oops_end+0x3e/0x90 > do_general_protection+0x1c3/0x2f0 > general_protection+0x2d/0x40 > RIP: 0010:__intel_display_power_put_domain+0xa5/0x180 [i915] > Code: 48 85 c0 78 54 44 89 e1 41 bd 01 00 00 00 49 c7 c4 80 44 41 a0 49 d3 e5 eb 0d 48 83 eb 10 48 3b 9d 08 ad 00 00 78 32 48 8b 03 <4c> 85 68 10 74 ea 8b 53 08 85 d2 74 2d 83 ea 01 85 d2 89 53 08 75 > RSP: 0018:ffffc9000061fdb0 EFLAGS: 00010206 > RAX: 6b6b6b6b6b6b6b6b RBX: ffff8884948f5df0 RCX: 000000000000003d > RDX: 0000000080000001 RSI: 0000000000000000 RDI: 0000000000000000 > RBP: ffff888479be0000 R08: ffff88849a180920 R09: 0000000000000000 > R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa0414480 > R13: 2000000000000000 R14: ffff888479beb320 R15: 2000000000000000 > release_async_put_domains+0x9b/0x110 [i915] > intel_display_power_put_async_work+0x91/0xf0 [i915] > process_one_work+0x260/0x600 > ? worker_thread+0xc9/0x380 > worker_thread+0x37/0x380 > ? process_one_work+0x600/0x600 > kthread+0x119/0x130 > ? kthread_park+0x80/0x80 > ret_from_fork+0x24/0x50 > ------------[ cut here ]------------ > WARNING: CPU: 3 PID: 1142 at kernel/rcu/tree_plugin.h:293 rcu_note_context_switch+0x87/0x650 > Modules linked in: i915(+) vgem snd_hda_codec_hdmi mei_hdcp x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul cdc_ether usbnet mii snd_intel_dspcfg ghash_clmulni_intel snd_hda_codec snd_hwdep snd_hda_core e1000e ptp mei_me snd_pcm pps_core mei intel_lpss_pci prime_numbers [last unloaded: i915] > > v2: > - fixed handling in case of failure in drm_vblank_init() > - moved i915_gem_driver_remove() call to before > i915_driver_modeset_remove_noirq() this match initialization order too > > Closes: https://gitlab.freedesktop.org/drm/intel/issues/1647 > Cc: Imre Deak <imre.deak@intel.com> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > Cc: Jani Nikula <jani.nikula@intel.com> > Signed-off-by: José Roberto de Souza <jose.souza@intel.com> > --- > drivers/gpu/drm/i915/i915_drv.c | 20 ++++++++++++-------- > 1 file changed, 12 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c > index 641f5e03b661..e31535744060 100644 > --- a/drivers/gpu/drm/i915/i915_drv.c > +++ b/drivers/gpu/drm/i915/i915_drv.c > @@ -228,7 +228,7 @@ static int i915_driver_modeset_probe_noirq(struct drm_i915_private *i915) > ret = drm_vblank_init(&i915->drm, > INTEL_NUM_PIPES(i915)); > if (ret) > - goto out; > + return ret; > } > > intel_bios_init(i915); > @@ -248,8 +248,11 @@ static int i915_driver_modeset_probe_noirq(struct drm_i915_private *i915) > return 0; > > cleanup_vga_client: > + intel_csr_ucode_fini(i915); > + intel_power_domains_driver_remove(i915); > intel_vga_unregister(i915); > out: Someone might quibble that the label should be more descriptive of its new role. > + intel_bios_driver_remove(i915); > return ret; > } > > @@ -308,13 +311,13 @@ static void i915_driver_modeset_remove(struct drm_i915_private *i915) > /* part #2: call after irq uninstall */ > static void i915_driver_modeset_remove_noirq(struct drm_i915_private *i915) > { > - intel_modeset_driver_remove_noirq(i915); moved to caller > + intel_csr_ucode_fini(i915); reordered > > - intel_bios_driver_remove(i915); reordered > + intel_power_domains_driver_remove(i915); pulled from caller > > intel_vga_unregister(i915); > > - intel_csr_ucode_fini(i915); > + intel_bios_driver_remove(i915); reordered. > } > > static void intel_init_dpio(struct drm_i915_private *dev_priv) > @@ -992,7 +995,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > out_cleanup_irq: > intel_irq_uninstall(i915); > out_cleanup_modeset: > - /* FIXME */ > + i915_driver_modeset_remove_noirq(i915); > out_cleanup_hw: > i915_driver_hw_remove(i915); > intel_memory_regions_driver_release(i915); > @@ -1029,12 +1032,13 @@ void i915_driver_remove(struct drm_i915_private *i915) > > intel_irq_uninstall(i915); > > - i915_driver_modeset_remove_noirq(i915); > + intel_modeset_driver_remove_noirq(i915); > > - i915_reset_error_state(i915); > i915_gem_driver_remove(i915); > > - intel_power_domains_driver_remove(i915); > + i915_driver_modeset_remove_noirq(i915); > + > + i915_reset_error_state(i915); Ok, so the net result is just that the sequence is reordered (plus the FIXME). Aiui, fixing the FIXME is the critical part for reload-with-fault-injection. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 13+ messages in thread
* [Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Add missing deinitialization cases of load failure 2020-04-15 19:14 [Intel-gfx] [PATCH v2] drm/i915: Add missing deinitialization cases of load failure José Roberto de Souza ` (4 preceding siblings ...) 2020-04-15 19:51 ` [Intel-gfx] [PATCH v2] " Chris Wilson @ 2020-04-16 16:08 ` Patchwork 2020-04-16 16:42 ` [Intel-gfx] [PATCH v2] " Imre Deak 6 siblings, 0 replies; 13+ messages in thread From: Patchwork @ 2020-04-16 16:08 UTC (permalink / raw) To: Souza, Jose; +Cc: intel-gfx == Series Details == Series: drm/i915: Add missing deinitialization cases of load failure URL : https://patchwork.freedesktop.org/series/75987/ State : success == Summary == CI Bug Log - changes from CI_DRM_8302_full -> Patchwork_17316_full ==================================================== Summary ------- **SUCCESS** No regressions found. Possible new issues ------------------- Here are the unknown changes that may have been introduced in Patchwork_17316_full: ### IGT changes ### #### Suppressed #### The following results come from untrusted machines, tests, or statuses. They do not affect the overall result. * {igt@gem_wait@write-busy@rcs0}: - shard-glk: [PASS][1] -> [FAIL][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/shard-glk9/igt@gem_wait@write-busy@rcs0.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/shard-glk4/igt@gem_wait@write-busy@rcs0.html Known issues ------------ Here are the changes found in Patchwork_17316_full that come from known issues: ### IGT changes ### #### Issues hit #### * igt@kms_draw_crc@draw-method-rgb565-pwrite-untiled: - shard-skl: [PASS][3] -> [FAIL][4] ([i915#177] / [i915#52] / [i915#54]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/shard-skl9/igt@kms_draw_crc@draw-method-rgb565-pwrite-untiled.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/shard-skl9/igt@kms_draw_crc@draw-method-rgb565-pwrite-untiled.html * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt: - shard-tglb: [PASS][5] -> [SKIP][6] ([i915#668]) +7 similar issues [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/shard-tglb5/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/shard-tglb6/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt.html * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes: - shard-skl: [PASS][7] -> [INCOMPLETE][8] ([i915#648] / [i915#69]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/shard-skl1/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/shard-skl1/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes.html * igt@kms_psr2_su@frontbuffer: - shard-iclb: [PASS][9] -> [SKIP][10] ([fdo#109642] / [fdo#111068]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/shard-iclb2/igt@kms_psr2_su@frontbuffer.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/shard-iclb5/igt@kms_psr2_su@frontbuffer.html * igt@kms_psr@psr2_suspend: - shard-iclb: [PASS][11] -> [SKIP][12] ([fdo#109441]) +2 similar issues [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/shard-iclb2/igt@kms_psr@psr2_suspend.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/shard-iclb8/igt@kms_psr@psr2_suspend.html * igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend: - shard-skl: [PASS][13] -> [INCOMPLETE][14] ([i915#69]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/shard-skl4/igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/shard-skl6/igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend.html * igt@kms_vblank@pipe-c-ts-continuation-suspend: - shard-apl: [PASS][15] -> [DMESG-WARN][16] ([i915#180]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/shard-apl7/igt@kms_vblank@pipe-c-ts-continuation-suspend.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/shard-apl4/igt@kms_vblank@pipe-c-ts-continuation-suspend.html #### Possible fixes #### * {igt@gem_ctx_isolation@preservation-s3@vcs0}: - shard-kbl: [DMESG-WARN][17] ([i915#180]) -> [PASS][18] +3 similar issues [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/shard-kbl4/igt@gem_ctx_isolation@preservation-s3@vcs0.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/shard-kbl2/igt@gem_ctx_isolation@preservation-s3@vcs0.html * igt@i915_module_load@reload-with-fault-injection: - shard-kbl: [INCOMPLETE][19] ([i915#1423]) -> [PASS][20] [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/shard-kbl3/igt@i915_module_load@reload-with-fault-injection.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/shard-kbl7/igt@i915_module_load@reload-with-fault-injection.html - shard-apl: [INCOMPLETE][21] ([i915#1423]) -> [PASS][22] [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/shard-apl6/igt@i915_module_load@reload-with-fault-injection.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/shard-apl4/igt@i915_module_load@reload-with-fault-injection.html * igt@i915_pm_dc@dc6-dpms: - shard-iclb: [FAIL][23] ([i915#454]) -> [PASS][24] [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/shard-iclb1/igt@i915_pm_dc@dc6-dpms.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/shard-iclb2/igt@i915_pm_dc@dc6-dpms.html * igt@kms_color@pipe-a-degamma: - shard-skl: [FAIL][25] ([fdo#108145] / [i915#71]) -> [PASS][26] [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/shard-skl2/igt@kms_color@pipe-a-degamma.html [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/shard-skl2/igt@kms_color@pipe-a-degamma.html * igt@kms_cursor_crc@pipe-a-cursor-128x42-onscreen: - shard-skl: [FAIL][27] ([i915#54]) -> [PASS][28] [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/shard-skl8/igt@kms_cursor_crc@pipe-a-cursor-128x42-onscreen.html [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/shard-skl3/igt@kms_cursor_crc@pipe-a-cursor-128x42-onscreen.html * igt@kms_cursor_crc@pipe-c-cursor-suspend: - shard-kbl: [INCOMPLETE][29] ([i915#155]) -> [PASS][30] [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/shard-kbl1/igt@kms_cursor_crc@pipe-c-cursor-suspend.html [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/shard-kbl7/igt@kms_cursor_crc@pipe-c-cursor-suspend.html * igt@kms_dp_dsc@basic-dsc-enable-edp: - shard-iclb: [SKIP][31] ([fdo#109349]) -> [PASS][32] [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/shard-iclb1/igt@kms_dp_dsc@basic-dsc-enable-edp.html [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/shard-iclb2/igt@kms_dp_dsc@basic-dsc-enable-edp.html * {igt@kms_flip@flip-vs-suspend@c-dp1}: - shard-apl: [DMESG-WARN][33] ([i915#180]) -> [PASS][34] [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/shard-apl8/igt@kms_flip@flip-vs-suspend@c-dp1.html [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/shard-apl1/igt@kms_flip@flip-vs-suspend@c-dp1.html * igt@kms_hdr@bpc-switch-dpms: - shard-skl: [FAIL][35] ([i915#1188]) -> [PASS][36] [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/shard-skl7/igt@kms_hdr@bpc-switch-dpms.html [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/shard-skl6/igt@kms_hdr@bpc-switch-dpms.html * igt@kms_plane_alpha_blend@pipe-b-coverage-7efc: - shard-skl: [FAIL][37] ([fdo#108145] / [i915#265]) -> [PASS][38] +1 similar issue [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/shard-skl7/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/shard-skl6/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html * igt@kms_psr@psr2_cursor_plane_move: - shard-iclb: [SKIP][39] ([fdo#109441]) -> [PASS][40] +2 similar issues [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/shard-iclb1/igt@kms_psr@psr2_cursor_plane_move.html [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/shard-iclb2/igt@kms_psr@psr2_cursor_plane_move.html #### Warnings #### * igt@i915_pm_dc@dc6-dpms: - shard-skl: [FAIL][41] ([i915#1665]) -> [FAIL][42] ([i915#454]) [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/shard-skl5/igt@i915_pm_dc@dc6-dpms.html [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/shard-skl10/igt@i915_pm_dc@dc6-dpms.html * igt@i915_pm_rpm@gem-idle: - shard-snb: [INCOMPLETE][43] ([i915#82]) -> [SKIP][44] ([fdo#109271]) [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8302/shard-snb4/igt@i915_pm_rpm@gem-idle.html [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17316/shard-snb6/igt@i915_pm_rpm@gem-idle.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349 [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441 [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642 [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068 [i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188 [i915#1423]: https://gitlab.freedesktop.org/drm/intel/issues/1423 [i915#1532]: https://gitlab.freedesktop.org/drm/intel/issues/1532 [i915#155]: https://gitlab.freedesktop.org/drm/intel/issues/155 [i915#1665]: https://gitlab.freedesktop.org/drm/intel/issues/1665 [i915#177]: https://gitlab.freedesktop.org/drm/intel/issues/177 [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180 [i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265 [i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454 [i915#52]: https://gitlab.freedesktop.org/drm/intel/issues/52 [i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54 [i915#648]: https://gitlab.freedesktop.org/drm/intel/issues/648 [i915#668]: https://gitlab.freedesktop.org/drm/intel/issues/668 [i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69 [i915#71]: https://gitlab.freedesktop.org/drm/intel/issues/71 [i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82 Participating hosts (10 -> 10) ------------------------------ No changes in participating hosts Build changes ------------- * CI: CI-20190529 -> None * Linux: CI_DRM_8302 -> Patchwork_17316 CI-20190529: 20190529 CI_DRM_8302: e022648f1633f24b4ec326805f1de22209826519 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5591: f57b7fdbe8d04ce3edf0433a03c7d9d5c3d96680 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_17316: 40cdb21a2c1ee7f94a8f8754870d0d3ee3b85f11 @ 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_17316/index.html _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Intel-gfx] [PATCH v2] drm/i915: Add missing deinitialization cases of load failure 2020-04-15 19:14 [Intel-gfx] [PATCH v2] drm/i915: Add missing deinitialization cases of load failure José Roberto de Souza ` (5 preceding siblings ...) 2020-04-16 16:08 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " Patchwork @ 2020-04-16 16:42 ` Imre Deak 2020-04-16 17:03 ` Souza, Jose 6 siblings, 1 reply; 13+ messages in thread From: Imre Deak @ 2020-04-16 16:42 UTC (permalink / raw) To: José Roberto de Souza; +Cc: Jani Nikula, intel-gfx On Wed, Apr 15, 2020 at 12:14:08PM -0700, José Roberto de Souza wrote: > The intel_display_power_put_async() used in TC cold sequences made > easy to hit the missing deinitialization of driver in case of load > failure as seen in the stack trace bellow. > > intel_modeset_driver_remove_noirq() had to be removed from > i915_driver_modeset_remove_noirq() as those are different > initialialition steps with IRQ and GEM initialization in between then. > > [drm:__intel_engine_init_ctx_wa [i915]] Initialized 3 context workarounds on rcs'0 > [drm:__i915_inject_probe_error [i915]] Injecting failure -19 at checkpoint 36 [__uc_init:294] > [drm:i915_hdcp_component_unbind [i915]] I915 HDCP comp unbind > [drm:edp_panel_vdd_off_sync [i915]] Turning [ENCODER:275:DDI A] VDD off > [drm:edp_panel_vdd_off_sync [i915]] PP_STATUS: 0x00000000 PP_CONTROL: 0x00000060 > [drm:intel_power_well_disable [i915]] disabling AUX A > general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b6b6b: 0000 [#1] PREEMPT SMP NOPTI > CPU: 3 PID: 1142 Comm: kworker/u16:20 Tainted: G U 5.6.0-CI-Patchwork_17226+ #1 > Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWI1.R00.2457.A16.1912270059 12/27/2019 > Workqueue: events_unbound intel_display_power_put_async_work [i915] > RIP: 0010:__intel_display_power_put_domain+0xa5/0x180 [i915] > Code: 48 85 c0 78 54 44 89 e1 41 bd 01 00 00 00 49 c7 c4 80 44 41 a0 49 d3 e5 eb 0d 48 83 eb 10 48 3b 9d 08 ad 00 00 78 32 48 8b 03 <4c> 85 68 10 74 ea 8b 53 08 85 d2 74 2d 83 ea 01 85 d2 89 53 08 75 > RSP: 0018:ffffc9000061fdb0 EFLAGS: 00010206 > RAX: 6b6b6b6b6b6b6b6b RBX: ffff8884948f5df0 RCX: 000000000000003d > RDX: 0000000080000001 RSI: 0000000000000000 RDI: 0000000000000000 > RBP: ffff888479be0000 R08: ffff88849a180920 R09: 0000000000000000 > R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa0414480 > R13: 2000000000000000 R14: ffff888479beb320 R15: 2000000000000000 > FS: 0000000000000000(0000) GS:ffff88849ff80000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 00005634fa8ed670 CR3: 0000000005610004 CR4: 0000000000760ee0 > PKRU: 55555554 > Call Trace: > release_async_put_domains+0x9b/0x110 [i915] > intel_display_power_put_async_work+0x91/0xf0 [i915] > process_one_work+0x260/0x600 > ? worker_thread+0xc9/0x380 > worker_thread+0x37/0x380 > ? process_one_work+0x600/0x600 > kthread+0x119/0x130 > ? kthread_park+0x80/0x80 > ret_from_fork+0x24/0x50 > Modules linked in: i915(+) vgem snd_hda_codec_hdmi mei_hdcp x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul cdc_ether usbnet mii snd_intel_dspcfg ghash_clmulni_intel snd_hda_codec snd_hwdep snd_hda_core e1000e ptp mei_me snd_pcm pps_core mei intel_lpss_pci prime_numbers [last unloaded: i915] > ---[ end trace b402d1b4060f8b97 ]--- > BUG: sleeping function called from invalid context at kernel/sched/completion.c:99 > in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 1142, name: kworker/u16:20 > INFO: lockdep is turned off. > Preemption disabled at: > [<0000000000000000>] 0x0 > CPU: 3 PID: 1142 Comm: kworker/u16:20 Tainted: G UD 5.6.0-CI-Patchwork_17226+ #1 > Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWI1.R00.2457.A16.1912270059 12/27/2019 > Workqueue: events_unbound intel_display_power_put_async_work [i915] > Call Trace: > dump_stack+0x71/0x9b > ___might_sleep+0x178/0x260 > wait_for_completion+0x37/0x1a0 > virt_efi_query_variable_info+0x161/0x1b0 > efi_query_variable_store+0xb3/0x1a0 > ? efivar_entry_set_safe+0x19c/0x220 > efivar_entry_set_safe+0x19c/0x220 > ? efi_pstore_write+0x10b/0x150 > ? efi_pstore_write+0xa0/0x150 > efi_pstore_write+0x10b/0x150 > pstore_dump+0x123/0x340 > kmsg_dump+0x87/0x1b0 > oops_end+0x3e/0x90 > do_general_protection+0x1c3/0x2f0 > general_protection+0x2d/0x40 > RIP: 0010:__intel_display_power_put_domain+0xa5/0x180 [i915] > Code: 48 85 c0 78 54 44 89 e1 41 bd 01 00 00 00 49 c7 c4 80 44 41 a0 49 d3 e5 eb 0d 48 83 eb 10 48 3b 9d 08 ad 00 00 78 32 48 8b 03 <4c> 85 68 10 74 ea 8b 53 08 85 d2 74 2d 83 ea 01 85 d2 89 53 08 75 > RSP: 0018:ffffc9000061fdb0 EFLAGS: 00010206 > RAX: 6b6b6b6b6b6b6b6b RBX: ffff8884948f5df0 RCX: 000000000000003d > RDX: 0000000080000001 RSI: 0000000000000000 RDI: 0000000000000000 > RBP: ffff888479be0000 R08: ffff88849a180920 R09: 0000000000000000 > R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa0414480 > R13: 2000000000000000 R14: ffff888479beb320 R15: 2000000000000000 > release_async_put_domains+0x9b/0x110 [i915] > intel_display_power_put_async_work+0x91/0xf0 [i915] > process_one_work+0x260/0x600 > ? worker_thread+0xc9/0x380 > worker_thread+0x37/0x380 > ? process_one_work+0x600/0x600 > kthread+0x119/0x130 > ? kthread_park+0x80/0x80 > ret_from_fork+0x24/0x50 > ------------[ cut here ]------------ > WARNING: CPU: 3 PID: 1142 at kernel/rcu/tree_plugin.h:293 rcu_note_context_switch+0x87/0x650 > Modules linked in: i915(+) vgem snd_hda_codec_hdmi mei_hdcp x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul cdc_ether usbnet mii snd_intel_dspcfg ghash_clmulni_intel snd_hda_codec snd_hwdep snd_hda_core e1000e ptp mei_me snd_pcm pps_core mei intel_lpss_pci prime_numbers [last unloaded: i915] > > v2: > - fixed handling in case of failure in drm_vblank_init() > - moved i915_gem_driver_remove() call to before > i915_driver_modeset_remove_noirq() this match initialization order too > > Closes: https://gitlab.freedesktop.org/drm/intel/issues/1647 > Cc: Imre Deak <imre.deak@intel.com> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > Cc: Jani Nikula <jani.nikula@intel.com> > Signed-off-by: José Roberto de Souza <jose.souza@intel.com> > --- > drivers/gpu/drm/i915/i915_drv.c | 20 ++++++++++++-------- > 1 file changed, 12 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c > index 641f5e03b661..e31535744060 100644 > --- a/drivers/gpu/drm/i915/i915_drv.c > +++ b/drivers/gpu/drm/i915/i915_drv.c > @@ -228,7 +228,7 @@ static int i915_driver_modeset_probe_noirq(struct drm_i915_private *i915) > ret = drm_vblank_init(&i915->drm, > INTEL_NUM_PIPES(i915)); > if (ret) > - goto out; > + return ret; > } > > intel_bios_init(i915); > @@ -248,8 +248,11 @@ static int i915_driver_modeset_probe_noirq(struct drm_i915_private *i915) > return 0; > > cleanup_vga_client: > + intel_csr_ucode_fini(i915); > + intel_power_domains_driver_remove(i915); > intel_vga_unregister(i915); > out: > + intel_bios_driver_remove(i915); > return ret; > } > > @@ -308,13 +311,13 @@ static void i915_driver_modeset_remove(struct drm_i915_private *i915) > /* part #2: call after irq uninstall */ > static void i915_driver_modeset_remove_noirq(struct drm_i915_private *i915) > { > - intel_modeset_driver_remove_noirq(i915); > + intel_csr_ucode_fini(i915); > > - intel_bios_driver_remove(i915); > + intel_power_domains_driver_remove(i915); > > intel_vga_unregister(i915); > > - intel_csr_ucode_fini(i915); > + intel_bios_driver_remove(i915); > } > > static void intel_init_dpio(struct drm_i915_private *dev_priv) > @@ -992,7 +995,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > out_cleanup_irq: > intel_irq_uninstall(i915); > out_cleanup_modeset: > - /* FIXME */ > + i915_driver_modeset_remove_noirq(i915); > out_cleanup_hw: > i915_driver_hw_remove(i915); > intel_memory_regions_driver_release(i915); > @@ -1029,12 +1032,13 @@ void i915_driver_remove(struct drm_i915_private *i915) > > intel_irq_uninstall(i915); > > - i915_driver_modeset_remove_noirq(i915); > + intel_modeset_driver_remove_noirq(i915); > > - i915_reset_error_state(i915); Moving the above later looks unrelated to this patch. The rest looks ok to me. > i915_gem_driver_remove(i915); > > - intel_power_domains_driver_remove(i915); > + i915_driver_modeset_remove_noirq(i915); > + > + i915_reset_error_state(i915); > > i915_driver_hw_remove(i915); > > -- > 2.26.1 > _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Intel-gfx] [PATCH v2] drm/i915: Add missing deinitialization cases of load failure 2020-04-16 16:42 ` [Intel-gfx] [PATCH v2] " Imre Deak @ 2020-04-16 17:03 ` Souza, Jose 2020-04-16 17:06 ` Imre Deak 0 siblings, 1 reply; 13+ messages in thread From: Souza, Jose @ 2020-04-16 17:03 UTC (permalink / raw) To: Deak, Imre; +Cc: Nikula, Jani, intel-gfx On Thu, 2020-04-16 at 19:42 +0300, Imre Deak wrote: > On Wed, Apr 15, 2020 at 12:14:08PM -0700, José Roberto de Souza > wrote: > > The intel_display_power_put_async() used in TC cold sequences made > > easy to hit the missing deinitialization of driver in case of load > > failure as seen in the stack trace bellow. > > > > intel_modeset_driver_remove_noirq() had to be removed from > > i915_driver_modeset_remove_noirq() as those are different > > initialialition steps with IRQ and GEM initialization in between > > then. > > > > [drm:__intel_engine_init_ctx_wa [i915]] Initialized 3 context > > workarounds on rcs'0 > > [drm:__i915_inject_probe_error [i915]] Injecting failure -19 at > > checkpoint 36 [__uc_init:294] > > [drm:i915_hdcp_component_unbind [i915]] I915 HDCP comp unbind > > [drm:edp_panel_vdd_off_sync [i915]] Turning [ENCODER:275:DDI A] VDD > > off > > [drm:edp_panel_vdd_off_sync [i915]] PP_STATUS: 0x00000000 > > PP_CONTROL: 0x00000060 > > [drm:intel_power_well_disable [i915]] disabling AUX A > > general protection fault, probably for non-canonical address > > 0x6b6b6b6b6b6b6b6b: 0000 [#1] PREEMPT SMP NOPTI > > CPU: 3 PID: 1142 Comm: kworker/u16:20 Tainted: > > G U 5.6.0-CI-Patchwork_17226+ #1 > > Hardware name: Intel Corporation Tiger Lake Client > > Platform/TigerLake U DDR4 SODIMM RVP, BIOS > > TGLSFWI1.R00.2457.A16.1912270059 12/27/2019 > > Workqueue: events_unbound intel_display_power_put_async_work [i915] > > RIP: 0010:__intel_display_power_put_domain+0xa5/0x180 [i915] > > Code: 48 85 c0 78 54 44 89 e1 41 bd 01 00 00 00 49 c7 c4 80 44 41 > > a0 49 d3 e5 eb 0d 48 83 eb 10 48 3b 9d 08 ad 00 00 78 32 48 8b 03 > > <4c> 85 68 10 74 ea 8b 53 08 85 d2 74 2d 83 ea 01 85 d2 89 53 08 75 > > RSP: 0018:ffffc9000061fdb0 EFLAGS: 00010206 > > RAX: 6b6b6b6b6b6b6b6b RBX: ffff8884948f5df0 RCX: 000000000000003d > > RDX: 0000000080000001 RSI: 0000000000000000 RDI: 0000000000000000 > > RBP: ffff888479be0000 R08: ffff88849a180920 R09: 0000000000000000 > > R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa0414480 > > R13: 2000000000000000 R14: ffff888479beb320 R15: 2000000000000000 > > FS: 0000000000000000(0000) GS:ffff88849ff80000(0000) > > knlGS:0000000000000000 > > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > > CR2: 00005634fa8ed670 CR3: 0000000005610004 CR4: 0000000000760ee0 > > PKRU: 55555554 > > Call Trace: > > release_async_put_domains+0x9b/0x110 [i915] > > intel_display_power_put_async_work+0x91/0xf0 [i915] > > process_one_work+0x260/0x600 > > ? worker_thread+0xc9/0x380 > > worker_thread+0x37/0x380 > > ? process_one_work+0x600/0x600 > > kthread+0x119/0x130 > > ? kthread_park+0x80/0x80 > > ret_from_fork+0x24/0x50 > > Modules linked in: i915(+) vgem snd_hda_codec_hdmi mei_hdcp > > x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul > > cdc_ether usbnet mii snd_intel_dspcfg ghash_clmulni_intel > > snd_hda_codec snd_hwdep snd_hda_core e1000e ptp mei_me snd_pcm > > pps_core mei intel_lpss_pci prime_numbers [last unloaded: i915] > > ---[ end trace b402d1b4060f8b97 ]--- > > BUG: sleeping function called from invalid context at > > kernel/sched/completion.c:99 > > in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 1142, name: > > kworker/u16:20 > > INFO: lockdep is turned off. > > Preemption disabled at: > > [<0000000000000000>] 0x0 > > CPU: 3 PID: 1142 Comm: kworker/u16:20 Tainted: > > G UD 5.6.0-CI-Patchwork_17226+ #1 > > Hardware name: Intel Corporation Tiger Lake Client > > Platform/TigerLake U DDR4 SODIMM RVP, BIOS > > TGLSFWI1.R00.2457.A16.1912270059 12/27/2019 > > Workqueue: events_unbound intel_display_power_put_async_work [i915] > > Call Trace: > > dump_stack+0x71/0x9b > > ___might_sleep+0x178/0x260 > > wait_for_completion+0x37/0x1a0 > > virt_efi_query_variable_info+0x161/0x1b0 > > efi_query_variable_store+0xb3/0x1a0 > > ? efivar_entry_set_safe+0x19c/0x220 > > efivar_entry_set_safe+0x19c/0x220 > > ? efi_pstore_write+0x10b/0x150 > > ? efi_pstore_write+0xa0/0x150 > > efi_pstore_write+0x10b/0x150 > > pstore_dump+0x123/0x340 > > kmsg_dump+0x87/0x1b0 > > oops_end+0x3e/0x90 > > do_general_protection+0x1c3/0x2f0 > > general_protection+0x2d/0x40 > > RIP: 0010:__intel_display_power_put_domain+0xa5/0x180 [i915] > > Code: 48 85 c0 78 54 44 89 e1 41 bd 01 00 00 00 49 c7 c4 80 44 41 > > a0 49 d3 e5 eb 0d 48 83 eb 10 48 3b 9d 08 ad 00 00 78 32 48 8b 03 > > <4c> 85 68 10 74 ea 8b 53 08 85 d2 74 2d 83 ea 01 85 d2 89 53 08 75 > > RSP: 0018:ffffc9000061fdb0 EFLAGS: 00010206 > > RAX: 6b6b6b6b6b6b6b6b RBX: ffff8884948f5df0 RCX: 000000000000003d > > RDX: 0000000080000001 RSI: 0000000000000000 RDI: 0000000000000000 > > RBP: ffff888479be0000 R08: ffff88849a180920 R09: 0000000000000000 > > R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa0414480 > > R13: 2000000000000000 R14: ffff888479beb320 R15: 2000000000000000 > > release_async_put_domains+0x9b/0x110 [i915] > > intel_display_power_put_async_work+0x91/0xf0 [i915] > > process_one_work+0x260/0x600 > > ? worker_thread+0xc9/0x380 > > worker_thread+0x37/0x380 > > ? process_one_work+0x600/0x600 > > kthread+0x119/0x130 > > ? kthread_park+0x80/0x80 > > ret_from_fork+0x24/0x50 > > ------------[ cut here ]------------ > > WARNING: CPU: 3 PID: 1142 at kernel/rcu/tree_plugin.h:293 > > rcu_note_context_switch+0x87/0x650 > > Modules linked in: i915(+) vgem snd_hda_codec_hdmi mei_hdcp > > x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul > > cdc_ether usbnet mii snd_intel_dspcfg ghash_clmulni_intel > > snd_hda_codec snd_hwdep snd_hda_core e1000e ptp mei_me snd_pcm > > pps_core mei intel_lpss_pci prime_numbers [last unloaded: i915] > > > > v2: > > - fixed handling in case of failure in drm_vblank_init() > > - moved i915_gem_driver_remove() call to before > > i915_driver_modeset_remove_noirq() this match initialization order > > too > > > > Closes: https://gitlab.freedesktop.org/drm/intel/issues/1647 > > Cc: Imre Deak <imre.deak@intel.com> > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > > Cc: Jani Nikula <jani.nikula@intel.com> > > Signed-off-by: José Roberto de Souza <jose.souza@intel.com> > > --- > > drivers/gpu/drm/i915/i915_drv.c | 20 ++++++++++++-------- > > 1 file changed, 12 insertions(+), 8 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/i915_drv.c > > b/drivers/gpu/drm/i915/i915_drv.c > > index 641f5e03b661..e31535744060 100644 > > --- a/drivers/gpu/drm/i915/i915_drv.c > > +++ b/drivers/gpu/drm/i915/i915_drv.c > > @@ -228,7 +228,7 @@ static int > > i915_driver_modeset_probe_noirq(struct drm_i915_private *i915) > > ret = drm_vblank_init(&i915->drm, > > INTEL_NUM_PIPES(i915)); > > if (ret) > > - goto out; > > + return ret; > > } > > > > intel_bios_init(i915); > > @@ -248,8 +248,11 @@ static int > > i915_driver_modeset_probe_noirq(struct drm_i915_private *i915) > > return 0; > > > > cleanup_vga_client: > > + intel_csr_ucode_fini(i915); > > + intel_power_domains_driver_remove(i915); > > intel_vga_unregister(i915); > > out: > > + intel_bios_driver_remove(i915); > > return ret; > > } > > > > @@ -308,13 +311,13 @@ static void i915_driver_modeset_remove(struct > > drm_i915_private *i915) > > /* part #2: call after irq uninstall */ > > static void i915_driver_modeset_remove_noirq(struct > > drm_i915_private *i915) > > { > > - intel_modeset_driver_remove_noirq(i915); > > + intel_csr_ucode_fini(i915); > > > > - intel_bios_driver_remove(i915); > > + intel_power_domains_driver_remove(i915); > > > > intel_vga_unregister(i915); > > > > - intel_csr_ucode_fini(i915); > > + intel_bios_driver_remove(i915); > > } > > > > static void intel_init_dpio(struct drm_i915_private *dev_priv) > > @@ -992,7 +995,7 @@ int i915_driver_probe(struct pci_dev *pdev, > > const struct pci_device_id *ent) > > out_cleanup_irq: > > intel_irq_uninstall(i915); > > out_cleanup_modeset: > > - /* FIXME */ > > + i915_driver_modeset_remove_noirq(i915); > > out_cleanup_hw: > > i915_driver_hw_remove(i915); > > intel_memory_regions_driver_release(i915); > > @@ -1029,12 +1032,13 @@ void i915_driver_remove(struct > > drm_i915_private *i915) > > > > intel_irq_uninstall(i915); > > > > - i915_driver_modeset_remove_noirq(i915); > > + intel_modeset_driver_remove_noirq(i915); > > > > - i915_reset_error_state(i915); > > Moving the above later looks unrelated to this patch. The rest looks > ok > to me. i915_reset_error_state()? What is moving is things around it. > > > i915_gem_driver_remove(i915); > > > > - intel_power_domains_driver_remove(i915); > > + i915_driver_modeset_remove_noirq(i915); > > + > > + i915_reset_error_state(i915); > > > > i915_driver_hw_remove(i915); > > > > -- > > 2.26.1 > > _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Intel-gfx] [PATCH v2] drm/i915: Add missing deinitialization cases of load failure 2020-04-16 17:03 ` Souza, Jose @ 2020-04-16 17:06 ` Imre Deak 2020-04-16 17:20 ` Souza, Jose 0 siblings, 1 reply; 13+ messages in thread From: Imre Deak @ 2020-04-16 17:06 UTC (permalink / raw) To: Souza, Jose; +Cc: Nikula, Jani, intel-gfx On Thu, Apr 16, 2020 at 08:03:39PM +0300, Souza, Jose wrote: > On Thu, 2020-04-16 at 19:42 +0300, Imre Deak wrote: > > On Wed, Apr 15, 2020 at 12:14:08PM -0700, José Roberto de Souza > > wrote: > > > The intel_display_power_put_async() used in TC cold sequences made > > > easy to hit the missing deinitialization of driver in case of load > > > failure as seen in the stack trace bellow. > > > > > > intel_modeset_driver_remove_noirq() had to be removed from > > > i915_driver_modeset_remove_noirq() as those are different > > > initialialition steps with IRQ and GEM initialization in between > > > then. > > > > > > [drm:__intel_engine_init_ctx_wa [i915]] Initialized 3 context > > > workarounds on rcs'0 > > > [drm:__i915_inject_probe_error [i915]] Injecting failure -19 at > > > checkpoint 36 [__uc_init:294] > > > [drm:i915_hdcp_component_unbind [i915]] I915 HDCP comp unbind > > > [drm:edp_panel_vdd_off_sync [i915]] Turning [ENCODER:275:DDI A] VDD > > > off > > > [drm:edp_panel_vdd_off_sync [i915]] PP_STATUS: 0x00000000 > > > PP_CONTROL: 0x00000060 > > > [drm:intel_power_well_disable [i915]] disabling AUX A > > > general protection fault, probably for non-canonical address > > > 0x6b6b6b6b6b6b6b6b: 0000 [#1] PREEMPT SMP NOPTI > > > CPU: 3 PID: 1142 Comm: kworker/u16:20 Tainted: > > > G U 5.6.0-CI-Patchwork_17226+ #1 > > > Hardware name: Intel Corporation Tiger Lake Client > > > Platform/TigerLake U DDR4 SODIMM RVP, BIOS > > > TGLSFWI1.R00.2457.A16.1912270059 12/27/2019 > > > Workqueue: events_unbound intel_display_power_put_async_work [i915] > > > RIP: 0010:__intel_display_power_put_domain+0xa5/0x180 [i915] > > > Code: 48 85 c0 78 54 44 89 e1 41 bd 01 00 00 00 49 c7 c4 80 44 41 > > > a0 49 d3 e5 eb 0d 48 83 eb 10 48 3b 9d 08 ad 00 00 78 32 48 8b 03 > > > <4c> 85 68 10 74 ea 8b 53 08 85 d2 74 2d 83 ea 01 85 d2 89 53 08 75 > > > RSP: 0018:ffffc9000061fdb0 EFLAGS: 00010206 > > > RAX: 6b6b6b6b6b6b6b6b RBX: ffff8884948f5df0 RCX: 000000000000003d > > > RDX: 0000000080000001 RSI: 0000000000000000 RDI: 0000000000000000 > > > RBP: ffff888479be0000 R08: ffff88849a180920 R09: 0000000000000000 > > > R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa0414480 > > > R13: 2000000000000000 R14: ffff888479beb320 R15: 2000000000000000 > > > FS: 0000000000000000(0000) GS:ffff88849ff80000(0000) > > > knlGS:0000000000000000 > > > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > > > CR2: 00005634fa8ed670 CR3: 0000000005610004 CR4: 0000000000760ee0 > > > PKRU: 55555554 > > > Call Trace: > > > release_async_put_domains+0x9b/0x110 [i915] > > > intel_display_power_put_async_work+0x91/0xf0 [i915] > > > process_one_work+0x260/0x600 > > > ? worker_thread+0xc9/0x380 > > > worker_thread+0x37/0x380 > > > ? process_one_work+0x600/0x600 > > > kthread+0x119/0x130 > > > ? kthread_park+0x80/0x80 > > > ret_from_fork+0x24/0x50 > > > Modules linked in: i915(+) vgem snd_hda_codec_hdmi mei_hdcp > > > x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul > > > cdc_ether usbnet mii snd_intel_dspcfg ghash_clmulni_intel > > > snd_hda_codec snd_hwdep snd_hda_core e1000e ptp mei_me snd_pcm > > > pps_core mei intel_lpss_pci prime_numbers [last unloaded: i915] > > > ---[ end trace b402d1b4060f8b97 ]--- > > > BUG: sleeping function called from invalid context at > > > kernel/sched/completion.c:99 > > > in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 1142, name: > > > kworker/u16:20 > > > INFO: lockdep is turned off. > > > Preemption disabled at: > > > [<0000000000000000>] 0x0 > > > CPU: 3 PID: 1142 Comm: kworker/u16:20 Tainted: > > > G UD 5.6.0-CI-Patchwork_17226+ #1 > > > Hardware name: Intel Corporation Tiger Lake Client > > > Platform/TigerLake U DDR4 SODIMM RVP, BIOS > > > TGLSFWI1.R00.2457.A16.1912270059 12/27/2019 > > > Workqueue: events_unbound intel_display_power_put_async_work [i915] > > > Call Trace: > > > dump_stack+0x71/0x9b > > > ___might_sleep+0x178/0x260 > > > wait_for_completion+0x37/0x1a0 > > > virt_efi_query_variable_info+0x161/0x1b0 > > > efi_query_variable_store+0xb3/0x1a0 > > > ? efivar_entry_set_safe+0x19c/0x220 > > > efivar_entry_set_safe+0x19c/0x220 > > > ? efi_pstore_write+0x10b/0x150 > > > ? efi_pstore_write+0xa0/0x150 > > > efi_pstore_write+0x10b/0x150 > > > pstore_dump+0x123/0x340 > > > kmsg_dump+0x87/0x1b0 > > > oops_end+0x3e/0x90 > > > do_general_protection+0x1c3/0x2f0 > > > general_protection+0x2d/0x40 > > > RIP: 0010:__intel_display_power_put_domain+0xa5/0x180 [i915] > > > Code: 48 85 c0 78 54 44 89 e1 41 bd 01 00 00 00 49 c7 c4 80 44 41 > > > a0 49 d3 e5 eb 0d 48 83 eb 10 48 3b 9d 08 ad 00 00 78 32 48 8b 03 > > > <4c> 85 68 10 74 ea 8b 53 08 85 d2 74 2d 83 ea 01 85 d2 89 53 08 75 > > > RSP: 0018:ffffc9000061fdb0 EFLAGS: 00010206 > > > RAX: 6b6b6b6b6b6b6b6b RBX: ffff8884948f5df0 RCX: 000000000000003d > > > RDX: 0000000080000001 RSI: 0000000000000000 RDI: 0000000000000000 > > > RBP: ffff888479be0000 R08: ffff88849a180920 R09: 0000000000000000 > > > R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa0414480 > > > R13: 2000000000000000 R14: ffff888479beb320 R15: 2000000000000000 > > > release_async_put_domains+0x9b/0x110 [i915] > > > intel_display_power_put_async_work+0x91/0xf0 [i915] > > > process_one_work+0x260/0x600 > > > ? worker_thread+0xc9/0x380 > > > worker_thread+0x37/0x380 > > > ? process_one_work+0x600/0x600 > > > kthread+0x119/0x130 > > > ? kthread_park+0x80/0x80 > > > ret_from_fork+0x24/0x50 > > > ------------[ cut here ]------------ > > > WARNING: CPU: 3 PID: 1142 at kernel/rcu/tree_plugin.h:293 > > > rcu_note_context_switch+0x87/0x650 > > > Modules linked in: i915(+) vgem snd_hda_codec_hdmi mei_hdcp > > > x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul > > > cdc_ether usbnet mii snd_intel_dspcfg ghash_clmulni_intel > > > snd_hda_codec snd_hwdep snd_hda_core e1000e ptp mei_me snd_pcm > > > pps_core mei intel_lpss_pci prime_numbers [last unloaded: i915] > > > > > > v2: > > > - fixed handling in case of failure in drm_vblank_init() > > > - moved i915_gem_driver_remove() call to before > > > i915_driver_modeset_remove_noirq() this match initialization order > > > too > > > > > > Closes: https://gitlab.freedesktop.org/drm/intel/issues/1647 > > > Cc: Imre Deak <imre.deak@intel.com> > > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > Cc: Jani Nikula <jani.nikula@intel.com> > > > Signed-off-by: José Roberto de Souza <jose.souza@intel.com> > > > --- > > > drivers/gpu/drm/i915/i915_drv.c | 20 ++++++++++++-------- > > > 1 file changed, 12 insertions(+), 8 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/i915/i915_drv.c > > > b/drivers/gpu/drm/i915/i915_drv.c > > > index 641f5e03b661..e31535744060 100644 > > > --- a/drivers/gpu/drm/i915/i915_drv.c > > > +++ b/drivers/gpu/drm/i915/i915_drv.c > > > @@ -228,7 +228,7 @@ static int > > > i915_driver_modeset_probe_noirq(struct drm_i915_private *i915) > > > ret = drm_vblank_init(&i915->drm, > > > INTEL_NUM_PIPES(i915)); > > > if (ret) > > > - goto out; > > > + return ret; > > > } > > > > > > intel_bios_init(i915); > > > @@ -248,8 +248,11 @@ static int > > > i915_driver_modeset_probe_noirq(struct drm_i915_private *i915) > > > return 0; > > > > > > cleanup_vga_client: > > > + intel_csr_ucode_fini(i915); > > > + intel_power_domains_driver_remove(i915); > > > intel_vga_unregister(i915); > > > out: > > > + intel_bios_driver_remove(i915); > > > return ret; > > > } > > > > > > @@ -308,13 +311,13 @@ static void i915_driver_modeset_remove(struct > > > drm_i915_private *i915) > > > /* part #2: call after irq uninstall */ > > > static void i915_driver_modeset_remove_noirq(struct > > > drm_i915_private *i915) > > > { > > > - intel_modeset_driver_remove_noirq(i915); > > > + intel_csr_ucode_fini(i915); > > > > > > - intel_bios_driver_remove(i915); > > > + intel_power_domains_driver_remove(i915); > > > > > > intel_vga_unregister(i915); > > > > > > - intel_csr_ucode_fini(i915); > > > + intel_bios_driver_remove(i915); > > > } > > > > > > static void intel_init_dpio(struct drm_i915_private *dev_priv) > > > @@ -992,7 +995,7 @@ int i915_driver_probe(struct pci_dev *pdev, > > > const struct pci_device_id *ent) > > > out_cleanup_irq: > > > intel_irq_uninstall(i915); > > > out_cleanup_modeset: > > > - /* FIXME */ > > > + i915_driver_modeset_remove_noirq(i915); > > > out_cleanup_hw: > > > i915_driver_hw_remove(i915); > > > intel_memory_regions_driver_release(i915); > > > @@ -1029,12 +1032,13 @@ void i915_driver_remove(struct > > > drm_i915_private *i915) > > > > > > intel_irq_uninstall(i915); > > > > > > - i915_driver_modeset_remove_noirq(i915); > > > + intel_modeset_driver_remove_noirq(i915); > > > > > > - i915_reset_error_state(i915); > > > > Moving the above later looks unrelated to this patch. The rest looks > > ok > > to me. > > i915_reset_error_state()? What is moving is things around it. The order of i915_reset_error_state() and i915_gem_driver_remove() is swapped now, which is an unrelated change. > > > > > i915_gem_driver_remove(i915); > > > > > > - intel_power_domains_driver_remove(i915); > > > + i915_driver_modeset_remove_noirq(i915); > > > + > > > + i915_reset_error_state(i915); > > > > > > i915_driver_hw_remove(i915); > > > > > > -- > > > 2.26.1 > > > _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Intel-gfx] [PATCH v2] drm/i915: Add missing deinitialization cases of load failure 2020-04-16 17:06 ` Imre Deak @ 2020-04-16 17:20 ` Souza, Jose 2020-04-16 17:28 ` Imre Deak 0 siblings, 1 reply; 13+ messages in thread From: Souza, Jose @ 2020-04-16 17:20 UTC (permalink / raw) To: Deak, Imre; +Cc: Nikula, Jani, intel-gfx On Thu, 2020-04-16 at 20:06 +0300, Imre Deak wrote: > On Thu, Apr 16, 2020 at 08:03:39PM +0300, Souza, Jose wrote: > > On Thu, 2020-04-16 at 19:42 +0300, Imre Deak wrote: > > > On Wed, Apr 15, 2020 at 12:14:08PM -0700, José Roberto de Souza > > > wrote: > > > > The intel_display_power_put_async() used in TC cold sequences > > > > made > > > > easy to hit the missing deinitialization of driver in case of > > > > load > > > > failure as seen in the stack trace bellow. > > > > > > > > intel_modeset_driver_remove_noirq() had to be removed from > > > > i915_driver_modeset_remove_noirq() as those are different > > > > initialialition steps with IRQ and GEM initialization in > > > > between > > > > then. > > > > > > > > [drm:__intel_engine_init_ctx_wa [i915]] Initialized 3 context > > > > workarounds on rcs'0 > > > > [drm:__i915_inject_probe_error [i915]] Injecting failure -19 at > > > > checkpoint 36 [__uc_init:294] > > > > [drm:i915_hdcp_component_unbind [i915]] I915 HDCP comp unbind > > > > [drm:edp_panel_vdd_off_sync [i915]] Turning [ENCODER:275:DDI A] > > > > VDD > > > > off > > > > [drm:edp_panel_vdd_off_sync [i915]] PP_STATUS: 0x00000000 > > > > PP_CONTROL: 0x00000060 > > > > [drm:intel_power_well_disable [i915]] disabling AUX A > > > > general protection fault, probably for non-canonical address > > > > 0x6b6b6b6b6b6b6b6b: 0000 [#1] PREEMPT SMP NOPTI > > > > CPU: 3 PID: 1142 Comm: kworker/u16:20 Tainted: > > > > G U 5.6.0-CI-Patchwork_17226+ #1 > > > > Hardware name: Intel Corporation Tiger Lake Client > > > > Platform/TigerLake U DDR4 SODIMM RVP, BIOS > > > > TGLSFWI1.R00.2457.A16.1912270059 12/27/2019 > > > > Workqueue: events_unbound intel_display_power_put_async_work > > > > [i915] > > > > RIP: 0010:__intel_display_power_put_domain+0xa5/0x180 [i915] > > > > Code: 48 85 c0 78 54 44 89 e1 41 bd 01 00 00 00 49 c7 c4 80 44 > > > > 41 > > > > a0 49 d3 e5 eb 0d 48 83 eb 10 48 3b 9d 08 ad 00 00 78 32 48 8b > > > > 03 > > > > <4c> 85 68 10 74 ea 8b 53 08 85 d2 74 2d 83 ea 01 85 d2 89 53 > > > > 08 75 > > > > RSP: 0018:ffffc9000061fdb0 EFLAGS: 00010206 > > > > RAX: 6b6b6b6b6b6b6b6b RBX: ffff8884948f5df0 RCX: > > > > 000000000000003d > > > > RDX: 0000000080000001 RSI: 0000000000000000 RDI: > > > > 0000000000000000 > > > > RBP: ffff888479be0000 R08: ffff88849a180920 R09: > > > > 0000000000000000 > > > > R10: 0000000000000000 R11: 0000000000000000 R12: > > > > ffffffffa0414480 > > > > R13: 2000000000000000 R14: ffff888479beb320 R15: > > > > 2000000000000000 > > > > FS: 0000000000000000(0000) GS:ffff88849ff80000(0000) > > > > knlGS:0000000000000000 > > > > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > > > > CR2: 00005634fa8ed670 CR3: 0000000005610004 CR4: > > > > 0000000000760ee0 > > > > PKRU: 55555554 > > > > Call Trace: > > > > release_async_put_domains+0x9b/0x110 [i915] > > > > intel_display_power_put_async_work+0x91/0xf0 [i915] > > > > process_one_work+0x260/0x600 > > > > ? worker_thread+0xc9/0x380 > > > > worker_thread+0x37/0x380 > > > > ? process_one_work+0x600/0x600 > > > > kthread+0x119/0x130 > > > > ? kthread_park+0x80/0x80 > > > > ret_from_fork+0x24/0x50 > > > > Modules linked in: i915(+) vgem snd_hda_codec_hdmi mei_hdcp > > > > x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul > > > > cdc_ether usbnet mii snd_intel_dspcfg ghash_clmulni_intel > > > > snd_hda_codec snd_hwdep snd_hda_core e1000e ptp mei_me snd_pcm > > > > pps_core mei intel_lpss_pci prime_numbers [last unloaded: i915] > > > > ---[ end trace b402d1b4060f8b97 ]--- > > > > BUG: sleeping function called from invalid context at > > > > kernel/sched/completion.c:99 > > > > in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 1142, > > > > name: > > > > kworker/u16:20 > > > > INFO: lockdep is turned off. > > > > Preemption disabled at: > > > > [<0000000000000000>] 0x0 > > > > CPU: 3 PID: 1142 Comm: kworker/u16:20 Tainted: > > > > G UD 5.6.0-CI-Patchwork_17226+ #1 > > > > Hardware name: Intel Corporation Tiger Lake Client > > > > Platform/TigerLake U DDR4 SODIMM RVP, BIOS > > > > TGLSFWI1.R00.2457.A16.1912270059 12/27/2019 > > > > Workqueue: events_unbound intel_display_power_put_async_work > > > > [i915] > > > > Call Trace: > > > > dump_stack+0x71/0x9b > > > > ___might_sleep+0x178/0x260 > > > > wait_for_completion+0x37/0x1a0 > > > > virt_efi_query_variable_info+0x161/0x1b0 > > > > efi_query_variable_store+0xb3/0x1a0 > > > > ? efivar_entry_set_safe+0x19c/0x220 > > > > efivar_entry_set_safe+0x19c/0x220 > > > > ? efi_pstore_write+0x10b/0x150 > > > > ? efi_pstore_write+0xa0/0x150 > > > > efi_pstore_write+0x10b/0x150 > > > > pstore_dump+0x123/0x340 > > > > kmsg_dump+0x87/0x1b0 > > > > oops_end+0x3e/0x90 > > > > do_general_protection+0x1c3/0x2f0 > > > > general_protection+0x2d/0x40 > > > > RIP: 0010:__intel_display_power_put_domain+0xa5/0x180 [i915] > > > > Code: 48 85 c0 78 54 44 89 e1 41 bd 01 00 00 00 49 c7 c4 80 44 > > > > 41 > > > > a0 49 d3 e5 eb 0d 48 83 eb 10 48 3b 9d 08 ad 00 00 78 32 48 8b > > > > 03 > > > > <4c> 85 68 10 74 ea 8b 53 08 85 d2 74 2d 83 ea 01 85 d2 89 53 > > > > 08 75 > > > > RSP: 0018:ffffc9000061fdb0 EFLAGS: 00010206 > > > > RAX: 6b6b6b6b6b6b6b6b RBX: ffff8884948f5df0 RCX: > > > > 000000000000003d > > > > RDX: 0000000080000001 RSI: 0000000000000000 RDI: > > > > 0000000000000000 > > > > RBP: ffff888479be0000 R08: ffff88849a180920 R09: > > > > 0000000000000000 > > > > R10: 0000000000000000 R11: 0000000000000000 R12: > > > > ffffffffa0414480 > > > > R13: 2000000000000000 R14: ffff888479beb320 R15: > > > > 2000000000000000 > > > > release_async_put_domains+0x9b/0x110 [i915] > > > > intel_display_power_put_async_work+0x91/0xf0 [i915] > > > > process_one_work+0x260/0x600 > > > > ? worker_thread+0xc9/0x380 > > > > worker_thread+0x37/0x380 > > > > ? process_one_work+0x600/0x600 > > > > kthread+0x119/0x130 > > > > ? kthread_park+0x80/0x80 > > > > ret_from_fork+0x24/0x50 > > > > ------------[ cut here ]------------ > > > > WARNING: CPU: 3 PID: 1142 at kernel/rcu/tree_plugin.h:293 > > > > rcu_note_context_switch+0x87/0x650 > > > > Modules linked in: i915(+) vgem snd_hda_codec_hdmi mei_hdcp > > > > x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul > > > > cdc_ether usbnet mii snd_intel_dspcfg ghash_clmulni_intel > > > > snd_hda_codec snd_hwdep snd_hda_core e1000e ptp mei_me snd_pcm > > > > pps_core mei intel_lpss_pci prime_numbers [last unloaded: i915] > > > > > > > > v2: > > > > - fixed handling in case of failure in drm_vblank_init() > > > > - moved i915_gem_driver_remove() call to before > > > > i915_driver_modeset_remove_noirq() this match initialization > > > > order > > > > too > > > > > > > > Closes: https://gitlab.freedesktop.org/drm/intel/issues/1647 > > > > Cc: Imre Deak <imre.deak@intel.com> > > > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > > Cc: Jani Nikula <jani.nikula@intel.com> > > > > Signed-off-by: José Roberto de Souza <jose.souza@intel.com> > > > > --- > > > > drivers/gpu/drm/i915/i915_drv.c | 20 ++++++++++++-------- > > > > 1 file changed, 12 insertions(+), 8 deletions(-) > > > > > > > > diff --git a/drivers/gpu/drm/i915/i915_drv.c > > > > b/drivers/gpu/drm/i915/i915_drv.c > > > > index 641f5e03b661..e31535744060 100644 > > > > --- a/drivers/gpu/drm/i915/i915_drv.c > > > > +++ b/drivers/gpu/drm/i915/i915_drv.c > > > > @@ -228,7 +228,7 @@ static int > > > > i915_driver_modeset_probe_noirq(struct drm_i915_private *i915) > > > > ret = drm_vblank_init(&i915->drm, > > > > INTEL_NUM_PIPES(i915)); > > > > if (ret) > > > > - goto out; > > > > + return ret; > > > > } > > > > > > > > intel_bios_init(i915); > > > > @@ -248,8 +248,11 @@ static int > > > > i915_driver_modeset_probe_noirq(struct drm_i915_private *i915) > > > > return 0; > > > > > > > > cleanup_vga_client: > > > > + intel_csr_ucode_fini(i915); > > > > + intel_power_domains_driver_remove(i915); > > > > intel_vga_unregister(i915); > > > > out: > > > > + intel_bios_driver_remove(i915); > > > > return ret; > > > > } > > > > > > > > @@ -308,13 +311,13 @@ static void > > > > i915_driver_modeset_remove(struct > > > > drm_i915_private *i915) > > > > /* part #2: call after irq uninstall */ > > > > static void i915_driver_modeset_remove_noirq(struct > > > > drm_i915_private *i915) > > > > { > > > > - intel_modeset_driver_remove_noirq(i915); > > > > + intel_csr_ucode_fini(i915); > > > > > > > > - intel_bios_driver_remove(i915); > > > > + intel_power_domains_driver_remove(i915); > > > > > > > > intel_vga_unregister(i915); > > > > > > > > - intel_csr_ucode_fini(i915); > > > > + intel_bios_driver_remove(i915); > > > > } > > > > > > > > static void intel_init_dpio(struct drm_i915_private *dev_priv) > > > > @@ -992,7 +995,7 @@ int i915_driver_probe(struct pci_dev *pdev, > > > > const struct pci_device_id *ent) > > > > out_cleanup_irq: > > > > intel_irq_uninstall(i915); > > > > out_cleanup_modeset: > > > > - /* FIXME */ > > > > + i915_driver_modeset_remove_noirq(i915); > > > > out_cleanup_hw: > > > > i915_driver_hw_remove(i915); > > > > intel_memory_regions_driver_release(i915); > > > > @@ -1029,12 +1032,13 @@ void i915_driver_remove(struct > > > > drm_i915_private *i915) > > > > > > > > intel_irq_uninstall(i915); > > > > > > > > - i915_driver_modeset_remove_noirq(i915); > > > > + intel_modeset_driver_remove_noirq(i915); > > > > > > > > - i915_reset_error_state(i915); > > > > > > Moving the above later looks unrelated to this patch. The rest > > > looks > > > ok > > > to me. > > > > i915_reset_error_state()? What is moving is things around it. > > The order of i915_reset_error_state() and i915_gem_driver_remove() is > swapped now, which is an unrelated change. It looks to me that i915_reset_error_state() should be executed after i915_gem_driver_remove() as some error could happen. Will swap back for this patch and then in another patch move it again. > > > > > i915_gem_driver_remove(i915); > > > > > > > > - intel_power_domains_driver_remove(i915); > > > > + i915_driver_modeset_remove_noirq(i915); > > > > + > > > > + i915_reset_error_state(i915); > > > > > > > > i915_driver_hw_remove(i915); > > > > > > > > -- > > > > 2.26.1 > > > > _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Intel-gfx] [PATCH v2] drm/i915: Add missing deinitialization cases of load failure 2020-04-16 17:20 ` Souza, Jose @ 2020-04-16 17:28 ` Imre Deak 0 siblings, 0 replies; 13+ messages in thread From: Imre Deak @ 2020-04-16 17:28 UTC (permalink / raw) To: Souza, Jose; +Cc: Nikula, Jani, intel-gfx On Thu, Apr 16, 2020 at 08:20:23PM +0300, Souza, Jose wrote: > On Thu, 2020-04-16 at 20:06 +0300, Imre Deak wrote: > > On Thu, Apr 16, 2020 at 08:03:39PM +0300, Souza, Jose wrote: > > > On Thu, 2020-04-16 at 19:42 +0300, Imre Deak wrote: > > > > On Wed, Apr 15, 2020 at 12:14:08PM -0700, José Roberto de Souza > > > > wrote: > > > > > The intel_display_power_put_async() used in TC cold sequences > > > > > made > > > > > easy to hit the missing deinitialization of driver in case of > > > > > load > > > > > failure as seen in the stack trace bellow. > > > > > > > > > > intel_modeset_driver_remove_noirq() had to be removed from > > > > > i915_driver_modeset_remove_noirq() as those are different > > > > > initialialition steps with IRQ and GEM initialization in > > > > > between > > > > > then. > > > > > > > > > > [drm:__intel_engine_init_ctx_wa [i915]] Initialized 3 context > > > > > workarounds on rcs'0 > > > > > [drm:__i915_inject_probe_error [i915]] Injecting failure -19 at > > > > > checkpoint 36 [__uc_init:294] > > > > > [drm:i915_hdcp_component_unbind [i915]] I915 HDCP comp unbind > > > > > [drm:edp_panel_vdd_off_sync [i915]] Turning [ENCODER:275:DDI A] > > > > > VDD > > > > > off > > > > > [drm:edp_panel_vdd_off_sync [i915]] PP_STATUS: 0x00000000 > > > > > PP_CONTROL: 0x00000060 > > > > > [drm:intel_power_well_disable [i915]] disabling AUX A > > > > > general protection fault, probably for non-canonical address > > > > > 0x6b6b6b6b6b6b6b6b: 0000 [#1] PREEMPT SMP NOPTI > > > > > CPU: 3 PID: 1142 Comm: kworker/u16:20 Tainted: > > > > > G U 5.6.0-CI-Patchwork_17226+ #1 > > > > > Hardware name: Intel Corporation Tiger Lake Client > > > > > Platform/TigerLake U DDR4 SODIMM RVP, BIOS > > > > > TGLSFWI1.R00.2457.A16.1912270059 12/27/2019 > > > > > Workqueue: events_unbound intel_display_power_put_async_work > > > > > [i915] > > > > > RIP: 0010:__intel_display_power_put_domain+0xa5/0x180 [i915] > > > > > Code: 48 85 c0 78 54 44 89 e1 41 bd 01 00 00 00 49 c7 c4 80 44 > > > > > 41 > > > > > a0 49 d3 e5 eb 0d 48 83 eb 10 48 3b 9d 08 ad 00 00 78 32 48 8b > > > > > 03 > > > > > <4c> 85 68 10 74 ea 8b 53 08 85 d2 74 2d 83 ea 01 85 d2 89 53 > > > > > 08 75 > > > > > RSP: 0018:ffffc9000061fdb0 EFLAGS: 00010206 > > > > > RAX: 6b6b6b6b6b6b6b6b RBX: ffff8884948f5df0 RCX: > > > > > 000000000000003d > > > > > RDX: 0000000080000001 RSI: 0000000000000000 RDI: > > > > > 0000000000000000 > > > > > RBP: ffff888479be0000 R08: ffff88849a180920 R09: > > > > > 0000000000000000 > > > > > R10: 0000000000000000 R11: 0000000000000000 R12: > > > > > ffffffffa0414480 > > > > > R13: 2000000000000000 R14: ffff888479beb320 R15: > > > > > 2000000000000000 > > > > > FS: 0000000000000000(0000) GS:ffff88849ff80000(0000) > > > > > knlGS:0000000000000000 > > > > > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > > > > > CR2: 00005634fa8ed670 CR3: 0000000005610004 CR4: > > > > > 0000000000760ee0 > > > > > PKRU: 55555554 > > > > > Call Trace: > > > > > release_async_put_domains+0x9b/0x110 [i915] > > > > > intel_display_power_put_async_work+0x91/0xf0 [i915] > > > > > process_one_work+0x260/0x600 > > > > > ? worker_thread+0xc9/0x380 > > > > > worker_thread+0x37/0x380 > > > > > ? process_one_work+0x600/0x600 > > > > > kthread+0x119/0x130 > > > > > ? kthread_park+0x80/0x80 > > > > > ret_from_fork+0x24/0x50 > > > > > Modules linked in: i915(+) vgem snd_hda_codec_hdmi mei_hdcp > > > > > x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul > > > > > cdc_ether usbnet mii snd_intel_dspcfg ghash_clmulni_intel > > > > > snd_hda_codec snd_hwdep snd_hda_core e1000e ptp mei_me snd_pcm > > > > > pps_core mei intel_lpss_pci prime_numbers [last unloaded: i915] > > > > > ---[ end trace b402d1b4060f8b97 ]--- > > > > > BUG: sleeping function called from invalid context at > > > > > kernel/sched/completion.c:99 > > > > > in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 1142, > > > > > name: > > > > > kworker/u16:20 > > > > > INFO: lockdep is turned off. > > > > > Preemption disabled at: > > > > > [<0000000000000000>] 0x0 > > > > > CPU: 3 PID: 1142 Comm: kworker/u16:20 Tainted: > > > > > G UD 5.6.0-CI-Patchwork_17226+ #1 > > > > > Hardware name: Intel Corporation Tiger Lake Client > > > > > Platform/TigerLake U DDR4 SODIMM RVP, BIOS > > > > > TGLSFWI1.R00.2457.A16.1912270059 12/27/2019 > > > > > Workqueue: events_unbound intel_display_power_put_async_work > > > > > [i915] > > > > > Call Trace: > > > > > dump_stack+0x71/0x9b > > > > > ___might_sleep+0x178/0x260 > > > > > wait_for_completion+0x37/0x1a0 > > > > > virt_efi_query_variable_info+0x161/0x1b0 > > > > > efi_query_variable_store+0xb3/0x1a0 > > > > > ? efivar_entry_set_safe+0x19c/0x220 > > > > > efivar_entry_set_safe+0x19c/0x220 > > > > > ? efi_pstore_write+0x10b/0x150 > > > > > ? efi_pstore_write+0xa0/0x150 > > > > > efi_pstore_write+0x10b/0x150 > > > > > pstore_dump+0x123/0x340 > > > > > kmsg_dump+0x87/0x1b0 > > > > > oops_end+0x3e/0x90 > > > > > do_general_protection+0x1c3/0x2f0 > > > > > general_protection+0x2d/0x40 > > > > > RIP: 0010:__intel_display_power_put_domain+0xa5/0x180 [i915] > > > > > Code: 48 85 c0 78 54 44 89 e1 41 bd 01 00 00 00 49 c7 c4 80 44 > > > > > 41 > > > > > a0 49 d3 e5 eb 0d 48 83 eb 10 48 3b 9d 08 ad 00 00 78 32 48 8b > > > > > 03 > > > > > <4c> 85 68 10 74 ea 8b 53 08 85 d2 74 2d 83 ea 01 85 d2 89 53 > > > > > 08 75 > > > > > RSP: 0018:ffffc9000061fdb0 EFLAGS: 00010206 > > > > > RAX: 6b6b6b6b6b6b6b6b RBX: ffff8884948f5df0 RCX: > > > > > 000000000000003d > > > > > RDX: 0000000080000001 RSI: 0000000000000000 RDI: > > > > > 0000000000000000 > > > > > RBP: ffff888479be0000 R08: ffff88849a180920 R09: > > > > > 0000000000000000 > > > > > R10: 0000000000000000 R11: 0000000000000000 R12: > > > > > ffffffffa0414480 > > > > > R13: 2000000000000000 R14: ffff888479beb320 R15: > > > > > 2000000000000000 > > > > > release_async_put_domains+0x9b/0x110 [i915] > > > > > intel_display_power_put_async_work+0x91/0xf0 [i915] > > > > > process_one_work+0x260/0x600 > > > > > ? worker_thread+0xc9/0x380 > > > > > worker_thread+0x37/0x380 > > > > > ? process_one_work+0x600/0x600 > > > > > kthread+0x119/0x130 > > > > > ? kthread_park+0x80/0x80 > > > > > ret_from_fork+0x24/0x50 > > > > > ------------[ cut here ]------------ > > > > > WARNING: CPU: 3 PID: 1142 at kernel/rcu/tree_plugin.h:293 > > > > > rcu_note_context_switch+0x87/0x650 > > > > > Modules linked in: i915(+) vgem snd_hda_codec_hdmi mei_hdcp > > > > > x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul > > > > > cdc_ether usbnet mii snd_intel_dspcfg ghash_clmulni_intel > > > > > snd_hda_codec snd_hwdep snd_hda_core e1000e ptp mei_me snd_pcm > > > > > pps_core mei intel_lpss_pci prime_numbers [last unloaded: i915] > > > > > > > > > > v2: > > > > > - fixed handling in case of failure in drm_vblank_init() > > > > > - moved i915_gem_driver_remove() call to before > > > > > i915_driver_modeset_remove_noirq() this match initialization > > > > > order > > > > > too > > > > > > > > > > Closes: https://gitlab.freedesktop.org/drm/intel/issues/1647 > > > > > Cc: Imre Deak <imre.deak@intel.com> > > > > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > > > Cc: Jani Nikula <jani.nikula@intel.com> > > > > > Signed-off-by: José Roberto de Souza <jose.souza@intel.com> > > > > > --- > > > > > drivers/gpu/drm/i915/i915_drv.c | 20 ++++++++++++-------- > > > > > 1 file changed, 12 insertions(+), 8 deletions(-) > > > > > > > > > > diff --git a/drivers/gpu/drm/i915/i915_drv.c > > > > > b/drivers/gpu/drm/i915/i915_drv.c > > > > > index 641f5e03b661..e31535744060 100644 > > > > > --- a/drivers/gpu/drm/i915/i915_drv.c > > > > > +++ b/drivers/gpu/drm/i915/i915_drv.c > > > > > @@ -228,7 +228,7 @@ static int > > > > > i915_driver_modeset_probe_noirq(struct drm_i915_private *i915) > > > > > ret = drm_vblank_init(&i915->drm, > > > > > INTEL_NUM_PIPES(i915)); > > > > > if (ret) > > > > > - goto out; > > > > > + return ret; > > > > > } > > > > > > > > > > intel_bios_init(i915); > > > > > @@ -248,8 +248,11 @@ static int > > > > > i915_driver_modeset_probe_noirq(struct drm_i915_private *i915) > > > > > return 0; > > > > > > > > > > cleanup_vga_client: > > > > > + intel_csr_ucode_fini(i915); > > > > > + intel_power_domains_driver_remove(i915); > > > > > intel_vga_unregister(i915); > > > > > out: > > > > > + intel_bios_driver_remove(i915); > > > > > return ret; > > > > > } > > > > > > > > > > @@ -308,13 +311,13 @@ static void > > > > > i915_driver_modeset_remove(struct > > > > > drm_i915_private *i915) > > > > > /* part #2: call after irq uninstall */ > > > > > static void i915_driver_modeset_remove_noirq(struct > > > > > drm_i915_private *i915) > > > > > { > > > > > - intel_modeset_driver_remove_noirq(i915); > > > > > + intel_csr_ucode_fini(i915); > > > > > > > > > > - intel_bios_driver_remove(i915); > > > > > + intel_power_domains_driver_remove(i915); > > > > > > > > > > intel_vga_unregister(i915); > > > > > > > > > > - intel_csr_ucode_fini(i915); > > > > > + intel_bios_driver_remove(i915); > > > > > } > > > > > > > > > > static void intel_init_dpio(struct drm_i915_private *dev_priv) > > > > > @@ -992,7 +995,7 @@ int i915_driver_probe(struct pci_dev *pdev, > > > > > const struct pci_device_id *ent) > > > > > out_cleanup_irq: > > > > > intel_irq_uninstall(i915); > > > > > out_cleanup_modeset: > > > > > - /* FIXME */ > > > > > + i915_driver_modeset_remove_noirq(i915); > > > > > out_cleanup_hw: > > > > > i915_driver_hw_remove(i915); > > > > > intel_memory_regions_driver_release(i915); > > > > > @@ -1029,12 +1032,13 @@ void i915_driver_remove(struct > > > > > drm_i915_private *i915) > > > > > > > > > > intel_irq_uninstall(i915); > > > > > > > > > > - i915_driver_modeset_remove_noirq(i915); > > > > > + intel_modeset_driver_remove_noirq(i915); > > > > > > > > > > - i915_reset_error_state(i915); > > > > > > > > Moving the above later looks unrelated to this patch. The rest > > > > looks > > > > ok > > > > to me. > > > > > > i915_reset_error_state()? What is moving is things around it. > > > > The order of i915_reset_error_state() and i915_gem_driver_remove() is > > swapped now, which is an unrelated change. > > It looks to me that i915_reset_error_state() should be executed after > i915_gem_driver_remove() as some error could happen. Yes, that make sense, but it should be a separate change. Please also CC Chris on that. > Will swap back for this patch and then in another patch move it again. Ok, with that this patch is: Reviewed-by: Imre Deak <imre.deak@intel.com> > > > > > > > > > > - intel_power_domains_driver_remove(i915); > > > > > + i915_driver_modeset_remove_noirq(i915); > > > > > + > > > > > + i915_reset_error_state(i915); > > > > > > > > > > i915_driver_hw_remove(i915); > > > > > > > > > > -- > > > > > 2.26.1 > > > > > _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2020-04-16 19:10 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-04-15 19:14 [Intel-gfx] [PATCH v2] drm/i915: Add missing deinitialization cases of load failure José Roberto de Souza 2020-04-15 19:22 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork 2020-04-15 19:36 ` [Intel-gfx] [PATCH v2] " Chris Wilson 2020-04-16 19:10 ` Souza, Jose 2020-04-15 19:39 ` [Intel-gfx] ✗ Fi.CI.DOCS: warning for " Patchwork 2020-04-15 19:45 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork 2020-04-15 19:51 ` [Intel-gfx] [PATCH v2] " Chris Wilson 2020-04-16 16:08 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " Patchwork 2020-04-16 16:42 ` [Intel-gfx] [PATCH v2] " Imre Deak 2020-04-16 17:03 ` Souza, Jose 2020-04-16 17:06 ` Imre Deak 2020-04-16 17:20 ` Souza, Jose 2020-04-16 17:28 ` Imre Deak
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.