• Daniele Ceraolo Spurio's avatar
    drm/i915/uc: Improve tracking of uC init status · bfe5a40a
    Daniele Ceraolo Spurio authored
    To be able to setup GuC submission functions during engine init we need
    to commit to using GuC as soon as possible.
    Currently, the only thing that can stop us from using the
    microcontrollers once we've fetched the blobs is a fundamental
    error (e.g. OOM); given that if we hit such an error we can't really
    fall-back to anything, we can "officialize" the FW fetching completion
    as the moment at which we're committing to using GuC.
    
    To better differentiate this case, the uses_guc check, which indicates
    that GuC is supported and was selected in modparam, is renamed to
    wants_guc and a new uses_guc is introduced to represent the case were
    we're committed to using the GuC. Note that uses_guc does still not imply
    that the blob is actually loaded on the HW (is_running is the check for
    that). Also, since we need to have attempted the fetch for the result
    of uses_guc to be meaningful, we need to make sure we've moved away
    from INTEL_UC_FIRMWARE_SELECTED.
    
    All the GuC changes have been mirrored on the HuC for coherency.
    
    v2: split fetch return changes and new macros to their own patches,
        support HuC only if GuC is wanted, improve "used" state
        description (Michal)
    
    v3: s/wants_huc/uses_huc in uc_init_wopcm
    Signed-off-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
    Cc: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
    Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
    Cc: John Harrison <John.C.Harrison@Intel.com>
    Cc: Matthew Brost <matthew.brost@intel.com>
    Reviewed-by: Fernando Pacheco <fernando.pacheco@intel.com> #v1
    Reviewed-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
    Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Link: https://patchwork.freedesktop.org/patch/msgid/20200218223327.11058-6-daniele.ceraolospurio@intel.com
    bfe5a40a
intel_guc.h 5.29 KB