OpenCloudOS-Kernel/drivers/gpu/drm/i915/gt
Imre Deak 8840e3bd98 drm/i915: Fix the GT fence revocation runtime PM logic
To optimize some task deferring it until runtime resume unless someone
holds a runtime PM reference (because in this case the task can be done
w/o the overhead of runtime resume), we have to use the runtime PM
get-if-active logic: If the runtime PM usage count is 0 (and so
get-if-in-use would return false) the runtime suspend handler is not
necessarily called yet (it could be just pending), so the device is not
necessarily powered down, and so the runtime resume handler is not
guaranteed to be called.

The fence revocation depends on the above deferral, so add a
get-if-active helper and use it during fence revocation.

v2:
- Add code comment explaining the fence reg programming deferral logic
  to i915_vma_revoke_fence(). (Chris)
- Add Cc: stable and Fixes: tags. (Chris)
- Fix the function docbook comment.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: <stable@vger.kernel.org> # v4.12+
Fixes: 181df2d458 ("drm/i915: Take rpm wakelock for releasing the fence on unbind")
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210322204223.919936-1-imre.deak@intel.com
(cherry picked from commit 9d58aa4629)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2021-03-24 09:12:07 -04:00
..
selftests
shaders drm/i915: Include asm sources for {ivb, hsw}_clear_kernel.c 2020-06-29 11:29:12 +03:00
uc drm/i915/uc: Add function to define defaults for GuC/HuC enable 2021-01-20 10:30:13 +00:00
debugfs_engines.c drm/i915/gt: allow setting generic data pointer 2020-03-26 21:20:51 +00:00
debugfs_engines.h
debugfs_gt.c drm/i915: Move sseu debugfs under gt/ 2020-07-08 21:40:15 +01:00
debugfs_gt.h drm/i915/gt: allow setting generic data pointer 2020-03-26 21:20:51 +00:00
debugfs_gt_pm.c drm/i915: Drop i915_request.lock requirement for intel_rps_boost() 2020-12-31 15:15:05 +00:00
debugfs_gt_pm.h
gen2_engine_cs.c drm/i915/gt: Flush gen3 relocs harder, again 2020-06-13 10:30:01 +01:00
gen2_engine_cs.h drm/i915/gt: Split low level gen2-7 CS emitters 2020-06-02 10:42:00 +01:00
gen6_engine_cs.c drm/i915/gt: Split low level gen2-7 CS emitters 2020-06-02 10:42:00 +01:00
gen6_engine_cs.h drm/i915/gt: Split low level gen2-7 CS emitters 2020-06-02 10:42:00 +01:00
gen6_ppgtt.c drm/i915/gt: Prune inlines 2021-01-14 15:40:57 +00:00
gen6_ppgtt.h drm/i915: Make sure execbuffer always passes ww state to i915_vma_pin. 2020-09-07 14:31:13 +03:00
gen6_renderstate.c
gen7_renderclear.c drm/i915/gt: Correct surface base address for renderclear 2021-02-17 06:19:04 -05:00
gen7_renderclear.h drm/i915/gen7: Clear all EU/L3 residual contexts 2020-03-06 08:59:06 +00:00
gen7_renderstate.c
gen8_engine_cs.c drm/i915/gt: Add arbitration check before semaphore wait 2021-01-18 12:37:20 +00:00
gen8_engine_cs.h drm/i915/gt: Move gen8 CS emitters into gen8_engine_cs.h 2020-12-16 15:55:43 +00:00
gen8_ppgtt.c drm/i915/gt: Prune inlines 2021-01-14 15:40:57 +00:00
gen8_ppgtt.h
gen8_renderstate.c
gen9_renderstate.c
hsw_clear_kernel.c drm/i915/gen7: Clear all EU/L3 residual contexts 2020-03-06 08:59:06 +00:00
intel_breadcrumbs.c drm/i915/gt: Close race between enable_breadcrumbs and cancel_breadcrumbs 2021-02-02 13:38:59 +02:00
intel_breadcrumbs.h drm/i915/gt: Restore ce->signal flush before releasing virtual engine 2021-01-08 21:35:55 +00:00
intel_breadcrumbs_types.h drm/i915/gt: Shrink the critical section for irq signaling 2020-12-24 15:02:39 +00:00
intel_context.c drm/i915/gt: Split the breadcrumb spinlock between global and contexts 2020-12-02 17:05:58 -08:00
intel_context.h drm/i915/gem: Peek at the inflight context 2020-12-29 19:28:45 +00:00
intel_context_param.c
intel_context_param.h
intel_context_sseu.c drm/i915/gt: Split logical ring contexts from execlist submission 2020-12-21 09:53:48 +00:00
intel_context_types.h drm/i915: Populate logical context during first pin. 2021-01-01 22:16:01 +00:00
intel_engine.h drm/i915/gt: Another tweak for flushing the tasklets 2020-12-20 18:15:17 +00:00
intel_engine_cs.c drm/i915: Wedge the GPU if command parser setup fails 2021-03-12 11:20:50 +10:00
intel_engine_heartbeat.c drm/i915/gt: Refactor heartbeat request construction and submission 2020-12-24 18:07:26 +00:00
intel_engine_heartbeat.h
intel_engine_pm.c drm/i915/gt: Prune inlines 2021-01-14 15:40:57 +00:00
intel_engine_pm.h drm/i915: Extend intel_wakeref to support delayed puts 2020-03-23 12:51:05 +00:00
intel_engine_stats.h drm/i915/gt: Convert stats.active to plain unsigned int 2021-01-15 21:30:24 +00:00
intel_engine_types.h drm/i915/gt: Convert stats.active to plain unsigned int 2021-01-15 21:30:24 +00:00
intel_engine_user.c drm/i915: Reboot CI if we get wedged during driver init 2020-07-06 19:21:07 +01:00
intel_engine_user.h
intel_execlists_submission.c drm/i915/gt: Skip over completed active execlists, again 2021-01-21 12:34:13 +00:00
intel_execlists_submission.h drm/i915/guc: stop calling execlists_set_default_submission 2021-01-13 11:22:00 +00:00
intel_ggtt.c drm pull for 5.12-rc1 2021-02-21 14:44:44 -08:00
intel_ggtt_fencing.c drm/i915: Fix the GT fence revocation runtime PM logic 2021-03-24 09:12:07 -04:00
intel_ggtt_fencing.h drm/i915/gt: Store the fence details on the fence 2020-04-01 23:34:16 +01:00
intel_gpu_commands.h drm/i915/gen12: Fix HDC pipeline flush 2020-05-07 07:44:41 +01:00
intel_gt.c drm/i915/gt: Consolidate the CS timestamp clocks 2020-12-23 21:10:41 +00:00
intel_gt.h drm/i915: Introduce gt_init_mmio 2020-07-08 21:07:13 +01:00
intel_gt_buffer_pool.c drm/i915/pool: constrain pool objects by mapping type 2021-01-19 20:36:28 +00:00
intel_gt_buffer_pool.h drm/i915/pool: constrain pool objects by mapping type 2021-01-19 20:36:28 +00:00
intel_gt_buffer_pool_types.h drm/i915/pool: constrain pool objects by mapping type 2021-01-19 20:36:28 +00:00
intel_gt_clock_utils.c drm/i915/gt: Consolidate the CS timestamp clocks 2020-12-23 21:10:41 +00:00
intel_gt_clock_utils.h drm/i915/gt: Consolidate the CS timestamp clocks 2020-12-23 21:10:41 +00:00
intel_gt_irq.c drm/i915/gt: Move move context layout registers and offsets to lrc_reg.h 2020-12-09 23:41:15 +00:00
intel_gt_irq.h
intel_gt_pm.c drm/i915/gt: Track the overall awake/busy time 2020-12-17 22:26:38 +00:00
intel_gt_pm.h drm/i915/gt: Track the overall awake/busy time 2020-12-17 22:26:38 +00:00
intel_gt_pm_irq.c
intel_gt_pm_irq.h
intel_gt_requests.c drm/i915/gt: Remove uninterruptible parameter from intel_gt_wait_for_idle 2020-12-09 19:43:32 +00:00
intel_gt_requests.h
intel_gt_types.h drm/i915/gt: Consolidate the CS timestamp clocks 2020-12-23 21:10:41 +00:00
intel_gtt.c drm/i915/gt: Provide a utility to create a scratch buffer 2020-12-21 09:53:52 +00:00
intel_gtt.h drm/i915/gt: Provide a utility to create a scratch buffer 2020-12-21 09:53:52 +00:00
intel_llc.c
intel_llc.h
intel_llc_types.h
intel_lrc.c drm/i915/gt: Prevent use of engine->wa_ctx after error 2021-01-18 12:24:59 +02:00
intel_lrc.h drm/i915/gt: Exercise lrc_wa_ctx initialisation failure 2021-01-09 16:02:57 +00:00
intel_lrc_reg.h drm/i915/gt: Split logical ring contexts from execlist submission 2020-12-21 09:53:48 +00:00
intel_mocs.c drm/i915/gt: Prune inlines 2021-01-14 15:40:57 +00:00
intel_mocs.h
intel_ppgtt.c drm/i915/gt: Prune inlines 2021-01-14 15:40:57 +00:00
intel_rc6.c drm/i915/gt: Prune inlines 2021-01-14 15:40:57 +00:00
intel_rc6.h
intel_rc6_types.h
intel_region_lmem.c drm/i915/region: convert object_create into object_init 2021-01-15 08:00:03 +00:00
intel_region_lmem.h drm/i915: move region_lmem under gt 2021-01-12 21:12:10 +00:00
intel_renderstate.c drm/i915/gt: Move gen8 CS emitters into gen8_engine_cs.h 2020-12-16 15:55:43 +00:00
intel_renderstate.h drm/i915: Use ww locking in intel_renderstate. 2020-09-07 14:30:31 +03:00
intel_reset.c drm/i915: Mark up protected uses of 'i915_request_completed' 2021-01-15 08:00:03 +00:00
intel_reset.h drm/i915/gt: Replace direct submit with direct call to tasklet 2020-12-24 15:02:35 +00:00
intel_reset_types.h drm/i915: Reboot CI if we get wedged during driver init 2020-07-06 19:21:07 +01:00
intel_ring.c drm/i915/gem: Move stolen node into GEM object union 2021-01-20 20:46:36 +00:00
intel_ring.h drm/i915: Make sure execbuffer always passes ww state to i915_vma_pin. 2020-09-07 14:31:13 +03:00
intel_ring_submission.c drm/i915/gt: Pull ring submission resume under its caller forcewake 2021-01-19 11:55:14 +00:00
intel_ring_types.h
intel_rps.c drm/i915/gt: Prune inlines 2021-01-14 15:40:57 +00:00
intel_rps.h drm/i915/gt: Sanitize RPS interrupts upon resume 2020-05-03 08:24:36 +01:00
intel_rps_types.h drm/i915: Drop i915_request.lock requirement for intel_rps_boost() 2020-12-31 15:15:05 +00:00
intel_sseu.c drm/i915/jsl: Split EHL/JSL platform info and PCI ids 2020-10-14 09:31:34 +02:00
intel_sseu.h drm/i915/sseu: Move sseu_info under gt_info 2020-07-08 21:13:09 +01:00
intel_sseu_debugfs.c drm/i915: Move sseu debugfs under gt/ 2020-07-08 21:40:15 +01:00
intel_sseu_debugfs.h drm/i915: Move sseu debugfs under gt/ 2020-07-08 21:40:15 +01:00
intel_timeline.c drm/i915: Check for rq->hwsp validity after acquiring RCU lock 2021-01-18 12:54:25 +02:00
intel_timeline.h drm/i915/gt: Only retire on the last breadcrumb if the last request 2021-01-08 21:35:56 +00:00
intel_timeline_types.h drm/i915/gt: Track all timelines created using the HWSP 2020-12-22 14:36:11 +00:00
intel_workarounds.c drm/i915: Disable atomics in L3 for gen9 2021-02-08 16:56:53 -05:00
intel_workarounds.h
intel_workarounds_types.h
ivb_clear_kernel.c drm/i915/gen7: Clear all EU/L3 residual contexts 2020-03-06 08:59:06 +00:00
mock_engine.c drm/i915: Refactor marking a request as EIO 2021-01-09 18:29:07 +00:00
mock_engine.h
selftest_context.c drm/i915/gt: Replace direct submit with direct call to tasklet 2020-12-24 15:02:35 +00:00
selftest_engine.c
selftest_engine.h
selftest_engine_cs.c drm/i915/gt: Move gen8 CS emitters into gen8_engine_cs.h 2020-12-16 15:55:43 +00:00
selftest_engine_heartbeat.c drm/i915/selftests: Bump the scheduling error threshold for fast heartbeats 2021-01-13 22:14:41 +00:00
selftest_engine_heartbeat.h drm/i915/selftests: Enable selftesting of busy-stats 2020-06-18 09:26:53 +01:00
selftest_engine_pm.c drm/i915/selftests: Rearrange ktime_get to reduce latency against CS 2021-01-08 21:35:54 +00:00
selftest_execlists.c drm/i915/selftests: Fix some error codes 2021-01-11 13:19:17 +00:00
selftest_gt_pm.c drm/i915/gt: Consolidate the CS timestamp clocks 2020-12-23 21:10:41 +00:00
selftest_hangcheck.c drm/i915/selftests: Prepare the selftests for engine resets with ring submission 2021-01-19 11:55:13 +00:00
selftest_llc.c
selftest_llc.h
selftest_lrc.c drm/i915/selftests: Break out of the lrc layout test after register mismatch 2021-01-06 15:37:19 +00:00
selftest_mocs.c drm/i915/selftests: fix the uint*_t types that have crept in 2021-01-14 11:52:07 +02:00
selftest_rc6.c drm/i915/gt: Move gen8 CS emitters into gen8_engine_cs.h 2020-12-16 15:55:43 +00:00
selftest_rc6.h
selftest_reset.c drm/i915/selftests: Prepare the selftests for engine resets with ring submission 2021-01-19 11:55:13 +00:00
selftest_ring.c drm/i915/gt: Incrementally check for rewinding 2020-06-16 11:34:23 +03:00
selftest_ring_submission.c drm/i915/selftests: Always flush before unpining after writing 2020-05-11 16:50:04 +01:00
selftest_rps.c drm/i915/gt: Plug IPS into intel_rps_set 2020-11-21 19:38:56 +00:00
selftest_rps.h drm/i915/gt: Fix up clock frequency 2020-04-27 17:34:33 +01:00
selftest_timeline.c drm/i915/gt: Move gen8 CS emitters into gen8_engine_cs.h 2020-12-16 15:55:43 +00:00
selftest_workarounds.c drm/i915/gt: Provide a utility to create a scratch buffer 2020-12-21 09:53:52 +00:00
shmem_utils.c drm/i915/gem: Move stolen node into GEM object union 2021-01-20 20:46:36 +00:00
shmem_utils.h drm/i915/gt: Keep a no-frills swappable copy of the default context state 2020-04-29 19:02:37 +01:00
st_shmem_utils.c drm/i915/gt: Keep a no-frills swappable copy of the default context state 2020-04-29 19:02:37 +01:00
sysfs_engines.c drm/i915/gt: Cleanup kasan warning for on-stack (unsigned long) casting 2020-10-16 11:08:44 +01:00
sysfs_engines.h