linux_dsm_epyc7002/drivers/gpu/drm/i915/selftests
Hans de Goede a5266db4d3 drm/i915: Acquire PUNIT->PMIC bus for intel_uncore_forcewake_reset()
intel_uncore_forcewake_reset() does forcewake puts and gets as such
we need to make sure that no-one tries to access the PUNIT->PMIC bus
(on systems where this bus is shared) while it runs, otherwise bad
things happen.

Normally this is taken care of by the i915_pmic_bus_access_notifier()
which does an intel_uncore_forcewake_get(FORCEWAKE_ALL) when some other
driver tries to access the PMIC bus, so that later forcewake gets are
no-ops (for the duration of the bus access).

But intel_uncore_forcewake_reset gets called in 3 cases:
1) Before registering the pmic_bus_access_notifier
2) After unregistering the pmic_bus_access_notifier
3) To reset forcewake state on a GPU reset

In all 3 cases the i915_pmic_bus_access_notifier() protection is
insufficient.

This commit fixes this race by calling iosf_mbi_punit_acquire() before
calling intel_uncore_forcewake_reset(). In the case where it is called
directly after unregistering the pmic_bus_access_notifier, we need to
hold the punit-lock over both calls to avoid a race where
intel_uncore_fw_release_timer() may execute between the 2 calls.

Reviewed-by: Imre Deak <imre.deak@intel.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171019111620.26761-3-hdegoede@redhat.com
2017-11-10 13:14:03 +01:00
..
huge_gem_object.c drm/i915: introduce page_size members 2017-10-07 10:11:48 +01:00
huge_gem_object.h
huge_pages.c drm/i915/selftests: Skip mixed page exhaustion if only small pages available 2017-11-07 17:50:33 +00:00
i915_gem_coherency.c drm/i915: Don't use MI_STORE_DWORD_IMM on Sandybridge/vcs 2017-08-18 11:55:02 +01:00
i915_gem_context.c drm/i915: Move dev_priv->mm.[un]bound_list to its own lock 2017-10-16 20:44:19 +01:00
i915_gem_dmabuf.c drm/i915: Fix an error checking test 2017-06-27 14:30:56 +01:00
i915_gem_evict.c drm/i915: Move dev_priv->mm.[un]bound_list to its own lock 2017-10-16 20:44:19 +01:00
i915_gem_gtt.c drm/i915/selftests: Take rpm wakeref around GGTT lowlevel tests 2017-11-07 17:50:33 +00:00
i915_gem_object.c drm/i915/selftests: Take rpm wakeref around partial tiling tests 2017-11-07 17:50:34 +00:00
i915_gem_request.c drm/i915: Use rcu instead of stop_machine in set_wedged 2017-10-11 17:51:21 +02:00
i915_gem_timeline.c drm/i915/selftests: Use mul_u32_u32() for 32b x 32b -> 64b result 2017-09-13 13:27:20 +01:00
i915_live_selftests.h drm/i915/selftests: Exercise adding requests to a full GGTT 2017-10-12 21:06:26 +01:00
i915_mock_selftests.h drm/i915/selftests: huge page tests 2017-10-07 10:12:00 +01:00
i915_random.c Merge drm-upstream/drm-next into drm-intel-next-queued 2017-09-28 15:56:49 +03:00
i915_random.h drm/i915/selftests: Use mul_u32_u32() for 32b x 32b -> 64b result 2017-09-13 13:27:20 +01:00
i915_selftest.c
i915_sw_fence.c drm/i915/selftests: Wrap a timer into a i915_sw_fence 2017-10-12 21:06:26 +01:00
i915_syncmap.c
i915_vma.c drm/i915: Allow contexts to be unreferenced locklessly 2017-06-20 17:13:47 +01:00
intel_breadcrumbs.c mm: treewide: remove GFP_TEMPORARY allocation flag 2017-09-13 18:53:16 -07:00
intel_hangcheck.c drm/i915/selftests: Hold the rpm wakeref for the reset tests 2017-10-09 17:07:28 +01:00
intel_uncore.c drm/i915: Acquire PUNIT->PMIC bus for intel_uncore_forcewake_reset() 2017-11-10 13:14:03 +01:00
lib_sw_fence.c Revert "drm/i915/selftests: Convert timers to use timer_setup()" 2017-10-25 14:16:16 +01:00
lib_sw_fence.h drm/i915/selftests: Wrap a timer into a i915_sw_fence 2017-10-12 21:06:26 +01:00
mock_context.c drm/i915/selftests: Exercise adding requests to a full GGTT 2017-10-12 21:06:26 +01:00
mock_context.h drm/i915/selftests: Exercise independence of per-engine resets 2017-07-27 09:38:48 +02:00
mock_dmabuf.c
mock_dmabuf.h
mock_drm.c
mock_drm.h
mock_engine.c drm/i915/selftests: Don't try to queue a request with zero delay 2017-10-25 12:13:03 +01:00
mock_engine.h drm/i915: Supply the engine-id for our mock_engine() 2017-08-10 12:18:35 +01:00
mock_gem_device.c drm/i915: enable platform support for 2M pages 2017-10-07 10:12:05 +01:00
mock_gem_device.h
mock_gem_object.h
mock_gtt.c drm/i915: introduce vm set_pages/clear_pages 2017-10-07 10:11:50 +01:00
mock_gtt.h
mock_request.c
mock_request.h
mock_timeline.c
mock_timeline.h
mock_uncore.c
mock_uncore.h
scatterlist.c drm/i915/selftests: mix huge pages 2017-10-07 10:12:03 +01:00