• Alan Previn's avatar
    drm/i915/pxp: Add ARB session creation and cleanup · 99afb7cc
    Alan Previn authored
    Add MTL's function for ARB session creation using PXP firmware
    version 4.3 ABI structure format.
    
    While relooking at the ARB session creation flow in intel_pxp_start,
    let's address missing UAPI documentation. Without actually changing
    backward compatible behavior, update i915's drm-uapi comments
    that describe the possible error values when creating a context
    with I915_CONTEXT_PARAM_PROTECTED_CONTENT:
       Since the first merge of PXP support on ADL, i915 returns -ENXIO
       if a dependency such as firmware or component driver was yet to
       be loaded or returns -EIO if the creation attempt failed when
       requested by the PXP firmware (specific firmware error responses
       are reported in dmesg).
    
    Add MTL's function for ARB session invalidation but this
    reuses PXP firmware version 4.2 ABI structure format.
    
    For both cases, in the back-end gsccs functions for sending messages
    to the firmware inspect the GSC-CS-Mem-Header's pending-bit which
    means the GSC firmware is busy and we should retry.
    
    Given the last hw requirement, lets also update functions in
    front-end layer that wait for session creation or teardown
    completion to use new worst case timeout periods.
    Signed-off-by: default avatarAlan Previn <alan.previn.teres.alexis@intel.com>
    Reviewed-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
    Signed-off-by: default avatarRadhakrishna Sripada <radhakrishna.sripada@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20230511231738.1077674-6-alan.previn.teres.alexis@intel.com
    99afb7cc
intel_pxp.c 12.5 KB