From: Matthew Auld <matthew.auld@intel.com>
To: Nirmoy Das <nirmoy.das@intel.com>, dri-devel@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org,
"Himal Prasad Ghimiray" <himal.prasad.ghimiray@intel.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Subject: Re: [PATCH v5 3/4] drm/xe/migrate: Clear CCS when clearing bo on xe2
Date: Thu, 18 Jul 2024 17:40:44 +0100 [thread overview]
Message-ID: <b0af2f0f-40c6-455e-8c74-ee075950867e@intel.com> (raw)
In-Reply-To: <20240704081841.30212-3-nirmoy.das@intel.com>
On 04/07/2024 09:18, Nirmoy Das wrote:
> Clearing bo with uncompress PTE will trigger a CCS clearing as well
> for XE2, so skip emit_copy_ccs() when on xe2 when clearing bo.
>
> v2: When clearing BO, CCS clear happens with all command as long
> as PTEs are uncompress.
>
> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
> drivers/gpu/drm/xe/xe_migrate.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
> index e0a3f6921572..cc8beed2bf8e 100644
> --- a/drivers/gpu/drm/xe/xe_migrate.c
> +++ b/drivers/gpu/drm/xe/xe_migrate.c
> @@ -1061,7 +1061,8 @@ struct dma_fence *xe_migrate_clear(struct xe_migrate *m,
> if (clear_vram && xe_migrate_allow_identity(clear_L0, &src_it))
> xe_res_next(&src_it, clear_L0);
> else
> - emit_pte(m, bb, clear_L0_pt, clear_vram, clear_ccs,
> + /* Use uncompressed pte so clear happens in the real memory. */
> + emit_pte(m, bb, clear_L0_pt, clear_vram, false,
> &src_it, clear_L0, dst);
I assume this uses coherency 1way+ mode for that pat index? We could
potentially use coh_none instead, for the case where bo.cpu_caching !=
wb. In theory that should be faster, but could be ignored for now.
>
> bb->cs[bb->len++] = MI_BATCH_BUFFER_END;
> @@ -1070,7 +1071,9 @@ struct dma_fence *xe_migrate_clear(struct xe_migrate *m,
> if (clear_bo_data)
> emit_clear(gt, bb, clear_L0_ofs, clear_L0, XE_PAGE_SIZE, clear_vram);
>
> - if (xe_device_has_flat_ccs(xe)) {
> + /* Clearing BO with uncompress PTE will clear CCS metadata as well on XE2 */
> + if (xe_device_has_flat_ccs(xe) && clear_ccs &&
> + !(clear_bo_data && GRAPHICS_VERx100(gt_to_xe(gt)) >= 2000)) {
> emit_copy_ccs(gt, bb, clear_L0_ofs, true,
> m->cleared_mem_ofs, false, clear_L0);
> flush_flags = MI_FLUSH_DW_CCS;
next prev parent reply other threads:[~2024-07-18 16:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 8:18 [PATCH v5 1/4] drm/ttm: Add a flag to allow drivers to skip clear-on-free Nirmoy Das
2024-07-04 8:18 ` [PATCH v5 2/4] drm/xe/migrate: Parameterize ccs and bo data clear in xe_migrate_clear() Nirmoy Das
2024-07-04 8:18 ` [PATCH v5 3/4] drm/xe/migrate: Clear CCS when clearing bo on xe2 Nirmoy Das
2024-07-10 9:14 ` Nirmoy Das
2024-07-18 16:40 ` Matthew Auld [this message]
2024-07-18 18:33 ` Nirmoy Das
2024-07-04 8:18 ` [PATCH v5 4/4] drm/xe/lnl: Offload system clear page activity to GPU Nirmoy Das
2024-07-08 6:32 ` Nirmoy Das
2024-07-18 16:27 ` Matthew Auld
2024-07-18 18:45 ` Nirmoy Das
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=b0af2f0f-40c6-455e-8c74-ee075950867e@intel.com \
--to=matthew.auld@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=himal.prasad.ghimiray@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=nirmoy.das@intel.com \
--cc=thomas.hellstrom@linux.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