[Intel-gfx] [PATCH v4 01/61] drm/i915: Move cmd parser pinning to execbuffer

Thomas Hellström thomas.hellstrom at linux.intel.com
Tue Nov 3 13:49:46 UTC 2020


On 10/16/20 12:43 PM, Maarten Lankhorst wrote:
> 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 at linux.intel.com>

Acked-by: Thomas Hellström <thomas.hellstrom at linux.intel.com>




More information about the Intel-gfx mailing list