[PATCH v3 07/11] drm/xe/xe2hpg: Remove extra allocation of CCS pages for dgfx

Thomas Hellström thomas.hellstrom at linux.intel.com
Mon Apr 22 10:15:24 UTC 2024


Hi!

On Mon, 2024-04-08 at 22:35 +0530, Balasubramani Vivekanandan wrote:
> From: Akshata Jahagirdar <akshata.jahagirdar at intel.com>
> 
> On Xe2 dGPU, compression is only supported with VRAM. When copying
> from
> VRAM -> system memory the KMD uses mapping with uncompressed PAT
> so the copy in system memory is guaranteed to be uncompressed.
> When restoring such buffers from system memory -> VRAM the KMD can't
> easily know which pages were originally compressed, so we always use
> uncompressed -> uncompressed here.
> so this means that there's no need for extra CCS storage on such
> platforms.
> 
> v2: More description added to commit message

Let's say we have a VRAM bo with compressed content. Then it is evicted
to system. And then it is restored back to VRAM, (and I'd presume the
vma PTEs are still indicating compressed access).

But it sounds like from the commit message, after eviction +
restoration, the content will be uncompressed. Could you explain how
this is handled? What will happen on the next gpu access with
compressed vma PTEs?

Thanks,
Thomas


> 
> Signed-off-by: Akshata Jahagirdar <akshata.jahagirdar at intel.com>
> Signed-off-by: Balasubramani Vivekanandan
> <balasubramani.vivekanandan at intel.com>
> ---
>  drivers/gpu/drm/xe/xe_bo.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
> index 6166bc715656..fdeb3691d3f6 100644
> --- a/drivers/gpu/drm/xe/xe_bo.c
> +++ b/drivers/gpu/drm/xe/xe_bo.c
> @@ -2201,6 +2201,9 @@ bool xe_bo_needs_ccs_pages(struct xe_bo *bo)
>  {
>  	struct xe_device *xe = xe_bo_device(bo);
>  
> +	if (GRAPHICS_VER(xe) >= 20 && IS_DGFX(xe))
> +		return false;
> +
>  	if (!xe_device_has_flat_ccs(xe) || bo->ttm.type !=
> ttm_bo_type_device)
>  		return false;
>  



More information about the Intel-xe mailing list