Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nirmoy Das <nirmoy.das@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/xe: Set PTE_AE for xe2 dgfx platforms
Date: Thu, 18 Jan 2024 15:42:56 +0100	[thread overview]
Message-ID: <7cad1473-e49d-44a0-a5e6-bb5b06f6d293@intel.com> (raw)
In-Reply-To: <20240118004924.GD5549@mdroper-desk1.amr.corp.intel.com>


Hi Matt,

On 1/18/2024 1:49 AM, Matt Roper wrote:
> On Wed, Jan 17, 2024 at 03:48:51PM +0100, Nirmoy Das wrote:
>> Atomics on XE2 works for both type of memory so
>> extend setting PTE_AE for dgfx platforms as well.
> There are no Xe2 dgfx platforms yet, so it's kind of hard to review this
> fully,
I should've have sent it internally.
>   but my understanding from bspec 71539 is that in theory a dGPU
> atomic operation against system memory would probably only be atomic in
> device scope, not global scope.  I.e., it's atomic with other GPU
> operations,
This is my understand as well.
>   assuming the CPU isn't also accessing the buffer.  But if
> the buffer is shared between the CPU and GPU, then you'd want to set
> AE=0 to ensure that we get a page fault and can migrate the object into
> lmem first.

I think on system memory, AE=1 should be the default and opt-out by UMD 
with a uAPI. Basic operations like

MI_ATOMIC will fail otherwise which if understand correctly MI_ATOMIC 
should work on system memory except

on PVC because of a know bug. I added a small test to check MI_ATOMIC 
which works on dg2 system memory

https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10547/bat-dg2-oem2/igt@xe_exec_atomic@basic-dec-all@engine-drm_xe_engine_class_compute-instance-0-tile-0-system-memory.html

and also on discrete xe2 but requires this patch.



Regards,

Nirmoy

> Matt
>
>> Cc: Fei Yang<fei.yang@intel.com>
>> Cc: Jose Souza<jose.souza@intel.com>
>> Cc: Matt Roper<matthew.d.roper@intel.com>
>> Cc: Brian Welty<brian.welty@intel.com>
>> Signed-off-by: Nirmoy Das<nirmoy.das@intel.com>
>> ---
>>   drivers/gpu/drm/xe/xe_pt.c | 6 +++++-
>>   1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c
>> index de1030a47588..3ace4b401369 100644
>> --- a/drivers/gpu/drm/xe/xe_pt.c
>> +++ b/drivers/gpu/drm/xe/xe_pt.c
>> @@ -602,8 +602,12 @@ xe_pt_stage_bind(struct xe_tile *tile, struct xe_vma *vma,
>>   	struct xe_pt *pt = xe_vma_vm(vma)->pt_root[tile->id];
>>   	int ret;
>>   
>> +	/**
>> +	 * XE_USM_PPGTT_PTE_AE is available for igfx and dgfx from xe2 onwards
>> +	 * and also for PVC but atomics only works for PVC on device memory.
>> +	 */
>>   	if (vma && (vma->gpuva.flags & XE_VMA_ATOMIC_PTE_BIT) &&
>> -	    (is_devmem || !IS_DGFX(xe)))
>> +	    (is_devmem || GRAPHICS_VER(xe) >= 20))
>>   		xe_walk.default_pte |= XE_USM_PPGTT_PTE_AE;
>>   
>>   	if (is_devmem) {
>> -- 
>> 2.42.0
>>

  reply	other threads:[~2024-01-18 14:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-17 14:48 [PATCH] drm/xe: Set PTE_AE for xe2 dgfx platforms Nirmoy Das
2024-01-17 23:48 ` ✓ CI.Patch_applied: success for " Patchwork
2024-01-17 23:48 ` ✓ CI.checkpatch: " Patchwork
2024-01-17 23:49 ` ✓ CI.KUnit: " Patchwork
2024-01-17 23:56 ` ✓ CI.Build: " Patchwork
2024-01-17 23:57 ` ✓ CI.Hooks: " Patchwork
2024-01-17 23:58 ` ✓ CI.checksparse: " Patchwork
2024-01-18  0:49 ` [PATCH] " Matt Roper
2024-01-18 14:42   ` Nirmoy Das [this message]
2024-01-18 16:08     ` Matt Roper
2024-01-19 10:18       ` Nirmoy Das
2024-01-18  5:52 ` ✓ CI.Patch_applied: success for drm/xe: Set PTE_AE for xe2 dgfx platforms (rev2) Patchwork
2024-01-18  5:52 ` ✓ CI.checkpatch: " Patchwork
2024-01-18  5:53 ` ✓ CI.KUnit: " Patchwork
2024-01-18  6:00 ` ✓ CI.Build: " Patchwork
2024-01-18  6:00 ` ✓ CI.Hooks: " Patchwork
2024-01-18  6:01 ` ✓ CI.checksparse: " Patchwork
2024-01-18  6:25 ` ✓ CI.BAT: " Patchwork

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=7cad1473-e49d-44a0-a5e6-bb5b06f6d293@intel.com \
    --to=nirmoy.das@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.d.roper@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