amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Huang Rui <ray.huang@amd.com>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>
Cc: "Su, Jinzhou \(Joe\)" <Jinzhou.Su@amd.com>,
	"Koenig, Christian" <Christian.Koenig@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/amdgpu: Add mem sync flag for IB allocated by SA
Date: Tue, 20 Apr 2021 16:49:15 +0800	[thread overview]
Message-ID: <20210420084915.GB4046046@hr-amd> (raw)
In-Reply-To: <31fd0d4e-2dc5-f9bf-2a71-4e90cde52151@gmail.com>

On Tue, Apr 20, 2021 at 04:34:18PM +0800, Christian König wrote:
> Am 20.04.21 um 10:27 schrieb Jinzhou Su:
> > The buffer of SA bo will be used by many cases. So better
> > to flush the cache of indirect buffer allocated by SA before
> > commit the IB.
> >
> > Signed-off-by: Jinzhou Su <Jinzhou.Su@amd.com>
> > ---
> >   drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> > index 148a3b481b12..a2fe2dac32c1 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> > @@ -76,6 +76,8 @@ int amdgpu_ib_get(struct amdgpu_device *adev, struct amdgpu_vm *vm,
> >   		}
> >   
> >   		ib->ptr = amdgpu_sa_bo_cpu_addr(ib->sa_bo);
> > +		/* flush the cache before commit the IB */
> 
> Either drop the comment or change it a bit.
> 
> E.g. like "/* Invalidate the cache to make the GPU see the newest SA 
> content */
> 
> With that done the patch is Reviewed-by: Christian König 
> <christian.koenig@amd.com>

Yes, with this fix, patch looks good for me as well.

Reviewed-by: Huang Rui <ray.huang@amd.com>

> 
> Regards,
> Christian.
> 
> > +		ib->flags = AMDGPU_IB_FLAG_EMIT_MEM_SYNC;
> >   
> >   		if (!vm)
> >   			ib->gpu_addr = amdgpu_sa_bo_gpu_addr(ib->sa_bo);
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

      reply	other threads:[~2021-04-20  8:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20  8:27 [PATCH] drm/amdgpu: Add mem sync flag for IB allocated by SA Jinzhou Su
2021-04-20  8:34 ` Christian König
2021-04-20  8:49   ` Huang Rui [this message]

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=20210420084915.GB4046046@hr-amd \
    --to=ray.huang@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=Jinzhou.Su@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=ckoenig.leichtzumerken@gmail.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;
as well as URLs for NNTP newsgroup(s).