mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-13 21:50:31 +01:00
anv: Add support to DRM_XE_GEM_CREATE_FLAG_NO_COMPRESSION
When this flag is set, it gives a hint to KMD to skip some operations around compressed buffers, like copying the auxiliary buffer to smem during eviction. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38425>
This commit is contained in:
parent
6df105d3ff
commit
f91de58818
3 changed files with 7 additions and 0 deletions
|
|
@ -310,6 +310,7 @@ Struct("intel_device_info",
|
|||
Member("bool", "has_set_pat_uapi"),
|
||||
Member("bool", "has_indirect_unroll"),
|
||||
Member("bool", "supports_low_latency_hint"),
|
||||
Member("bool", "xe2_has_no_compression_hint"),
|
||||
|
||||
Member("bool", "has_coarse_pixel_primitive_and_cb", compiler_field=True,
|
||||
comment=dedent("""\
|
||||
|
|
|
|||
|
|
@ -75,6 +75,8 @@ xe_query_config(int fd, struct intel_device_info *devinfo)
|
|||
devinfo->has_local_mem = true;
|
||||
if (config->info[DRM_XE_QUERY_CONFIG_FLAGS] & DRM_XE_QUERY_CONFIG_FLAG_HAS_LOW_LATENCY)
|
||||
devinfo->supports_low_latency_hint = true;
|
||||
if (config->info[DRM_XE_QUERY_CONFIG_FLAGS] & DRM_XE_QUERY_CONFIG_FLAG_HAS_NO_COMPRESSION_HINT)
|
||||
devinfo->xe2_has_no_compression_hint = true;
|
||||
|
||||
if (!has_gmd_ip_version(devinfo))
|
||||
devinfo->revision = (config->info[DRM_XE_QUERY_CONFIG_REV_AND_DEVICE_ID] >> 16) & 0xFFFF;
|
||||
|
|
|
|||
|
|
@ -66,6 +66,10 @@ xe_gem_create(struct anv_device *device,
|
|||
device->physical->vram_non_mappable.size > 0)
|
||||
flags |= DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM;
|
||||
|
||||
if ((alloc_flags & ANV_BO_ALLOC_COMPRESSED) == 0 &&
|
||||
device->info->xe2_has_no_compression_hint)
|
||||
flags |= DRM_XE_GEM_CREATE_FLAG_NO_COMPRESSION;
|
||||
|
||||
struct drm_xe_gem_create gem_create = {
|
||||
/* From xe_drm.h: If a VM is specified, this BO must:
|
||||
* 1. Only ever be bound to that VM.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue