From: Jerome Glisse <j.glisse@gmail.com>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: "Christian König" <deathsimple@vodafone.de>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/4] drm/radeon: move ring syncing after bo validation
Date: Fri, 24 Feb 2012 12:15:22 -0500 [thread overview]
Message-ID: <1330103722.2133.3.camel@localhost.localdomain> (raw)
In-Reply-To: <CADnq5_PRRwoM-OPwOVUPDdmoLipsDpat-gaE2FbFb7t=HJjkTQ@mail.gmail.com>
On Thu, 2012-02-23 at 10:17 -0500, Alex Deucher wrote:
> 2012/2/23 Christian König <deathsimple@vodafone.de>:
> > The function radeon_bo_list_validate can cause a
> > bo to move, resulting in a different sync_obj
> > and a dependency to wait for this move to finish.
> >
> > Signed-off-by: Christian König <deathsimple@vodafone.de>
> > Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
>
> For the series:
>
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Same
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
>
> > ---
> > drivers/gpu/drm/radeon/radeon.h | 1 -
> > drivers/gpu/drm/radeon/radeon_cs.c | 21 ++++++++++++++-------
> > 2 files changed, 14 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
> > index 884e0d4..4c1b981 100644
> > --- a/drivers/gpu/drm/radeon/radeon.h
> > +++ b/drivers/gpu/drm/radeon/radeon.h
> > @@ -836,7 +836,6 @@ struct radeon_cs_parser {
> > struct radeon_cs_reloc *relocs;
> > struct radeon_cs_reloc **relocs_ptr;
> > struct list_head validated;
> > - bool sync_to_ring[RADEON_NUM_RINGS];
> > /* indices of various chunks */
> > int chunk_ib_idx;
> > int chunk_relocs_idx;
> > diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
> > index 435a3d9..7fd0987 100644
> > --- a/drivers/gpu/drm/radeon/radeon_cs.c
> > +++ b/drivers/gpu/drm/radeon/radeon_cs.c
> > @@ -85,12 +85,6 @@ int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
> > radeon_bo_list_add_object(&p->relocs[i].lobj,
> > &p->validated);
> >
> > - if (p->relocs[i].robj->tbo.sync_obj && !(r->flags & RADEON_RELOC_DONT_SYNC)) {
> > - struct radeon_fence *fence = p->relocs[i].robj->tbo.sync_obj;
> > - if (!radeon_fence_signaled(fence)) {
> > - p->sync_to_ring[fence->ring] = true;
> > - }
> > - }
> > } else
> > p->relocs[i].handle = 0;
> > }
> > @@ -118,11 +112,24 @@ static int radeon_cs_get_ring(struct radeon_cs_parser *p, u32 ring, s32 priority
> >
> > static int radeon_cs_sync_rings(struct radeon_cs_parser *p)
> > {
> > + bool sync_to_ring[RADEON_NUM_RINGS] = { };
> > int i, r;
> >
> > + for (i = 0; i < p->nrelocs; i++) {
> > + if (!p->relocs[i].robj || !p->relocs[i].robj->tbo.sync_obj)
> > + continue;
> > +
> > + if (!(p->relocs[i].flags & RADEON_RELOC_DONT_SYNC)) {
> > + struct radeon_fence *fence = p->relocs[i].robj->tbo.sync_obj;
> > + if (!radeon_fence_signaled(fence)) {
> > + sync_to_ring[fence->ring] = true;
> > + }
> > + }
> > + }
> > +
> > for (i = 0; i < RADEON_NUM_RINGS; ++i) {
> > /* no need to sync to our own or unused rings */
> > - if (i == p->ring || !p->sync_to_ring[i] || !p->rdev->ring[i].ready)
> > + if (i == p->ring || !sync_to_ring[i] || !p->rdev->ring[i].ready)
> > continue;
> >
> > if (!p->ib->fence->semaphore) {
> > --
> > 1.7.5.4
> >
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/dri-devel
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2012-02-24 17:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-23 14:18 [PATCH 1/4] drm/radeon: move ring syncing after bo validation Christian König
2012-02-23 14:18 ` [PATCH 2/4] drm/radeon/kms: no need to align IB like this Christian König
2012-02-23 17:00 ` Jerome Glisse
2012-02-23 18:19 ` Christian König
2012-02-23 14:18 ` [PATCH 3/4] drm/radeon: also make the cs_parse function per ring Christian König
2012-02-24 17:14 ` Jerome Glisse
2012-02-23 14:18 ` [PATCH 4/4] drm/radeon: fix IB debugfs files for multiple cards Christian König
2012-02-23 15:17 ` [PATCH 1/4] drm/radeon: move ring syncing after bo validation Alex Deucher
2012-02-24 17:15 ` Jerome Glisse [this message]
2012-02-23 17:05 ` Mathias Fröhlich
2012-02-23 17:32 ` Jerome Glisse
2012-02-23 18:27 ` Christian König
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=1330103722.2133.3.camel@localhost.localdomain \
--to=j.glisse@gmail.com \
--cc=alexdeucher@gmail.com \
--cc=deathsimple@vodafone.de \
--cc=dri-devel@lists.freedesktop.org \
/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