mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 22:30:11 +01:00
iris: Change default PAT entry to WC
Iris doesn't make any call to intel_flush_range*() functions so all BOs
created without BO_ALLOC_COHERENT are not coherent between CPU writes
and GPU reads.
A lot of places don't set BO_ALLOC_COHERENT not even command buffers
have it.
And this incoherency is causing most of tests to fail after
the patch that extracted("iris: Calculate iris_mmap_mode using
intel_device_info_pat_entry when possible") the mmap mode from the PAT
entry.
Before that patch MTL was creating BO with a WB PAT index but then
mmaping as WC.
So to fix this for now making the default PAT entry for Iris a WC one.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25447>
This commit is contained in:
parent
f1c9e90146
commit
76aad457a1
1 changed files with 4 additions and 2 deletions
|
|
@ -320,7 +320,8 @@ bucket_for_size(struct iris_bufmgr *bufmgr, uint64_t size,
|
|||
|
||||
const struct intel_device_info *devinfo = &bufmgr->devinfo;
|
||||
if (devinfo->has_set_pat_uapi &&
|
||||
iris_bufmgr_get_pat_entry_for_bo_flags(bufmgr, flags) != &devinfo->pat.writeback)
|
||||
iris_bufmgr_get_pat_entry_for_bo_flags(bufmgr, flags) !=
|
||||
iris_bufmgr_get_pat_entry_for_bo_flags(bufmgr, 0 /* alloc_flags */))
|
||||
return NULL;
|
||||
|
||||
if (devinfo->kmd_type == INTEL_KMD_TYPE_XE &&
|
||||
|
|
@ -2632,5 +2633,6 @@ iris_bufmgr_get_pat_entry_for_bo_flags(const struct iris_bufmgr *bufmgr,
|
|||
if (alloc_flags & (BO_ALLOC_SHARED | BO_ALLOC_SCANOUT))
|
||||
return &devinfo->pat.scanout;
|
||||
|
||||
return &devinfo->pat.writeback;
|
||||
/* Iris don't have any clflush() calls so it can't use incoherent WB */
|
||||
return &devinfo->pat.writecombining;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue