Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Francois Dugast <francois.dugast@intel.com>
To: "Ghimiray, Himal Prasad" <himal.prasad.ghimiray@intel.com>
Cc: "Souza, Jose" <jose.souza@intel.com>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 2/2] drm/xe: Remove function xe_device_canonicalize_addr
Date: Thu, 25 Jul 2024 15:15:26 +0200	[thread overview]
Message-ID: <ZqJP7uoOCf-H4igI@fdugast-desk> (raw)
In-Reply-To: <fcc4e0d9-7218-4fdd-a1d9-56636e540ba1@intel.com>

On Sun, Jul 21, 2024 at 12:45:47AM +0530, Ghimiray, Himal Prasad wrote:
> 
> 
> On 15-07-2024 23:44, Souza, Jose wrote:
> > On Mon, 2024-07-15 at 23:26 +0530, Ghimiray, Himal Prasad wrote:
> > > 
> > > On 15-07-2024 19:35, Souza, Jose wrote:
> > > > On Mon, 2024-07-15 at 16:25 +0530, Himal Prasad Ghimiray wrote:
> > > > > There is no need for converting regular address to canonical address in
> > > > > driver, therefore remove unused xe_device_canonicalize_addr.
> > > > 
> > > > I can see several places that should use it but are not.
> > > > Like every place that does xe_exec, the address needs to canonical in Xe2+ platforms.
> > > 
> > > Hi Jose, Thanks for feedback. Isn't it the responsibility of UMDs to
> > > call xe_exec with a canonical address ?
> > 
> > Yep but xe it self also does xe_execs.
> > 
> > > 
> > > > We are probably not getting any issues so far by luck, so I would not remove it to add it later.
> > > 
> > > Can you please elaborate on what do you mean by luck here ?
> > 
> > We are luck that so far none of the xe kmd internal usage has a batch buffer with that address that sets the va_bits - 1, if that happened the address
> > would not be in canonical format and HW would not execute the batch buffer.
> 
> Ok got it. Thanks for the reply.

Just a thought: could be good to add a test for this in IGT.

Francois

> 
> > 
> > > 
> > > > 
> > > > > 
> > > > > Cc: José Roberto de Souza <jose.souza@intel.com>
> > > > > Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
> > > > > ---
> > > > >    drivers/gpu/drm/xe/xe_device.c | 5 -----
> > > > >    drivers/gpu/drm/xe/xe_device.h | 1 -
> > > > >    2 files changed, 6 deletions(-)
> > > > > 
> > > > > diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
> > > > > index 06cebaffb451..eb3bb434b180 100644
> > > > > --- a/drivers/gpu/drm/xe/xe_device.c
> > > > > +++ b/drivers/gpu/drm/xe/xe_device.c
> > > > > @@ -885,11 +885,6 @@ void xe_device_snapshot_print(struct xe_device *xe, struct drm_printer *p)
> > > > >    	}
> > > > >    }
> > > > > -u64 xe_device_canonicalize_addr(struct xe_device *xe, u64 address)
> > > > > -{
> > > > > -	return sign_extend64(address, xe->info.va_bits - 1);
> > > > > -}
> > > > > -
> > > > >    u64 xe_device_uncanonicalize_addr(struct xe_device *xe, u64 address)
> > > > >    {
> > > > >    	return address & GENMASK_ULL(xe->info.va_bits - 1, 0);
> > > > > diff --git a/drivers/gpu/drm/xe/xe_device.h b/drivers/gpu/drm/xe/xe_device.h
> > > > > index 0a2a3e7fd402..14d4171c467e 100644
> > > > > --- a/drivers/gpu/drm/xe/xe_device.h
> > > > > +++ b/drivers/gpu/drm/xe/xe_device.h
> > > > > @@ -158,7 +158,6 @@ u32 xe_device_ccs_bytes(struct xe_device *xe, u64 size);
> > > > >    void xe_device_snapshot_print(struct xe_device *xe, struct drm_printer *p);
> > > > > -u64 xe_device_canonicalize_addr(struct xe_device *xe, u64 address);
> > > > >    u64 xe_device_uncanonicalize_addr(struct xe_device *xe, u64 address);
> > > > >    void xe_device_td_flush(struct xe_device *xe);
> > > > 
> > 

  reply	other threads:[~2024-07-25 13:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-15 10:55 [PATCH 0/2] Minor cleanups Himal Prasad Ghimiray
2024-07-15 10:45 ` ✓ CI.Patch_applied: success for " Patchwork
2024-07-15 10:46 ` ✓ CI.checkpatch: " Patchwork
2024-07-15 10:47 ` ✓ CI.KUnit: " Patchwork
2024-07-15 10:55 ` [PATCH 1/2] drm/xe: Delete unused register from xe_regs.h Himal Prasad Ghimiray
2024-07-22  4:53   ` Upadhyay, Tejas
2024-07-22  5:12     ` Ghimiray, Himal Prasad
2024-07-24 17:53       ` Lucas De Marchi
2024-07-15 10:55 ` [PATCH 2/2] drm/xe: Remove function xe_device_canonicalize_addr Himal Prasad Ghimiray
2024-07-15 14:05   ` Souza, Jose
2024-07-15 17:56     ` Ghimiray, Himal Prasad
2024-07-15 18:14       ` Souza, Jose
2024-07-20 19:15         ` Ghimiray, Himal Prasad
2024-07-25 13:15           ` Francois Dugast [this message]
2024-07-15 10:59 ` ✓ CI.Build: success for Minor cleanups Patchwork
2024-07-15 11:01 ` ✓ CI.Hooks: " Patchwork
2024-07-15 11:02 ` ✓ CI.checksparse: " Patchwork
2024-07-15 11:26 ` ✓ CI.BAT: " Patchwork
2024-07-15 12:58 ` ✗ CI.FULL: failure " 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=ZqJP7uoOCf-H4igI@fdugast-desk \
    --to=francois.dugast@intel.com \
    --cc=himal.prasad.ghimiray@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jose.souza@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