linux_dsm_epyc7002/drivers/gpu/drm/i915/gem
Chris Wilson c7302f2044 drm/i915: Defer final intel_wakeref_put to process context
As we need to acquire a mutex to serialise the final
intel_wakeref_put, we need to ensure that we are in process context at
that time. However, we want to allow operation on the intel_wakeref from
inside timer and other hardirq context, which means that need to defer
that final put to a workqueue.

Inside the final wakeref puts, we are safe to operate in any context, as
we are simply marking up the HW and state tracking for the potential
sleep. It's only the serialisation with the potential sleeping getting
that requires careful wait avoidance. This allows us to retain the
immediate processing as before (we only need to sleep over the same
races as the current mutex_lock).

v2: Add a selftest to ensure we exercise the code while lockdep watches.
v3: That test was extremely loud and complained about many things!
v4: Not a whale!

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111295
References: https://bugs.freedesktop.org/show_bug.cgi?id=111245
References: https://bugs.freedesktop.org/show_bug.cgi?id=111256
Fixes: 18398904ca ("drm/i915: Only recover active engines")
Fixes: 51fbd8de87 ("drm/i915/pmu: Atomically acquire the gt_pm wakeref")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190808202758.10453-1-chris@chris-wilson.co.uk
2019-08-08 21:28:51 +01:00
..
selftests drm/i915: Fix up the inverse mapping for default ctx->engines[] 2019-08-08 15:45:35 +01:00
i915_gem_busy.c drm/i915: Use drm_gem_object.resv 2019-06-18 15:30:32 +01:00
i915_gem_clflush.c drm/i915: avoid including intel_drv.h via i915_drv.h->i915_trace.h 2019-08-07 12:43:14 +03:00
i915_gem_clflush.h drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
i915_gem_client_blt.c drm/i915: remove unnecessary includes of intel_display_types.h header 2019-08-07 12:43:55 +03:00
i915_gem_client_blt.h drm/i915: add in-kernel blitter client 2019-05-30 12:01:44 +01:00
i915_gem_context_types.h drm/i915: Remove lrc default desc from GEM context 2019-08-01 17:37:02 +01:00
i915_gem_context.c drm/i915: Fix up the inverse mapping for default ctx->engines[] 2019-08-08 15:45:35 +01:00
i915_gem_context.h drm/i915: Remove unused i915_gem_context_lookup_engine 2019-07-09 21:36:50 +01:00
i915_gem_dmabuf.c drm/i915: Use drm_gem_object.resv 2019-06-18 15:30:32 +01:00
i915_gem_domain.c drm/i915: move modesetting core code under display/ 2019-06-17 11:48:32 +03:00
i915_gem_execbuffer.c drm/i915: remove unnecessary includes of intel_display_types.h header 2019-08-07 12:43:55 +03:00
i915_gem_fence.c drm/i915: Use drm_gem_object.resv 2019-06-18 15:30:32 +01:00
i915_gem_internal.c drm/i915: Pull scatterlist utils out of i915_gem.h 2019-05-28 12:45:29 +01:00
i915_gem_ioctls.h
i915_gem_mman.c drm/i915: remove unnecessary includes of intel_display_types.h header 2019-08-07 12:43:55 +03:00
i915_gem_object_blt.c drm/i915: remove unnecessary includes of intel_display_types.h header 2019-08-07 12:43:55 +03:00
i915_gem_object_blt.h drm/i915: add in-kernel blitter client 2019-05-30 12:01:44 +01:00
i915_gem_object_types.h drm/i915: Replace struct_mutex for batch pool serialisation 2019-08-04 14:31:18 +01:00
i915_gem_object.c drm/i915: avoid including intel_drv.h via i915_drv.h->i915_trace.h 2019-08-07 12:43:14 +03:00
i915_gem_object.h drm/i915: Hide unshrinkable context objects from the shrinker 2019-08-02 23:39:46 +01:00
i915_gem_pages.c drm/i915: Hide unshrinkable context objects from the shrinker 2019-08-02 23:39:46 +01:00
i915_gem_phys.c drm/i915/gem: Defer obj->base.resv fini until RCU callback 2019-07-04 15:34:35 +01:00
i915_gem_pm.c drm/i915: Defer final intel_wakeref_put to process context 2019-08-08 21:28:51 +01:00
i915_gem_pm.h drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
i915_gem_shmem.c drm/i915: avoid including intel_drv.h via i915_drv.h->i915_trace.h 2019-08-07 12:43:14 +03:00
i915_gem_shrinker.c drm/i915/gem: Make caps.scheduler static 2019-08-06 15:00:14 +01:00
i915_gem_stolen.c drm/i915/gem: Defer obj->base.resv fini until RCU callback 2019-07-04 15:34:35 +01:00
i915_gem_throttle.c drm/i915/gt: Use intel_gt as the primary object for handling resets 2019-07-12 21:06:56 +01:00
i915_gem_tiling.c drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
i915_gem_userptr.c drm/i915: remove unnecessary includes of intel_display_types.h header 2019-08-07 12:43:55 +03:00
i915_gem_wait.c drm/i915: Use drm_gem_object.resv 2019-06-18 15:30:32 +01:00
i915_gemfs.c drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
i915_gemfs.h drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
Makefile drm/i915: use upstream version of header tests 2019-07-30 12:11:57 +03:00