Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nirmoy Das <nirmoy.das@linux.intel.com>
To: Akshata Jahagirdar <akshata.jahagirdar@intel.com>,
	intel-xe@lists.freedesktop.org
Cc: akshatajahagirdar6@gmail.com,
	Matthew Auld <matthew.auld@intel.com>,
	Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Subject: Re: [PATCH 4/6] drm/xe/xe_migrate: Handle migration logic for xe2+ dgfx
Date: Fri, 12 Jul 2024 14:55:09 +0200	[thread overview]
Message-ID: <29306f83-6597-4627-a296-88e9f47edaeb@linux.intel.com> (raw)
In-Reply-To: <c852a9895c203552169a86bc2cdca909340961e0.1720766122.git.akshata.jahagirdar@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2874 bytes --]

Hi Akshata,

On 7/12/2024 8:39 AM, Akshata Jahagirdar wrote:
> From: "Jahagirdar, Akshata"<akshata.jahagirdar@intel.com>
>
> During eviction (vram->sysmem), we use the mapping from compressed -> uncompressed.
> During restore (sysmem->vram), we need the mapping from uncompressed -> uncompressed.
> Handle logic for selecting the compressed identity map for eviction,
> and selecting uncompressed map for restore operations.
>
> Signed-off-by: Akshata Jahagirdar<akshata.jahagirdar@intel.com>
> Reviewed-by: Matthew Auld<matthew.auld@intel.com>
> Reviewed-by: Himal Prasad Ghimiray<himal.prasad.ghimiray@intel.com>
> ---
>   drivers/gpu/drm/xe/xe_migrate.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
> index 3b8a334fe08f..1eee6be24423 100644
> --- a/drivers/gpu/drm/xe/xe_migrate.c
> +++ b/drivers/gpu/drm/xe/xe_migrate.c
> @@ -715,7 +715,7 @@ static u32 xe_migrate_ccs_copy(struct xe_migrate *m,
>   	struct xe_gt *gt = m->tile->primary_gt;
>   	u32 flush_flags = 0;
>   
> -	if (xe_device_has_flat_ccs(gt_to_xe(gt)) && !copy_ccs && dst_is_indirect) {
> +	if (xe_device_needs_ccs_emit(gt_to_xe(gt)) && !copy_ccs && dst_is_indirect) {


Do we need to call xe_migrate_ccs_copy() when xe_device_needs_ccs_emit() 
is true ? If not then move the check for xe_device_needs_ccs_emit() to 
xe_migrate_copy()

to ensure that xe_migrate_ccs_copy() is not even called on such platforms.

Regards,
Nirmoy

>   		/*
>   		 * If the src is already in vram, then it should already
>   		 * have been cleared by us, or has been populated by the
> @@ -791,6 +791,7 @@ struct dma_fence *xe_migrate_copy(struct xe_migrate *m,
>   	bool copy_ccs = xe_device_has_flat_ccs(xe) &&
>   		xe_bo_needs_ccs_pages(src_bo) && xe_bo_needs_ccs_pages(dst_bo);
>   	bool copy_system_ccs = copy_ccs && (!src_is_vram || !dst_is_vram);
> +	bool use_comp_pat = GRAPHICS_VER(xe) >= 20 && IS_DGFX(xe) && src_is_vram && !dst_is_vram;
>   
>   	/* Copying CCS between two different BOs is not supported yet. */
>   	if (XE_WARN_ON(copy_ccs && src_bo != dst_bo))
> @@ -833,7 +834,7 @@ struct dma_fence *xe_migrate_copy(struct xe_migrate *m,
>   
>   		src_L0 = min(src_L0, dst_L0);
>   
> -		batch_size += pte_update_size(m, src_is_vram, false, src, &src_it, &src_L0,
> +		batch_size += pte_update_size(m, src_is_vram, use_comp_pat, src, &src_it, &src_L0,
>   					      &src_L0_ofs, &src_L0_pt, 0, 0,
>   					      avail_pts);
>   
> @@ -852,7 +853,7 @@ struct dma_fence *xe_migrate_copy(struct xe_migrate *m,
>   
>   		/* Add copy commands size here */
>   		batch_size += ((copy_only_ccs) ? 0 : EMIT_COPY_DW) +
> -			((xe_device_has_flat_ccs(xe) ? EMIT_COPY_CCS_DW : 0));
> +			((xe_device_needs_ccs_emit(xe) ? EMIT_COPY_CCS_DW : 0));
>   
>   		bb = xe_bb_new(gt, batch_size, usm);
>   		if (IS_ERR(bb)) {

[-- Attachment #2: Type: text/html, Size: 3970 bytes --]

  reply	other threads:[~2024-07-12 12:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-12  6:39 [PATCH 0/6] Implement compression support on BMG Akshata Jahagirdar
2024-07-12  6:39 ` [PATCH 1/6] drm/xe/migrate: Handle clear ccs logic for xe2 dgfx Akshata Jahagirdar
2024-07-12  6:39 ` [PATCH 2/6] drm/xe/migrate: Add kunit to test clear functionality Akshata Jahagirdar
2024-07-12 12:56   ` Nirmoy Das
2024-07-12  6:39 ` [PATCH 3/6] drm/xe/xe2: Introduce identity map for compressed pat for vram Akshata Jahagirdar
2024-07-12  6:39 ` [PATCH 4/6] drm/xe/xe_migrate: Handle migration logic for xe2+ dgfx Akshata Jahagirdar
2024-07-12 12:55   ` Nirmoy Das [this message]
2024-07-15 20:56     ` Jahagirdar, Akshata
2024-07-16  8:12       ` Nirmoy Das
2024-07-12  6:39 ` [PATCH 5/6] drm/xe/migrate: Add kunit to test migration functionality for BMG Akshata Jahagirdar
2024-07-12  6:39 ` [PATCH 6/6] drm/xe/xe2: Do not run xe_bo_test for xe2+ dgfx Akshata Jahagirdar
2024-07-12  6:44 ` ✓ CI.Patch_applied: success for Implement compression support on BMG Patchwork
2024-07-12  6:45 ` ✗ CI.checkpatch: warning " Patchwork
2024-07-12  6:45 ` ✗ CI.KUnit: failure " Patchwork
2024-07-12  7:24 ` [PATCH 0/6] " Akshata Jahagirdar
     [not found] <cover.1720768378.git.akshata.jahagirdar@intel.com>
2024-07-12  7:24 ` [PATCH 4/6] drm/xe/xe_migrate: Handle migration logic for xe2+ dgfx Akshata Jahagirdar
     [not found] <cover.1720689220.git.akshata.jahagirdar@intel.com>
2024-07-11  9:18 ` Akshata Jahagirdar
2024-07-11  9:20   ` Akshata Jahagirdar
2024-07-11 12:57   ` Matthew Auld
     [not found] <cover.1720677099.git.akshata.jahagirdar@intel.com>
2024-07-11  5:55 ` Akshata Jahagirdar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=29306f83-6597-4627-a296-88e9f47edaeb@linux.intel.com \
    --to=nirmoy.das@linux.intel.com \
    --cc=akshata.jahagirdar@intel.com \
    --cc=akshatajahagirdar6@gmail.com \
    --cc=himal.prasad.ghimiray@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox