• Jason Ekstrand's avatar
    drm/i915/gem: Use the proto-context to handle create parameters (v5) · d4433c76
    Jason Ekstrand authored
    
    
    This means that the proto-context needs to grow support for engine
    configuration information as well as setparam logic.  Fortunately, we'll
    be deleting a lot of setparam logic on the primary context shortly so it
    will hopefully balance out.
    
    There's an extra bit of fun here when it comes to setting SSEU and the
    way it interacts with PARAM_ENGINES.  Unfortunately, thanks to
    SET_CONTEXT_PARAM and not being allowed to pick the order in which we
    handle certain parameters, we have think about those interactions.
    
    v2 (Daniel Vetter):
     - Add a proto_context_free_user_engines helper
     - Comment on SSEU in the commit message
     - Use proto_context_set_persistence in set_proto_ctx_param
    
    v3 (Daniel Vetter):
     - Fix a doc comment
     - Do an explicit HAS_FULL_PPGTT check in set_proto_ctx_vm instead of
       relying on pc->vm != NULL.
     - Handle errors for CONTEXT_PARAM_PERSISTENCE
     - Don't allow more resetting user engines
     - Rework initialization of UCONTEXT_PERSISTENCE
    
    v4 (Jason Ekstrand):
     - Move hand-rolled initialization of UCONTEXT_PERSISTENCE to an
       earlier patch
    
    v5 (Jason Ekstrand):
     - Move proto_context_set_persistence to this patch
    Signed-off-by: default avatarJason Ekstrand <jason@jlekstrand.net>
    Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210708154835.528166-22-jason@jlekstrand.net
    d4433c76
i915_gem_context.c 67 KB