linux_dsm_epyc7002/drivers/gpu/drm/i915
Chris Wilson 47bf7b7a71 drm/i915/gem: Remove object_is_locked assertion from unpin_from_display_plane
Since moving the obj->vma.list to a spin_lock, and the vm->bound_list to
its vm->mutex, along with tracking shrinkable status under its own
spinlock, we no long require the object to be locked by the caller.

This is fortunate as it appears we can be called with the lock along an
error path in flipping:

<4> [139.942851] WARN_ON(debug_locks && !lock_is_held(&(&((obj)->base.resv)->lock.base)->dep_map))
<4> [139.943242] WARNING: CPU: 0 PID: 1203 at drivers/gpu/drm/i915/gem/i915_gem_domain.c:405 i915_gem_object_unpin_from_display_plane+0x70/0x130 [i915]
<4> [139.943263] Modules linked in: snd_hda_intel i915 vgem snd_hda_codec_realtek snd_hda_codec_generic coretemp snd_intel_dspcfg snd_hda_codec snd_hwdep snd_hda_core r8169 lpc_ich snd_pcm realtek prime_numbers [last unloaded: i915]
<4> [139.943347] CPU: 0 PID: 1203 Comm: kms_flip Tainted: G     U            5.6.0-gd0fda5c2cf3f1-drmtip_474+ #1
<4> [139.943363] Hardware name:  /D510MO, BIOS MOPNV10J.86A.0311.2010.0802.2346 08/02/2010
<4> [139.943589] RIP: 0010:i915_gem_object_unpin_from_display_plane+0x70/0x130 [i915]
<4> [139.943589] Code: 85 28 01 00 00 be ff ff ff ff 48 8d 78 60 e8 d7 9b f0 e2 85 c0 75 b9 48 c7 c6 50 b9 38 c0 48 c7 c7 e9 48 3c c0 e8 20 d4 e9 e2 <0f> 0b eb a2 48 c7 c1 08 bb 38 c0 ba 0a 01 00 00 48 c7 c6 88 a3 35
<4> [139.943589] RSP: 0018:ffffb774c0603b48 EFLAGS: 00010282
<4> [139.943589] RAX: 0000000000000000 RBX: ffff9a142fa36e80 RCX: 0000000000000006
<4> [139.943589] RDX: 000000000000160d RSI: ffff9a142c1a88f8 RDI: ffffffffa434a64d
<4> [139.943589] RBP: ffff9a1410a513c0 R08: ffff9a142c1a88f8 R09: 0000000000000000
<4> [139.943589] R10: 0000000000000000 R11: 0000000000000000 R12: ffff9a1436ee94b8
<4> [139.943589] R13: 0000000000000001 R14: 00000000ffffffff R15: ffff9a1410960000
<4> [139.943589] FS:  00007fc73a744e40(0000) GS:ffff9a143da00000(0000) knlGS:0000000000000000
<4> [139.943589] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
<4> [139.943589] CR2: 00007fc73997e098 CR3: 000000002f5fe000 CR4: 00000000000006f0
<4> [139.943589] Call Trace:
<4> [139.943589]  intel_pin_and_fence_fb_obj+0x1c9/0x1f0 [i915]
<4> [139.943589]  intel_plane_pin_fb+0x3f/0xd0 [i915]
<4> [139.943589]  intel_prepare_plane_fb+0x13b/0x5c0 [i915]
<4> [139.943589]  drm_atomic_helper_prepare_planes+0x85/0x110
<4> [139.943589]  intel_atomic_commit+0xda/0x390 [i915]
<4> [139.943589]  drm_atomic_helper_page_flip+0x9c/0xd0
<4> [139.943589]  ? drm_event_reserve_init+0x46/0x60
<4> [139.943589]  drm_mode_page_flip_ioctl+0x587/0x5d0

