linux-stable/drivers/gpu/drm/i915/gem
Maarten Lankhorst 0edbb9ba1b drm/i915: Move cmd parser pinning to execbuffer
We need to get rid of allocations in the cmd parser, because it needs
to be called from a signaling context, first move all pinning to
execbuf, where we already hold all locks.

Allocate jump_whitelist in the execbuffer, and add annotations around
intel_engine_cmd_parser(), to ensure we only call the command parser
without allocating any memory, or taking any locks we're not supposed to.

Because i915_gem_object_get_page() may also allocate memory, add a
path to i915_gem_object_get_sg() that prevents memory allocations,
and walk the sg list manually. It should be similarly fast.

This has the added benefit of being able to catch all memory allocation
errors before the point of no return, and return -ENOMEM safely to the
execbuf submitter.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-4-maarten.lankhorst@linux.intel.com
2021-03-24 11:39:59 +01:00
..
selftests drm/i915/selftests: Allow huge_gem_object to kick the shrinker 2021-01-12 09:47:24 +00:00
i915_gem_busy.c
i915_gem_clflush.c drm/i915: Replace the hardcoded I915_FENCE_TIMEOUT 2020-05-09 12:57:57 +01:00
i915_gem_clflush.h
i915_gem_client_blt.c drm/i915/gem: Perform all asynchronous waits prior to marking payload start 2020-11-03 15:00:06 +00:00
i915_gem_client_blt.h
i915_gem_context.c drm/i915/gem: Reduce ctx->engines_mutex for get_engines() 2021-01-15 08:00:03 +00:00
i915_gem_context.h drm/i915/gem: Drop free_work for GEM contexts 2020-12-16 15:14:09 +00:00
i915_gem_context_types.h drm/i915/gem: Drop free_work for GEM contexts 2020-12-16 15:14:09 +00:00
i915_gem_create.c drm/i915/gem: sanity check object size in gem_create 2021-01-15 08:00:03 +00:00
i915_gem_dmabuf.c mm: introduce vma_set_file function v5 2020-11-19 10:36:36 +01:00
i915_gem_domain.c drm/i915/gem: Drop lru bumping on display unpinning 2021-01-20 21:05:12 +00:00
i915_gem_execbuffer.c drm/i915: Move cmd parser pinning to execbuffer 2021-03-24 11:39:59 +01:00
i915_gem_fence.c drm/i915: Replace the hardcoded I915_FENCE_TIMEOUT 2020-05-09 12:57:57 +01:00
i915_gem_internal.c drm/i915/gem: Give each object class a friendly name 2020-05-29 23:38:29 +01:00
i915_gem_ioctls.h drm/i915/gem: Drop legacy execbuffer support (v2) 2021-03-18 14:25:42 +01:00
i915_gem_lmem.c drm/i915/region: convert object_create into object_init 2021-01-15 08:00:03 +00:00
i915_gem_lmem.h drm/i915/region: convert object_create into object_init 2021-01-15 08:00:03 +00:00
i915_gem_mman.c mm: introduce vma_set_file function v5 2020-11-19 10:36:36 +01:00
i915_gem_mman.h drm/i915/gem: Only revoke mmap handlers if active 2020-07-02 20:46:08 +01:00
i915_gem_object.c - HDCP 2.2 and HDCP 1.4 Gen12 DP MST support (Anshuman) 2021-01-29 17:05:15 +10:00
i915_gem_object.h drm/i915: Move cmd parser pinning to execbuffer 2021-03-24 11:39:59 +01:00
i915_gem_object_blt.c drm/i915/pool: constrain pool objects by mapping type 2021-01-19 20:36:28 +00:00
i915_gem_object_blt.h drm/i915: Convert i915_gem_object/client_blt.c to use ww locking as well, v2. 2020-09-07 14:31:22 +03:00
i915_gem_object_types.h drm/i915/gem: Use shrinkable status for unknown swizzle quirks 2021-01-20 21:01:33 +00:00
i915_gem_pages.c drm/i915: Move cmd parser pinning to execbuffer 2021-03-24 11:39:59 +01:00
i915_gem_phys.c Merge drm/drm-next into drm-intel-next 2021-03-11 08:52:53 +02:00
i915_gem_pm.c drm/i915/gem: Move freeze/freeze_late next to suspend/suspend_late 2021-02-08 16:56:49 -05:00
i915_gem_pm.h drm/i915/gem: Move freeze/freeze_late next to suspend/suspend_late 2021-02-08 16:56:49 -05:00
i915_gem_region.c drm/i915/region: don't leak the object on error 2021-01-20 11:11:24 +00:00
i915_gem_region.h
i915_gem_shmem.c Merge drm/drm-next into drm-intel-next 2021-03-11 08:52:53 +02:00
i915_gem_shrinker.c drm/i915/gem: Optimistically prune dma-resv from the shrinker. 2020-12-23 21:58:00 +00:00
i915_gem_shrinker.h
i915_gem_stolen.c drm/i915/gem: Fix oops in error handling code 2021-02-08 16:56:45 -05:00
i915_gem_stolen.h drm/i915/gem: Move stolen node into GEM object union 2021-01-20 20:46:36 +00:00
i915_gem_throttle.c drm/i915/gem: Remove disordered per-file request list for throttling 2020-09-07 13:13:50 +03:00
i915_gem_tiling.c drm/i915/gem: Use shrinkable status for unknown swizzle quirks 2021-01-20 21:01:33 +00:00
i915_gem_userptr.c lib/scatterlist: Add support in dynamic allocation of SG table from pages 2020-10-05 20:45:45 -03:00
i915_gem_wait.c drm/i915/display: Apply interactive priority to explicit flip fences 2021-01-19 23:22:33 +00:00
i915_gemfs.c
i915_gemfs.h