• Chris Wilson's avatar
    drm/i915/gem: Extract transient execbuf flags from i915_vma · 7d6236bb
    Chris Wilson authored
    For our convenience, and to avoid frequent allocations, we placed some
    lists we use for execbuf inside the common i915_vma struct. As we look
    to parallelise execbuf, such fields guarded by the struct_mutex BKL must
    be pulled under local control. Instead of using the i915_vma as our
    primary means of tracking the user's list of objects and their virtual
    mappings, we use a local eb_vma with the same lists as before (just now
    local not global).
    
    This should allow us to only perform the lookup of vma used for
    execution once during the execbuf ioctl, as currently we need to remove
    our secrets from inside i915_vma everytime we drop the struct_mutex as
    another execbuf may use the shared locations.
    
    Once potential user visible consequence is that we can remove the
    requirement that the execobj[] be unique, and only require that they do
    not conflict (i.e. you cannot softpin the same object into two locations.
    Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20200303204345.1859734-2-chris@chris-wilson.co.uk
    7d6236bb
i915_gem_execbuffer.c 79.8 KB