This completes the symmetry lost in commit 8b1c78e06e ("drm/i915: Avoid
calling i915_gem_object_unbind holding object lock").

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1743
Fixes: 8b1c78e06e ("drm/i915: Avoid calling i915_gem_object_unbind holding object lock")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Andi Shyti <andi.shyti@intel.com>
Cc: <stable@vger.kernel.org> # v5.6+
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200420125356.26614-1-chris@chris-wilson.co.uk
(cherry picked from commit a95f3ac21d)
(cherry picked from commit 2208b85fa1766ee4821a9435d548578b67090531)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2020-05-06 15:37:31 -07:00
..
display Make the "Reducing compressed framebufer size" message be DRM_INFO_ONCE() 2020-05-04 11:08:39 -07:00
gem drm/i915/gem: Remove object_is_locked assertion from unpin_from_display_plane 2020-05-06 15:37:31 -07:00
gt drm/i915/gt: Yield the timeslice if caught waiting on a user semaphore 2020-05-06 15:37:09 -07:00
gvt drm/i915/gvt: switch to user vfio_group_pin/upin_pages 2020-04-14 16:30:17 +08:00
oa drm/i915: reimplement header test feature 2020-01-02 12:24:10 +02:00
selftests drm/i915/selftests: Apply a heavy handed flush to i915_active 2020-03-07 00:05:54 +00:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
i915_active_types.h
i915_active.c drm/i915: Extend i915_request_await_active to use all timelines 2020-03-11 10:54:59 +00:00
i915_active.h drm/i915: Extend i915_request_await_active to use all timelines 2020-03-11 10:54:59 +00:00
i915_buddy.c drm/i915/buddy: avoid double list_add 2020-03-06 14:33:08 +00:00
i915_buddy.h
i915_cmd_parser.c drm/i915/cmd_parser: conversion to struct drm_device logging macros. 2020-02-04 11:29:40 +02:00
i915_debugfs_params.c drm/i915: Include the debugfs params header for its own definition 2020-01-17 13:00:16 +00:00
i915_debugfs_params.h drm/i915/params: add i915 parameters to debugfs 2020-01-15 15:10:16 +02:00
i915_debugfs.c drm/i915: Remove debugfs i915_drpc_info and i915_forcewake_domains 2020-03-11 09:47:12 +00:00
i915_debugfs.h drm/i915: split out display debugfs to a separate file 2020-02-14 13:26:51 +02:00
i915_drv.c drm for 5.7-rc1 2020-04-01 15:24:20 -07:00
i915_drv.h drm/i915/tgl: Add Wa_14010477008:tgl 2020-04-20 10:12:32 -07:00
i915_fixed.h
i915_gem_evict.c drm/i915: Drop inspection of execbuf flags during evict 2020-03-03 21:52:51 +00:00
i915_gem_fence_reg.c drm/i915/vgpu: improve vgpu abstractions 2020-03-03 17:46:54 +02:00
i915_gem_fence_reg.h
i915_gem_gtt.c drm/i915: significantly reduce the use of <drm/i915_drm.h> 2020-02-27 08:35:09 +02:00
i915_gem_gtt.h drm/i915/gtt: split up i915_gem_gtt 2020-01-07 19:27:36 +00:00
i915_gem.c drm/i915: significantly reduce the use of <drm/i915_drm.h> 2020-02-27 08:35:09 +02:00
i915_gem.h i915 features for v5.6: 2019-12-27 15:25:04 +10:00
i915_getparam.c
i915_globals.c drm/i915: Ratelimit i915_globals_park 2019-12-18 17:38:56 +00:00
i915_globals.h
i915_gpu_error.c drm/i915: Avoid dereferencing a dead context 2020-05-04 10:35:47 -07:00
i915_gpu_error.h drm/i915: Track hw reported context runtime 2020-02-16 15:16:22 +00:00
i915_ioc32.c drm/i915: add i915_ioc32.h for compat 2020-03-02 13:32:37 +02:00
i915_ioc32.h drm/i915: add i915_ioc32.h for compat 2020-03-02 13:32:37 +02:00
i915_irq.c drm/i915/tgl+: Fix interrupt handling for DP AUX transactions 2020-05-06 06:47:09 -07:00
i915_irq.h drm/i915: Convert to CRTC VBLANK callbacks 2020-02-13 13:08:13 +01:00
i915_memcpy.c drm/i915: remove always-defined CONFIG_AS_MOVNTDQA 2020-04-09 00:01:59 +09:00
i915_memcpy.h
i915_mm.c drm/i915/gem: Extend mmap support for lmem 2020-01-04 17:57:46 +00:00
i915_params.c drm/i915: Remove 'prefault_disable' modparam 2020-01-27 11:45:35 +00:00
i915_params.h drm/i915: Mark i915.reset as unsigned 2020-02-05 18:51:52 +00:00
i915_pci.c drm/i915/tgl: Remove require_force_probe protection 2020-03-13 14:26:09 -07:00
i915_perf_types.h drm/i915/perf: Reintroduce wait on OA configuration completion 2020-03-04 13:49:26 +02:00
i915_perf.c drm/i915/perf: Do not clear pollin for small user read buffers 2020-04-13 14:09:48 -07:00
i915_perf.h drm/i915/perf: Register sysctl path globally 2019-12-13 20:16:23 +00:00
i915_pmu.c drm/i915/pmu: Avoid using globals for PMU events 2020-02-26 14:07:50 +02:00
i915_pmu.h drm/i915: significantly reduce the use of <drm/i915_drm.h> 2020-02-27 08:35:09 +02:00
i915_priolist_types.h
i915_pvinfo.h
i915_query.c
i915_query.h
i915_reg.h drm/i915/gt: Yield the timeslice if caught waiting on a user semaphore 2020-05-06 15:37:09 -07:00
i915_request.c drm/i915: Defer semaphore priority bumping to a workqueue 2020-03-11 23:12:39 +02:00
i915_request.h drm/i915: Defer semaphore priority bumping to a workqueue 2020-03-11 23:12:39 +02:00
i915_scatterlist.c
i915_scatterlist.h
i915_scheduler_types.h
i915_scheduler.c drm/i915: Tweak scheduler's kick_submission() 2020-03-10 23:12:38 +00:00
i915_scheduler.h
i915_selftest.h
i915_suspend.c drm/i915: significantly reduce the use of <drm/i915_drm.h> 2020-02-27 08:35:09 +02:00
i915_suspend.h
i915_sw_fence_work.c drm/i915: Unpin vma->obj on early error 2019-12-18 10:13:03 +00:00
i915_sw_fence_work.h
i915_sw_fence.c drm/i915/gem: Don't leak non-persistent requests on changing engines 2020-02-11 21:58:39 +00:00
i915_sw_fence.h drm/i915/gem: Don't leak non-persistent requests on changing engines 2020-02-11 21:58:39 +00:00
i915_switcheroo.c drm: Avoid drm_global_mutex for simple inc/dec of dev->open_count 2020-01-24 17:41:34 +00:00
i915_switcheroo.h
i915_syncmap.c
i915_syncmap.h
i915_sysfs.c drm/i915/gt: Expose engine properties via sysfs 2020-02-28 22:03:19 +00:00
i915_sysfs.h
i915_trace_points.c
i915_trace.h drm/i915/trace: i915_request.prio is a signed value 2020-01-28 15:53:36 +00:00
i915_user_extensions.c
i915_user_extensions.h
i915_utils.c drm/i915: Force DPCD backlight mode on X1 Extreme 2nd Gen 4K AMOLED panel 2020-03-03 20:34:32 -05:00
i915_utils.h drm/i915: be more solid in checking the alignment 2020-03-11 23:12:39 +02:00
i915_vgpu.c drm/i915/vgpu: improve vgpu abstractions 2020-03-03 17:46:54 +02:00
i915_vgpu.h drm/i915/vgpu: improve vgpu abstractions 2020-03-03 17:46:54 +02:00
i915_vma_types.h drm/i915/gem: Extract transient execbuf flags from i915_vma 2020-03-03 21:52:51 +00:00
i915_vma.c drm/i915: Check current i915_vma.pin_count status first on unbind 2020-05-06 15:36:54 -07:00
i915_vma.h drm/i915: Use the async worker to avoid reclaim tainting the ggtt->mutex 2020-01-30 21:35:43 +00:00
intel_device_info.c drm/i915: significantly reduce the use of <drm/i915_drm.h> 2020-02-27 08:35:09 +02:00
intel_device_info.h drm/i915: Read rawclk_freq earlier 2020-02-19 14:09:18 +00:00
intel_dram.c drm/i915/dram: hide the dram structs better 2020-03-02 13:32:27 +02:00
intel_dram.h drm/i915: split out intel_dram.[ch] from i915_drv.c 2020-02-27 09:16:01 +02:00
intel_gvt.c drm/i915/gvt: make intel_gvt_active internal to intel_gvt 2020-03-03 17:47:03 +02:00
intel_gvt.h
intel_memory_region.c drm/i915: convert to new logging macros in i915/intel_memory_region.c 2020-01-17 17:44:19 +02:00
intel_memory_region.h drm/i915: lookup for mem_region of a mem_type 2020-01-05 01:08:09 +00:00
intel_pch.c drm/i915: Make WARN* drm specific where drm_priv ptr is available 2020-01-22 17:54:33 +02:00
intel_pch.h
intel_pm.c drm/i915: Don't enable WaIncreaseLatencyIPCEnabled when IPC is disabled 2020-05-04 10:36:00 -07:00
intel_pm.h drm/i915: Manipulate DBuf slices properly 2020-02-05 19:19:23 +02:00
intel_region_lmem.c drm/i915/lmem: use new struct drm_device based logging macros. 2020-01-10 16:11:04 +02:00
intel_region_lmem.h
intel_runtime_pm.c
intel_runtime_pm.h
intel_sideband.c drm for 5.7-rc1 2020-04-01 15:24:20 -07:00
intel_sideband.h
intel_uncore.c drm/i915: Make WARN* drm specific where uncore or stream ptr is available 2020-01-22 17:57:39 +02:00
intel_uncore.h
intel_wakeref.c drm/i915/gt: Flush ongoing retires during wait_for_idle 2020-01-03 00:33:07 +00:00
intel_wakeref.h drm/i915/gt: Flush ongoing retires during wait_for_idle 2020-01-03 00:33:07 +00:00
intel_wopcm.c
intel_wopcm.h
Kconfig drm/i915: Update drm/i915 bug filing URL 2020-02-17 21:16:45 +02:00
Kconfig.debug
Kconfig.profile drm/i915/gen12: Disable preemption timeout 2020-03-12 13:46:01 +00:00
Kconfig.unstable
Makefile drm/i915: remove always-defined CONFIG_AS_MOVNTDQA 2020-04-09 00:01:59 +09:00
vlv_suspend.c drm/i915: switch vlv_suspend to use intel uncore register accessors 2020-02-17 11:29:51 +02:00
vlv_suspend.h drm/i915: split out vlv/chv specific suspend/resume code 2020-02-17 11:29:35 +02:00