• John Harrison's avatar
    drm/i915: Set context in request from creation even in legacy mode · 40e895ce
    John Harrison authored
    In execlist mode, the context object pointer is written in to the request
    structure (and reference counted) at the point of request creation. In legacy
    mode, this only happens inside i915_add_request().
    
    This patch updates the legacy code path to match the execlist version. This
    allows all the intermediate code between request creation and request submission
    to get at the context object given only a request structure. Thus negating the
    need to pass context pointers here, there and everywhere.
    
    v2: Moved the context reference so it does not need to be undone if the
    get_seqno() fails.
    
    v3: Fixed execlist mode always hitting a warning about invalid last_contexts
    (which don't exist in execlist mode).
    
    v4: Updated for new i915_gem_request_alloc() scheme.
    
    For: VIZ-5115
    Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
    Reviewed-by: default avatarTomas Elf <tomas.elf@intel.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    40e895ce
i915_gem.c 137 KB