linux_dsm_epyc7002/drivers/gpu/drm/i915
Tvrtko Ursulin b2f78cda26 drm/i915/pmu: Fix PMU enable vs execlists tasklet race
Commit 99e48bf98d ("drm/i915: Lock out execlist tasklet while peeking
inside for busy-stats") added a tasklet_disable call in busy stats
enabling, but we failed to understand that the PMU enable callback runs
as an hard IRQ (IPI).

Consequence of this is that the PMU enable callback can interrupt the
execlists tasklet, and will then deadlock when it calls
intel_engine_stats_enable->tasklet_disable.

To fix this, I realized it is possible to move the engine stats enablement
and disablement to PMU event init and destroy hooks. This allows for much
simpler implementation since those hooks run in normal context (can
sleep).

v2: Extract engine_event_destroy. (Chris Wilson)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Fixes: 99e48bf98d ("drm/i915: Lock out execlist tasklet while peeking inside for busy-stats")
Testcase: igt/perf_pmu/enable-race-*
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20180205093448.13877-1-tvrtko.ursulin@linux.intel.com
2018-02-06 11:21:27 +00:00
..
gvt Linux 4.15-rc8 2018-01-18 09:32:15 +10:00
selftests drm/i915/selftests: Use a sacrificial context for hang testing 2018-02-05 15:27:24 +00:00
dvo_ch7xxx.c
dvo_ch7017.c
dvo_ivch.c
dvo_ns2501.c
dvo_sil164.c
dvo_tfp410.c
dvo.h
i915_cmd_parser.c drm/i915/cmdparser: Do not check past the cmd length. 2018-02-05 20:49:24 +00:00
i915_debugfs.c drm/i915/guc: Update name and prototype of i915_guc_log_control 2018-01-24 19:44:06 +00:00
i915_drv.c drm/i915: reduce indent in pch detection 2018-02-02 16:55:30 +02:00
i915_drv.h drm/i915: Report if an unbannable context is involved in a GPU hang 2018-02-05 10:59:22 +00:00
i915_gem_batch_pool.c
i915_gem_batch_pool.h
i915_gem_clflush.c drm/i915: Allow fence allocations to fail 2017-12-13 13:17:44 +00:00
i915_gem_clflush.h
i915_gem_context.c drm/i915: Allow fence allocations to fail 2017-12-13 13:17:44 +00:00
i915_gem_context.h
i915_gem_dmabuf.c
i915_gem_evict.c
i915_gem_execbuffer.c drm/i915: make mappable struct resource centric 2017-12-12 12:30:21 +02:00
i915_gem_fence_reg.c drm/i915: Flush ggtt writes through the old fenced vma before changing fences 2018-01-31 10:49:16 +00:00
i915_gem_fence_reg.h
i915_gem_gtt.c drm/i915/ppgtt: Pin page directories before allocation 2018-02-01 07:22:35 +00:00
i915_gem_gtt.h drm/i915: prefer resource_size_t for everything stolen 2017-12-12 12:30:22 +02:00
i915_gem_internal.c drm/i915: Allow internal page allocations to fail 2017-12-15 11:35:43 +00:00
i915_gem_object.c
i915_gem_object.h drm/i915/gvt: Dmabuf support for GVT-g 2017-12-04 11:24:33 +08:00
i915_gem_render_state.c
i915_gem_render_state.h
i915_gem_request.c drm/i915/breadcrumbs: Drop request reference for the signaler thread 2018-02-05 15:26:51 +00:00
i915_gem_request.h drm/i915: Avoid waitboosting on the active request 2018-01-18 17:14:30 +00:00
i915_gem_shrinker.c drm/i915: Only attempt to scan the requested number of shrinker slabs 2018-01-18 09:19:05 +00:00
i915_gem_stolen.c drm/i915: prefer resource_size_t for everything stolen 2017-12-12 12:30:22 +02:00
i915_gem_tiling.c drm/i915: Refactor common list iteration over GGTT vma 2017-12-07 23:26:55 +00:00
i915_gem_timeline.c drm/i915: properly init lockdep class 2017-12-14 20:10:01 +02:00
i915_gem_timeline.h
i915_gem_userptr.c
i915_gem.c drm/i915: Skip post-reset request emission if the engine is not idle 2018-02-05 15:27:26 +00:00
i915_gem.h
i915_gemfs.c drm/i915: Disable THP until we have a GPU read BW W/A 2017-11-30 10:11:49 +02:00
i915_gemfs.h
i915_gpu_error.c drm/i915: Report if an unbannable context is involved in a GPU hang 2018-02-05 10:59:22 +00:00
i915_ioc32.c
i915_irq.c drm/i915: Remove spurious DRM_ERROR for cancelled interrupts 2018-02-02 20:31:52 +00:00
i915_memcpy.c drm/i915: Do not enable movntdqa optimization in hypervisor guest 2017-12-22 11:12:15 +00:00
i915_mm.c
i915_oa_bdw.c
i915_oa_bdw.h
i915_oa_bxt.c
i915_oa_bxt.h
i915_oa_cflgt2.c
i915_oa_cflgt2.h
i915_oa_cflgt3.c
i915_oa_cflgt3.h
i915_oa_chv.c
i915_oa_chv.h
i915_oa_cnl.c
i915_oa_cnl.h
i915_oa_glk.c
i915_oa_glk.h
i915_oa_hsw.c
i915_oa_hsw.h
i915_oa_kblgt2.c
i915_oa_kblgt2.h
i915_oa_kblgt3.c
i915_oa_kblgt3.h
i915_oa_sklgt2.c
i915_oa_sklgt2.h
i915_oa_sklgt3.c
i915_oa_sklgt3.h
i915_oa_sklgt4.c
i915_oa_sklgt4.h
i915_params.c drm/i915: Enable inject_load_failure only in DEBUG config 2018-02-02 14:19:05 +00:00
i915_params.h drm/i915/guc: Keep GuC log disabled by default 2018-01-19 20:35:32 +00:00
i915_pci.c drm/i915/cnl: Add Cannonlake PCI IDs for another SKU. 2018-01-30 10:24:12 -08:00
i915_perf.c
i915_pmu.c drm/i915/pmu: Fix PMU enable vs execlists tasklet race 2018-02-06 11:21:27 +00:00
i915_pmu.h drm/i915/pmu: Only enumerate available counters in sysfs 2018-01-11 09:55:52 +00:00
i915_pvinfo.h
i915_reg.h drm/i915/icl: Set graphics mode register for gen11 2018-01-31 14:29:52 -02:00
i915_selftest.h
i915_suspend.c
i915_sw_fence.c drm/i915/fence: Separate timeout mechanism for awaiting on dma-fences 2018-01-15 10:29:18 +00:00
i915_sw_fence.h
i915_syncmap.c
i915_syncmap.h
i915_sysfs.c drm/i915: Remove unsafe i915.enable_rc6 2017-12-01 15:20:02 +00:00
i915_trace_points.c
i915_trace.h drm/i915/trace: add hw_id to gem requests trace points 2017-12-18 16:10:32 +00:00
i915_utils.h drm/i915: Move some utility functions to i915_util.h 2017-12-22 09:13:47 +00:00
i915_vgpu.c
i915_vgpu.h
i915_vma.c drm/i915: make mappable struct resource centric 2017-12-12 12:30:21 +02:00
i915_vma.h drm/i915: Refactor common list iteration over GGTT vma 2017-12-07 23:26:55 +00:00
intel_acpi.c
intel_atomic_plane.c drm/i915: Deprecate I915_SET_COLORKEY_NONE 2018-02-05 20:54:01 +02:00
intel_atomic.c
intel_audio.c drm/i915: Check for fused or unused pipes 2018-01-19 16:15:50 +02:00
intel_bios.c drm/i915/dp: limit DP link rate based on VBT on CNL+ 2018-02-02 09:50:51 +02:00
intel_bios.h
intel_breadcrumbs.c drm/i915/breadcrumbs: Drop request reference for the signaler thread 2018-02-05 15:26:51 +00:00
intel_cdclk.c drm/i915/bxt, glk: Avoid long atomic poll during CDCLK change 2018-02-01 21:13:21 +02:00
intel_color.c
intel_crt.c
intel_csr.c drm/i915/dmc: DMC 1.07 for Cannonlake 2018-01-04 16:29:12 -08:00
intel_ddi.c drm/i915/cnl: Enable DDI-F on Cannonlake. 2018-01-30 10:24:22 -08:00
intel_device_info.c drm/i915/icl: Add initial Icelake definitions. 2018-01-19 17:52:59 -02:00
intel_device_info.h drm/i915/icl: Add initial Icelake definitions. 2018-01-19 17:52:59 -02:00
intel_display.c drm/i915: Deprecate I915_SET_COLORKEY_NONE 2018-02-05 20:54:01 +02:00
intel_display.h drm/i915/cnl: Enable DDI-F on Cannonlake. 2018-01-30 10:24:22 -08:00
intel_dp_aux_backlight.c
intel_dp_link_training.c drm/i915/edp: Do not do link training fallback or prune modes on EDP 2018-01-22 17:58:10 +02:00
intel_dp_mst.c
intel_dp.c drm/i915/dp: limit DP link rate based on VBT on CNL+ 2018-02-02 09:50:51 +02:00
intel_dpio_phy.c
intel_dpll_mgr.c
intel_dpll_mgr.h
intel_drv.h drm/i915: For HPD connected port use hpd_pin instead of port. 2018-01-30 10:24:19 -08:00
intel_dsi_dcs_backlight.c
intel_dsi_pll.c
intel_dsi_vbt.c
intel_dsi.c drm-intel-next-2017-12-01: 2017-12-08 08:41:22 +10:00
intel_dsi.h
intel_dvo.c
intel_engine_cs.c drm/i915: Downgrade incorrect engine constructor usage warnings to development 2018-01-22 17:15:20 +00:00
intel_fbc.c drm/i915: Always update the no_fbc_reason when disabling 2018-02-05 11:20:30 +00:00
intel_fbdev.c drm/i915: give stolen_usable_size a more suitable home 2017-12-12 12:30:22 +02:00
intel_fifo_underrun.c
intel_frontbuffer.c
intel_frontbuffer.h
intel_guc_ads.c drm/i915/guc : Decoupling ADS and logs from submission 2018-01-03 14:02:10 +00:00
intel_guc_ads.h drm/i915/guc : Decoupling ADS and logs from submission 2018-01-03 14:02:10 +00:00
intel_guc_ct.c
intel_guc_ct.h
intel_guc_fw.c drm/i915/glk: Disable Guc and HuC on GLK 2018-01-04 14:45:07 -08:00
intel_guc_fw.h drm/i915/guc: Move firmware selection to init_early 2017-12-06 14:41:47 +00:00
intel_guc_fwif.h
intel_guc_log.c drm/i915/guc: Don't try to create log runtime if there is no log 2018-02-01 12:36:50 +00:00
intel_guc_log.h drm/i915/guc: Update name and prototype of i915_guc_log_control 2018-01-24 19:44:06 +00:00
intel_guc_reg.h
intel_guc_submission.c drm/i915/guc : Decoupling ADS and logs from submission 2018-01-03 14:02:10 +00:00
intel_guc_submission.h drm/i915/guc: Move GuC workqueue allocations outside of the mutex 2017-12-14 08:06:54 +00:00
intel_guc.c drm/i915/guc: Fix lockdep due to log relay channel handling under struct_mutex 2018-01-24 19:44:04 +00:00
intel_guc.h drm/i915/guc: Move GuC workqueue allocations outside of the mutex 2017-12-14 08:06:54 +00:00
intel_gvt.c drm/i915/guc: Introduce USES_GUC_xxx helper macros 2017-12-06 14:41:49 +00:00
intel_gvt.h
intel_hangcheck.c drm/i915: Add some newlines to intel_engine_dump() headers 2018-02-05 10:59:59 +00:00
intel_hdmi.c drm/i915/cnl: Add HPD support for Port F. 2018-01-30 10:24:20 -08:00
intel_hotplug.c drm/i915/cnl: Add HPD support for Port F. 2018-01-30 10:24:20 -08:00
intel_huc.c drm/i915/glk: Disable Guc and HuC on GLK 2018-01-04 14:45:07 -08:00
intel_huc.h drm/i915/huc: Load HuC only if requested 2017-12-06 14:41:54 +00:00
intel_i2c.c drm/i915/icp: add ICP gmbus and gpio support 2018-01-19 18:02:52 -02:00
intel_lpe_audio.c drm/i915/lpe: Remove double-encapsulation of info string 2017-12-19 14:59:40 +02:00
intel_lrc_reg.h drm/i915: Move LRC register offsets to a header file 2018-01-24 09:22:55 +00:00
intel_lrc.c drm/i915/cnl: WaPipeControlBefore3DStateSamplePattern 2018-02-06 08:59:39 +00:00
intel_lrc.h drm/i915/execlists: Inhibit context save/restore for the fake preempt context 2018-01-24 09:40:15 +00:00
intel_lspcon.c drm/i915: For HPD connected port use hpd_pin instead of port. 2018-01-30 10:24:19 -08:00
intel_lvds.c
intel_mocs.c
intel_mocs.h
intel_modes.c drm/i915: remove redundant ELD connector type update 2018-01-19 11:58:48 +02:00
intel_opregion.c drm/i915: Move opregion definitions to dedicated intel_opregion.h 2017-12-22 09:19:48 +00:00
intel_opregion.h drm/i915: Move opregion definitions to dedicated intel_opregion.h 2017-12-22 09:19:48 +00:00
intel_overlay.c drm/i915: make mappable struct resource centric 2017-12-12 12:30:21 +02:00
intel_panel.c drm/i915/icp: Add backlight Support for ICP 2018-01-19 17:58:28 -02:00
intel_pipe_crc.c drm/i915: Make ips_enabled a property depending on whether IPS is enabled, v3. 2017-11-30 16:49:42 +01:00
intel_pm.c drm/i915/bxt, glk: Avoid long atomic poll during CDCLK change 2018-02-01 21:13:21 +02:00
intel_psr.c drm/i915/psr: Don't name status or debug registers like control registers. 2018-01-19 16:46:13 -08:00
intel_renderstate_gen6.c
intel_renderstate_gen7.c
intel_renderstate_gen8.c
intel_renderstate_gen9.c
intel_renderstate.h
intel_ringbuffer.c
intel_ringbuffer.h drm/i915/pmu: Fix PMU enable vs execlists tasklet race 2018-02-06 11:21:27 +00:00
intel_runtime_pm.c drm/i915/cnl: Enable DDI-F on Cannonlake. 2018-01-30 10:24:22 -08:00
intel_sdvo_regs.h
intel_sdvo.c
intel_sideband.c
intel_sprite.c drm/i915: Deprecate I915_SET_COLORKEY_NONE 2018-02-05 20:54:01 +02:00
intel_tv.c
intel_uc_fw.c drm/i915/uc: Don't use -EIO to report missing firmware 2017-12-06 14:41:52 +00:00
intel_uc_fw.h drm/i915/guc: Move firmware selection to init_early 2017-12-06 14:41:47 +00:00
intel_uc.c drm/i915/guc: Don't forget to free GuC error log 2018-02-01 12:33:57 +00:00
intel_uc.h drm/i915/guc: Fix lockdep due to log relay channel handling under struct_mutex 2018-01-24 19:44:04 +00:00
intel_uncore.c drm/i915/icl: allow the reg_read ioctl to read the RCS TIMESTAMP register 2018-01-31 14:30:44 -02:00
intel_uncore.h
intel_vbt_defs.h drm/i915/dp: limit DP link rate based on VBT on CNL+ 2018-02-02 09:50:51 +02:00
Kconfig
Kconfig.debug drm/i915: Avoid context dereference inside execlists_submission_tasklet 2017-12-19 23:04:45 +00:00
Makefile drm/i915/guc : Decoupling ADS and logs from submission 2018-01-03 14:02:10 +00:00