• M
    drm/i915/dg2: Maintain backward-compatible nested batch behavior · 9e9dfd08
    Matt Roper 提交于
    For tgl+, the per-context setting of MI_MODE[12] determines whether
    the bits of a nested MI_BATCH_BUFFER_START instruction should be
    interpreted in the traditional manner or whether they should
    instead use a new tgl+ meaning that breaks backward compatibility, but
    allows nesting into 3rd-level batchbuffers.  For previous platforms,
    the hardware default for this register bit is to maintain
    backward-compatible behavior unless a context intentionally opts into
    the new behavior; however Xe_HPG flips the hardware default behavior.
    
    From a SW perspective, we want to maintain the backward-compatible
    behavior for userspace, so we'll apply a fake workaround to set it back
    to the legacy behavior on platforms where the hardware default is to
    break compatibility.  At the moment there is no Linux userspace that
    utilizes third-level batchbuffers, so this will avoid userspace from
    needing to make any changes.  using the legacy meaning is the correct
    thing to do.  If/when we have userspace consumers that want to utilize
    third-level batch nesting, we can provide a context parameter to allow
    them to opt-in.
    
    Bspec: 45974, 45718
    Cc: John Harrison <John.C.Harrison@Intel.com>
    Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210805163647.801064-9-matthew.d.roper@intel.comReviewed-by: NAnusha Srivatsa <anusha.srivatsa@intel.com>
    9e9dfd08
i915_reg.h 508.3 KB