dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: "Christian König" <christian.koenig@amd.com>
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Daniel Vetter" <daniel.vetter@ffwll.ch>,
	"DRI Development" <dri-devel@lists.freedesktop.org>,
	"Huang Rui" <ray.huang@amd.com>,
	"Christian König" <ckoenig.leichtzumerken@gmail.com>,
	"Daniel Vetter" <daniel.vetter@intel.com>
Subject: Re: [PATCH] drm/ttm: Explain why ttm_bo_add_move_fence uses a shared slot
Date: Thu, 20 May 2021 22:28:55 +0200	[thread overview]
Message-ID: <YKbGh65vB6e69Q1v@phenom.ffwll.local> (raw)
In-Reply-To: <ac723ad9-e2e3-38e7-e178-db0246cdffa0@amd.com>

On Wed, May 19, 2021 at 12:43:49PM +0200, Christian König wrote:
> Am 19.05.21 um 10:24 schrieb Daniel Vetter:
> > Motivated because I got confused and Christian confirmed why this
> > works. I think this is non-obvious enough that it merits a slightly
> > longer comment.
> > 
> > Cc: Christian König <ckoenig.leichtzumerken@gmail.com>
> > Cc: Christian Koenig <christian.koenig@amd.com>
> > Cc: Huang Rui <ray.huang@amd.com>
> > Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> 
> Reviewed-by: Christian König <christian.koenig@amd.com>

Applied to drm-misc-next, thanks for reviewing.
-Daniel

> 
> > ---
> >   drivers/gpu/drm/ttm/ttm_bo.c | 4 +++-
> >   1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
> > index ca1b098b6a56..51a94fd63bd7 100644
> > --- a/drivers/gpu/drm/ttm/ttm_bo.c
> > +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> > @@ -682,7 +682,9 @@ int ttm_mem_evict_first(struct ttm_device *bdev,
> >   }
> >   /*
> > - * Add the last move fence to the BO and reserve a new shared slot.
> > + * Add the last move fence to the BO and reserve a new shared slot. We only use
> > + * a shared slot to avoid unecessary sync and rely on the subsequent bo move to
> > + * either stall or use an exclusive fence respectively set bo->moving.
> >    */
> >   static int ttm_bo_add_move_fence(struct ttm_buffer_object *bo,
> >   				 struct ttm_resource_manager *man,
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

  reply	other threads:[~2021-05-20 20:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19  8:24 [PATCH] drm/ttm: Explain why ttm_bo_add_move_fence uses a shared slot Daniel Vetter
2021-05-19 10:43 ` Christian König
2021-05-20 20:28   ` Daniel Vetter [this message]
2021-05-19 10:56 ` Huang Rui

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=YKbGh65vB6e69Q1v@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=christian.koenig@amd.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ray.huang@amd.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