mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 02:20:11 +01:00
anv: Return scanout PAT entry for scanout and external buffers in discrete GPUs
Without this scanout and external buffers will be allocated as WB what will fail allocation if DRM_XE_GEM_CREATE_FLAG_SCANOUT is set or it will use WC but it will not be the special PAT entry for scanout. Cc: mesa-stable Reviewed-by: Nanley Chery <nanley.g.chery@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33044>
This commit is contained in:
parent
41ae187003
commit
5a37467cfd
1 changed files with 3 additions and 2 deletions
|
|
@ -2134,6 +2134,9 @@ anv_device_get_pat_entry(struct anv_device *device,
|
|||
if (alloc_flags & ANV_BO_ALLOC_COMPRESSED)
|
||||
return &device->info->pat.compressed;
|
||||
|
||||
if (alloc_flags & (ANV_BO_ALLOC_EXTERNAL | ANV_BO_ALLOC_SCANOUT))
|
||||
return &device->info->pat.scanout;
|
||||
|
||||
/* PAT indexes has no actual effect in DG2 and DG1, smem caches will always
|
||||
* be snopped by GPU and lmem will always be WC.
|
||||
* This might change in future discrete platforms.
|
||||
|
|
@ -2147,8 +2150,6 @@ anv_device_get_pat_entry(struct anv_device *device,
|
|||
/* Integrated platforms handling only */
|
||||
if ((alloc_flags & (ANV_BO_ALLOC_HOST_CACHED_COHERENT)) == ANV_BO_ALLOC_HOST_CACHED_COHERENT)
|
||||
return &device->info->pat.cached_coherent;
|
||||
else if (alloc_flags & (ANV_BO_ALLOC_EXTERNAL | ANV_BO_ALLOC_SCANOUT))
|
||||
return &device->info->pat.scanout;
|
||||
else if (alloc_flags & ANV_BO_ALLOC_HOST_CACHED)
|
||||
return &device->info->pat.writeback_incoherent;
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue