1
0
Fork 0
alistair23-linux/drivers/gpu/drm/i915
Chris Wilson c5ae864c14 drm/i915: Fix mismatch between misplaced vma check and vma insert
commit 0e53656ad8 upstream.

When inserting a VMA, we restrict the placement to the low 4G unless the
caller opts into using the full range. This was done to allow usersapce
the opportunity to transition slowly from a 32b address space, and to
avoid breaking inherent 32b assumptions of some commands.

However, for insert we limited ourselves to 4G-4K, but on verification
we allowed the full 4G. This causes some attempts to bind a new buffer
to sporadically fail with -ENOSPC, but at other times be bound
successfully.

commit 48ea1e32c3 ("drm/i915/gen9: Set PIN_ZONE_4G end to 4GB - 1
page") suggests that there is a genuine problem with stateless addressing
that cannot utilize the last page in 4G and so we purposefully excluded
it. This means that the quick pin pass may cause us to utilize a buggy
placement.

Reported-by: CQ Tang <cq.tang@intel.com>
Testcase: igt/gem_exec_params/larger-than-life-batch
Fixes: 48ea1e32c3 ("drm/i915/gen9: Set PIN_ZONE_4G end to 4GB - 1 page")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: CQ Tang <cq.tang@intel.com>
Reviewed-by: CQ Tang <cq.tang@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Cc: <stable@vger.kernel.org> # v4.5+
Link: https://patchwork.freedesktop.org/patch/msgid/20201216092951.7124-1-chris@chris-wilson.co.uk
(cherry picked from commit 5f22cc0b13)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:51:41 +01:00
..
display drm/i915/display/dp: Compute the correct slice count for VDSC on DP 2020-12-16 10:56:58 +01:00
gem drm/i915: Fix mismatch between misplaced vma check and vma insert 2020-12-30 11:51:41 +01:00
gt drm/i915/gt: Program mocs:63 for cache eviction on gen9 2020-12-11 13:23:29 +01:00
gvt drm/i915/gvt: do not check len & max_len for lri 2020-09-17 13:47:53 +02:00
oa drm/i915/perf: Refactor oa object to better manage resources 2019-08-07 20:34:39 +01:00
selftests drm/i915: Add missing include file <linux/math64.h> 2020-01-23 08:22:38 +01:00
Kconfig drm/i915: Update drm/i915 bug filing URL 2020-02-28 17:22:21 +01:00
Kconfig.debug kbuild: remove header compile test 2020-03-05 16:43:47 +01:00
Kconfig.profile drm/i915: Add a label for config DRM_I915_SPIN_REQUEST 2019-06-12 11:18:55 +01:00
Makefile Kbuild updates for v5.4 2019-09-20 08:36:47 -07:00
i915_active.c drm/i915: Fix ref->mutex deadlock in i915_active_wait() 2020-04-13 10:48:15 +02:00
i915_active.h drm/i915: Fix ref->mutex deadlock in i915_active_wait() 2020-04-13 10:48:15 +02:00
i915_active_types.h drm/i915: Markup expected timeline locks for i915_active 2019-08-16 18:02:07 +01:00
i915_buddy.c drm/i915/buddy: use kmemleak_update_trace 2019-08-16 16:28:41 +01:00
i915_buddy.h drm/i915: buddy allocator 2019-08-10 19:47:40 +01:00
i915_cmd_parser.c drm/i915: Fix cmd parser desc matching with masks 2020-09-03 11:27:09 +02:00
i915_debugfs.c drm/i915: Pull obj->userfault tracking under the ggtt->mutex 2019-08-22 08:53:41 +01:00
i915_debugfs.h drm/i915: extract i915_debugfs.h from i915_drv.h 2019-05-03 10:06:40 +03:00
i915_drv.c drm fixes for 5.4-rc8 2019-11-15 08:47:34 -08:00
i915_drv.h drm/i915: Force VT'd workarounds when running as a guest OS 2020-11-05 11:43:29 +01:00
i915_fixed.h drm/i915: make i915_fixed.h self-contained 2019-06-27 10:50:24 +03:00
i915_gem.c drm/i915: Wean off drm_pci_alloc/drm_pci_free 2020-02-28 17:22:21 +01:00
i915_gem.h drm/i915/gt: execlists->active is serialised by the tasklet 2019-10-09 14:39:31 -07:00
i915_gem_evict.c drm/i915: Replace PIN_NONFAULT with calls to PIN_NOEVICT 2019-08-21 14:07:54 +01:00
i915_gem_fence_reg.c drm/i915: Replace i915_vma_put_fence() 2019-08-22 08:53:42 +01:00
i915_gem_fence_reg.h drm/i915: Track ggtt fence reservations under its own mutex 2019-08-22 08:53:40 +01:00
i915_gem_gtt.c drm/i915/userptr: fix size calculation 2020-01-29 16:45:31 +01:00
i915_gem_gtt.h drm/i915: Replace PIN_NONFAULT with calls to PIN_NOEVICT 2019-08-21 14:07:54 +01:00
i915_getparam.c drm/i915: Disable Secure Batches for gen6+ 2019-11-05 11:34:08 -08:00
i915_globals.c drm/i915: buddy allocator 2019-08-10 19:47:40 +01:00
i915_globals.h drm/i915: buddy allocator 2019-08-10 19:47:40 +01:00
i915_gpu_error.c drm/i915: Break up error capture compression loops with cond_resched() 2020-11-10 12:37:23 +01:00
i915_gpu_error.h drm/i915: Only include active engines in the capture state 2019-08-08 21:54:08 +01:00
i915_ioc32.c
i915_irq.c drm/i915/icl+: Fix hotplug interrupt disabling after storm detection 2020-06-24 17:50:51 +02:00
i915_irq.h drm/i915: Extract general GT interrupt handlers 2019-08-12 15:36:13 +01:00
i915_memcpy.c drm/i915: extract i915_memcpy.h from i915_drv.h 2019-08-09 12:03:25 +03:00
i915_memcpy.h drm/i915: extract i915_memcpy.h from i915_drv.h 2019-08-09 12:03:25 +03:00
i915_mm.c drm/i915: Drop expectations of VM_IO from our GGTT mmappings 2019-08-07 12:06:07 +01:00
i915_params.c Revert "drm/i915: Update description of i915.enable_guc modparam" 2019-07-19 15:36:21 +01:00
i915_params.h Revert "drm/i915/guc: Turn on GuC/HuC auto mode" 2019-07-19 15:35:58 +01:00
i915_pci.c drm/i915/gtt: disable 2M pages for pre-gen11 2019-08-10 13:19:00 +01:00
i915_perf.c drm/i915: extract i915_perf.h from i915_drv.h 2019-08-09 11:52:04 +03:00
i915_perf.h drm/i915: extract i915_perf.h from i915_drv.h 2019-08-09 11:52:04 +03:00
i915_pmu.c drm/i915/pmu: "Frequency" is reported as accumulated cycles 2019-11-18 09:20:38 -08:00
i915_pmu.h
i915_priolist_types.h drm/i915: Push the wakeref->count deferral to the backend 2019-08-13 21:09:49 +01:00
i915_pvinfo.h drm/i915: make i915_pvinfo.h self-contained 2019-06-27 10:50:35 +03:00
i915_query.c drm/i915/gt: Move the [class][inst] lookup for engines onto the GT 2019-08-06 15:00:43 +01:00
i915_query.h
i915_reg.h drm/i915: Add Wa_1407352427:icl,ehl 2020-01-14 20:08:26 +01:00
i915_request.c drm/i915: Propagate error from completed fences 2020-05-27 17:46:43 +02:00
i915_request.h drm/i915: Defer semaphore priority bumping to a workqueue 2020-03-18 07:17:50 +01:00
i915_scatterlist.c drm/i915: Pull scatterlist utils out of i915_gem.h 2019-05-28 12:45:29 +01:00
i915_scatterlist.h drm/i915: Pull scatterlist utils out of i915_gem.h 2019-05-28 12:45:29 +01:00
i915_scheduler.c drm/i915/gt: Protect defer_request() from new waiters 2020-02-28 17:22:25 +01:00
i915_scheduler.h drm/i915: Only reschedule the submission tasklet if preemption is possible 2019-05-07 17:40:20 +01:00
i915_scheduler_types.h drm/i915/execlists: Minimalistic timeslicing 2019-06-20 16:52:36 +01:00
i915_selftest.h drm/i915: make i915_selftest.h self-contained 2019-07-30 13:41:35 -07:00
i915_suspend.c drm/i915: extract i915_suspend.h from i915_drv.h 2019-08-09 12:03:05 +03:00
i915_suspend.h drm/i915: extract i915_suspend.h from i915_drv.h 2019-08-09 12:03:05 +03:00
i915_sw_fence.c drm/i915: Filter wake_flags passed to default_wake_function 2020-09-23 12:40:43 +02:00
i915_sw_fence.h Merge drm/drm-next into drm-intel-next-queued 2019-08-22 00:10:36 -07:00
i915_sw_fence_work.c drm/i915: Generalise the clflush dma-worker 2019-08-22 08:27:44 +01:00
i915_sw_fence_work.h drm/i915: Generalise the clflush dma-worker 2019-08-22 08:27:44 +01:00
i915_syncmap.c
i915_syncmap.h
i915_sysfs.c drm/i915: extract i915_sysfs.h from i915_drv.h 2019-08-09 11:52:09 +03:00
i915_sysfs.h drm/i915: extract i915_sysfs.h from i915_drv.h 2019-08-09 11:52:09 +03:00
i915_trace.h drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
i915_trace_points.c
i915_user_extensions.c
i915_user_extensions.h
i915_utils.c drm/i915: Update drm/i915 bug filing URL 2020-02-28 17:22:21 +01:00
i915_utils.h drm/i915: be more solid in checking the alignment 2020-03-18 07:17:50 +01:00
i915_vgpu.c drm/i915: to make vgpu ppgtt notificaiton as atomic operation 2019-09-06 09:53:12 -07:00
i915_vgpu.h drm/i915: make i915_vgpu.h self-contained 2019-06-27 10:50:38 +03:00
i915_vma.c drm/i915: Replace i915_vma_put_fence() 2019-08-22 08:53:42 +01:00
i915_vma.h drm/i915: Replace i915_vma_put_fence() 2019-08-22 08:53:42 +01:00
intel_csr.c drm/i915/tgl: update DMC firmware to 2.04 2019-08-20 12:49:29 -07:00
intel_csr.h drm/i915/csr: move CSR version macros to intel_csr.h 2019-05-03 10:06:25 +03:00
intel_device_info.c drm/i915/tgl: add support for reading the timestamp frequency 2019-08-20 12:48:57 -07:00
intel_device_info.h drm/i915/tgl: Tigerlake only has global MOCS registers 2019-07-31 07:40:32 -07:00
intel_gvt.c drm/i915: Add i915 to i915_inject_probe_failure 2019-08-02 21:14:29 +01:00
intel_gvt.h drm/i915: Propagate "_remove" function name suffix down 2019-07-12 13:05:08 +01:00
intel_pch.c drm/i915/cml: Add second PCH ID for CMP 2019-10-09 13:00:56 -07:00
intel_pch.h drm/i915/cml: Add second PCH ID for CMP 2019-10-09 13:00:56 -07:00
intel_pm.c drm/i915: Don't enable WaIncreaseLatencyIPCEnabled when IPC is disabled 2020-05-20 08:20:20 +02:00
intel_pm.h drm/i915/gen8+: Add RC6 CTX corruption WA 2019-11-05 11:43:07 -08:00
intel_runtime_pm.c drm/i915: avoid including intel_drv.h via i915_drv.h->i915_trace.h 2019-08-07 12:43:14 +03:00
intel_runtime_pm.h Merge drm/drm-next into drm-intel-next-queued 2019-07-29 08:51:48 -07:00
intel_sideband.c drm/i915: remove unnecessary includes of intel_display_types.h header 2019-08-07 12:43:55 +03:00
intel_sideband.h drm/i915: Make sandybridge_pcode_read() deal with the second data register 2019-05-27 20:51:48 +03:00
intel_uncore.c drm/i915: Drop runtime-pm assert from vgpu io accessors 2020-11-10 12:37:23 +01:00
intel_uncore.h drm/i915: split out uncore_mmio_debug 2019-08-09 20:25:24 +01:00
intel_wakeref.c drm/i915: Push the wakeref->count deferral to the backend 2019-08-13 21:09:49 +01:00
intel_wakeref.h drm/i915: Push the wakeref->count deferral to the backend 2019-08-13 21:09:49 +01:00
intel_wopcm.c drm/i915/wopcm: Fix SPDX tag location 2019-08-16 16:50:03 +01:00
intel_wopcm.h drm/i915/wopcm: Don't fail on WOPCM partitioning failure 2019-08-02 21:14:32 +01:00