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: lucas.demarchi@intel.com, lucas.demarchi@gmail.com,
	Matthew Auld <matthew.auld@intel.com>
Subject: Re: [PATCH 1/6] drm/xe/migrate: Handle clear ccs logic for xe2 dgfx
Date: Wed, 10 Jul 2024 10:01:17 +0200	[thread overview]
Message-ID: <4121fb1b-8766-43fc-a237-3fde5f6abbef@linux.intel.com> (raw)
In-Reply-To: <e597e39b0c22d3b58cda09e0e4b33f883b9140db.1720515376.git.akshata.jahagirdar@intel.com>

Hi Akshata,


I have two patches(2,3) in 
https://patchwork.freedesktop.org/series/135743/ that deals with this 
which I sent to

to handle bo clear for igfx. Those two patches are independent of my 
series and I you can incorporate it.


https://patchwork.freedesktop.org/patch/602287/?series=135743&rev=1

https://patchwork.freedesktop.org/patch/602288/?series=135743&rev=1


Regards,

Nirmoy

On 7/10/2024 10:17 AM, Akshata Jahagirdar wrote:
> For Xe2 dGPU, we clear the bo by modifying the VRAM using an
> uncompressed pat index which then indirectly updates the
> compression status as uncompressed i.e zeroed CCS.
> So xe_migrate_clear() should be updated for BMG to not
> emit CCS surf copy commands.
>
> Signed-off-by: Akshata Jahagirdar <akshata.jahagirdar@intel.com>
> ---
>   drivers/gpu/drm/xe/xe_device.h  | 5 +++++
>   drivers/gpu/drm/xe/xe_migrate.c | 6 +++---
>   2 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_device.h b/drivers/gpu/drm/xe/xe_device.h
> index 0a2a3e7fd402..c3093506c28c 100644
> --- a/drivers/gpu/drm/xe/xe_device.h
> +++ b/drivers/gpu/drm/xe/xe_device.h
> @@ -144,6 +144,11 @@ static inline bool xe_device_has_flat_ccs(struct xe_device *xe)
>   	return xe->info.has_flat_ccs;
>   }
>   
> +static inline bool xe_device_needs_ccs_emit(struct xe_device *xe)
> +{
> +	return xe_device_has_flat_ccs(xe) && !(GRAPHICS_VER(xe) >= 20 && IS_DGFX(xe));
> +}
> +
>   static inline bool xe_device_has_sriov(struct xe_device *xe)
>   {
>   	return xe->info.has_sriov;
> diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
> index fa23a7e7ec43..2fc2cf375b1e 100644
> --- a/drivers/gpu/drm/xe/xe_migrate.c
> +++ b/drivers/gpu/drm/xe/xe_migrate.c
> @@ -420,7 +420,7 @@ struct xe_migrate *xe_migrate_init(struct xe_tile *tile)
>   		return ERR_PTR(err);
>   
>   	if (IS_DGFX(xe)) {
> -		if (xe_device_has_flat_ccs(xe))
> +		if (xe_device_needs_ccs_emit(xe))
>   			/* min chunk size corresponds to 4K of CCS Metadata */
>   			m->min_chunk_size = SZ_4K * SZ_64K /
>   				xe_device_ccs_bytes(xe, SZ_64K);
> @@ -1034,7 +1034,7 @@ struct dma_fence *xe_migrate_clear(struct xe_migrate *m,
>   					clear_system_ccs ? 0 : emit_clear_cmd_len(gt), 0,
>   					avail_pts);
>   
> -		if (xe_device_has_flat_ccs(xe))
> +		if (xe_device_needs_ccs_emit(xe))
>   			batch_size += EMIT_COPY_CCS_DW;
>   
>   		/* Clear commands */
> @@ -1062,7 +1062,7 @@ struct dma_fence *xe_migrate_clear(struct xe_migrate *m,
>   		if (!clear_system_ccs)
>   			emit_clear(gt, bb, clear_L0_ofs, clear_L0, XE_PAGE_SIZE, clear_vram);
>   
> -		if (xe_device_has_flat_ccs(xe)) {
> +		if (xe_device_needs_ccs_emit(xe)) {
>   			emit_copy_ccs(gt, bb, clear_L0_ofs, true,
>   				      m->cleared_mem_ofs, false, clear_L0);
>   			flush_flags = MI_FLUSH_DW_CCS;

  reply	other threads:[~2024-07-10  8:01 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-10  7:53 [PATCH 0/6] Implement compression support on BMG Akshata Jahagirdar
2024-07-09 10:33 ` Matthew Auld
2024-07-09 19:07   ` Jahagirdar, Akshata
2024-07-10  7:53 ` [PATCH 1/6] drm/xe/migrate: Handle clear ccs logic for xe2 dgfx Akshata Jahagirdar
2024-07-10  8:01   ` Nirmoy Das [this message]
2024-07-10  8:17   ` Akshata Jahagirdar
2024-07-11 11:27   ` Akshata Jahagirdar
2024-07-11 12:42   ` Akshata Jahagirdar
2024-07-11 13:07   ` Akshata Jahagirdar
2024-07-12 11:52   ` [PATCH 1/6] drm/xe/migrate: Sample patch for testing Akshata Jahagirdar
2024-07-12 11:53   ` Akshata Jahagirdar
2024-07-10  8:17 ` [PATCH 0/6] Implement compression support on BMG Akshata Jahagirdar
2024-07-11  5:54 ` Akshata Jahagirdar
2024-07-11 11:27 ` Akshata Jahagirdar
2024-07-11 12:34 ` Ghimiray, Himal Prasad
2024-07-11 12:42 ` Akshata Jahagirdar
2024-07-11 13:07 ` Akshata Jahagirdar
     [not found] <cover.1720677099.git.akshata.jahagirdar@intel.com>
2024-07-11  5:55 ` [PATCH 1/6] drm/xe/migrate: Handle clear ccs logic for xe2 dgfx Akshata Jahagirdar
  -- strict thread matches above, loose matches on Subject: below --
2024-07-11  9:18 [PATCH 0/6] Implement compression support on BMG Akshata Jahagirdar
2024-07-12  3:11 ` [PATCH 1/6] drm/xe/migrate: Handle clear ccs 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:19   ` Akshata Jahagirdar
2024-07-11 12:09   ` Matthew Auld
2024-07-12  4:09     ` Jahagirdar, Akshata
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
     [not found] <cover.1720768378.git.akshata.jahagirdar@intel.com>
2024-07-12  7:24 ` 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=4121fb1b-8766-43fc-a237-3fde5f6abbef@linux.intel.com \
    --to=nirmoy.das@linux.intel.com \
    --cc=akshata.jahagirdar@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@gmail.com \
    --cc=lucas.demarchi@intel.com \
    --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