• Matt Roper's avatar
    drm/xe/mocs: LNCF MOCS settings only need to be restored on pre-Xe_HP · f659ac15
    Matt Roper authored
    Reprogramming the LNCF MOCS registers on render domain reset is not
    intended to be regular driver programming, but rather the implementation
    of a specific workaround (Wa_1607983814).  This workaround no longer
    applies on Xe_HP any beyond, so we can expect that these registers, like
    the rest of the LNCF/LBCF registers, will maintain their values through
    all engine resets.  We should only add these registers to the GuC's
    save/restore list on platforms that need the workaround.
    
    Furthermore, xe_mocs_init_engine() appears to be another attempt to
    satisfy this same workaround.  This is unnecessary on the Xe driver
    since even on platforms where the workaround is necessary, all
    single-engine resets are initiated by the GuC and thus the GuC will take
    care of saving/restoring these registers.  The only host-initiated
    resets we have in Xe are full GT resets which will already
    (re)initialize these registers as part of the regular xe_mocs_init()
    flow.
    
    v2:
     - Add needs_wa_1607983814() so that calculate_regset_size() doesn't
       overallocate regset space when the workaround isn't needed.  (Lucas)
     - On platforms affected by Wa_1607983814, only add the LNCF MOCS
       registers to the render engine's GuC save/restore list; resets of
       other engines don't need to save/restore these.
    
    Cc: Lucas De Marchi <lucas.demarchi@intel.com>
    Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
    Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
    Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
    f659ac15
xe_mocs.h 530 Bytes