Unverified Commit 91106757 authored by Tvrtko Ursulin's avatar Tvrtko Ursulin Committed by Rodrigo Vivi
Browse files

drm/xe/display: Add support for AuxCCS



Add support for mapping the auxiliary CCS buffer into the DPT page tables.

This will allow for better power efficiency by enabling the render
compression frame buffer modifiers such as
I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS in a following patch.

Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: Michael J. Ruhl <michael.j.ruhl@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: default avatarUma Shankar <uma.shankar@intel.com>
Link: https://patch.msgid.link/20260324084018.20353-12-tvrtko.ursulin@igalia.com


Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent cce1c477
Loading
Loading
Loading
Loading
+27 −1
Original line number Diff line number Diff line
@@ -56,6 +56,29 @@ write_dpt_padding(struct iosys_map *map, unsigned int dest, unsigned int pad)
	return dest + pad * sizeof(u64);
}

static unsigned int
write_dpt_remapped_linear(struct xe_bo *bo, struct iosys_map *map,
			  unsigned int dest,
			  const struct intel_remapped_plane_info *plane)
{
	struct xe_device *xe = xe_bo_device(bo);
	struct xe_ggtt *ggtt = xe_device_get_root_tile(xe)->mem.ggtt;
	const u64 pte = xe_ggtt_encode_pte_flags(ggtt, bo,
						 xe->pat.idx[XE_CACHE_NONE]);
	unsigned int offset = plane->offset * XE_PAGE_SIZE;
	unsigned int size = plane->size;

	while (size--) {
		u64 addr = xe_bo_addr(bo, offset, XE_PAGE_SIZE);

		iosys_map_wr(map, dest, u64, addr | pte);
		dest += sizeof(u64);
		offset += XE_PAGE_SIZE;
	}

	return dest;
}

static unsigned int
write_dpt_remapped_tiled(struct xe_bo *bo, struct iosys_map *map,
			 unsigned int dest,
@@ -109,6 +132,9 @@ write_dpt_remapped(struct xe_bo *bo,
			dest = write_dpt_padding(map, dest, pad);
		}

		if (plane->linear)
			dest = write_dpt_remapped_linear(bo, map, dest, plane);
		else
			dest = write_dpt_remapped_tiled(bo, map, dest, plane);
	}
}