• Daniele Ceraolo Spurio's avatar
    drm/i915/gsc: fixes and updates for GSC memory allocation · b267a670
    Daniele Ceraolo Spurio authored
    A few fixes/updates are required around the GSC memory allocation and it
    is easier to do them all at the same time. The changes are as follows:
    
    1 - Switch the memory allocation to stolen memory. We need to avoid
    accesses from GSC FW to normal memory after the suspend function has
    completed and to do so we can either switch to using stolen or make sure
    the GSC is gone to sleep before the end of the suspend function. Given
    that the GSC waits for a bit before going idle even if there are no
    pending operations, it is easier and quicker to just use stolen memory.
    
    2 - Reduce the GSC allocation size to 4MBs, which is the POR requirement.
    The 8MBs were needed only for early FW and I had misunderstood that as
    being the expected POR size when I sent the original patch.
    
    3 - Perma-map the GSC allocation. This isn't required immediately, but it
    will be needed later to be able to quickly extract the GSC logs, which are
    inside the allocation. Since the mapping code needs to be rewritten due to
    switching to stolen, it makes sense to do the switch immediately to avoid
    having to change it again later.
    
    Note that the explicit setting of CACHE_NONE for Wa_22016122933 has been
    dropped because that's the default setting for stolen memory on !LLC
    platforms.
    
    v2: only memset the memory we're not overwriting (Alan)
    Signed-off-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
    Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
    Cc: John Harrison <John.C.Harrison@Intel.com>
    Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
    Reviewed-by: default avatarAlan Previn <alan.previn.teres.alexis@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20230612181529.2222451-2-daniele.ceraolospurio@intel.com
    b267a670
intel_gsc_uc.c 7.9 KB