• John Harrison's avatar
    drm/i915/guc: Fix missing return code checks in submission init · cd414f4f
    John Harrison authored
    The CI results for the 'fast request' patch set (enables error return
    codes for fire-and-forget H2G messages) hit an issue with the KMD
    sending context submission requests on an invalid context. That was
    caused by a fault injection probe failing the context creation of a
    kernel context. However, there was no return code checking on any of
    the kernel context registration paths. So the driver kept going and
    tried to use the kernel context for the record defaults process.
    
    This would not cause any actual problems. The invalid requests would
    be rejected by GuC and ultimately the start up sequence would
    correctly wedge due to the context creation failure. But fixing the
    issue correctly rather ignoring it means we won't get CI complaining
    when the fast request patch lands and enables the extra error checking.
    
    So fix it by checking for errors and aborting as appropriate when
    creating kernel contexts. While at it, clean up some other submission
    init related failure cleanup paths. Also, rename guc_init_lrc_mapping
    to guc_init_submission as the former name hasn't been valid in a long
    time.
    
    v2: Add another wrapper to keep the flow balanced (Daniele)
    Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
    Reviewed-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20230217223308.3449737-3-John.C.Harrison@Intel.com
    cd414f4f
intel_uc.c 18.4 KB