• Dave Gordon's avatar
    drm/i915/guc: disable GuC submission earlier during GuC (re)load · 29fb72c7
    Dave Gordon authored
    When resetting and reloading the GuC, the GuC submission management code
    also needs to destroy and recreate the GuC client(s). Currently this is
    done by a separate call from the GuC loader, but really, it's just an
    internal detail of the submission code. So here we remove the call from
    the loader (which is too late, really, because the GuC has already been
    reloaded at this point) and put it into guc_submission_init() instead.
    This means that any preexisting client is destroyed *before* the GuC
    (re)load and then recreated after, iff the firmware was successfully
    loaded. If the GuC reload fails, we don't recreate the client, so
    fallback to execlists mode (if active) won't leak the client object
    (previously, the now-unusable client would have been left allocated,
    and leaked if the driver were unloaded).
    Signed-off-by: default avatarDave Gordon <david.s.gordon@intel.com>
    Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
    Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
    29fb72c7
intel_guc_loader.c 22.1 KB