mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 01:32:21 +02:00
drm/xe/pat: Default XE_CACHE_NONE_COMPRESSION to invalid
Initialize XE_CACHE_NONE_COMPRESSION PAT index to XE_PAT_INVALID_IDX by default, same as XE_CACHE_WB_COMPRESSION. Platforms that support this cache mode will override it in xe_pat_init_early(). This ensures that accidental use on unsupported platforms can be detected. A subsequent patch introduces a helper to assert on invalid PAT index access at all call sites. Suggested-by: Matthew Auld <matthew.auld@intel.com> Cc: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Signed-off-by: Xin Wang <x.wang@intel.com> Link: https://patch.msgid.link/20260416045526.536497-3-x.wang@intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
This commit is contained in:
parent
5f01da0687
commit
369738a43a
|
|
@ -559,6 +559,7 @@ static const struct xe_pat_ops xe3p_xpc_pat_ops = {
|
|||
void xe_pat_init_early(struct xe_device *xe)
|
||||
{
|
||||
xe->pat.idx[XE_CACHE_WB_COMPRESSION] = XE_PAT_INVALID_IDX;
|
||||
xe->pat.idx[XE_CACHE_NONE_COMPRESSION] = XE_PAT_INVALID_IDX;
|
||||
if (GRAPHICS_VERx100(xe) == 3511) {
|
||||
xe->pat.ops = &xe3p_xpc_pat_ops;
|
||||
xe->pat.table = xe3p_xpc_pat_table;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user