dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <deathsimple@vodafone.de>
To: j.glisse@gmail.com
Cc: Jerome Glisse <jglisse@redhat.com>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/radeon: fix possible lack of synchronization btw ttm and other ring
Date: Fri, 04 May 2012 09:58:24 +0200	[thread overview]
Message-ID: <4FA38C20.4040705@vodafone.de> (raw)
In-Reply-To: <1336067075-4713-1-git-send-email-j.glisse@gmail.com>

On 03.05.2012 19:44, j.glisse@gmail.com wrote:
> From: Jerome Glisse<jglisse@redhat.com>
>
> We need to sync with the GFX ring as ttm might have schedule bo move
> on it and new command scheduled for other ring need to wait for bo
> data to be in place.
>
> Signed-off-by: Jerome Glisse<jglisse@redhat.com>
Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/radeon/radeon_cs.c |   12 ++++++------
>   include/drm/radeon_drm.h           |    1 -
>   2 files changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
> index 82f2e7b0..e5f8e17 100644
> --- a/drivers/gpu/drm/radeon/radeon_cs.c
> +++ b/drivers/gpu/drm/radeon/radeon_cs.c
> @@ -122,15 +122,15 @@ static int radeon_cs_sync_rings(struct radeon_cs_parser *p)
>   	int i, r;
>
>   	for (i = 0; i<  p->nrelocs; i++) {
> +		struct radeon_fence *fence;
> +
>   		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 (fence->ring != p->ring&&  !radeon_fence_signaled(fence)) {
> -				sync_to_ring[fence->ring] = true;
> -				need_sync = true;
> -			}
> +		fence = p->relocs[i].robj->tbo.sync_obj;
> +		if (fence->ring != p->ring&&  !radeon_fence_signaled(fence)) {
> +			sync_to_ring[fence->ring] = true;
> +			need_sync = true;
>   		}
>   	}
>
> diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h
> index 7c491b4..5805686 100644
> --- a/include/drm/radeon_drm.h
> +++ b/include/drm/radeon_drm.h
> @@ -926,7 +926,6 @@ struct drm_radeon_cs_chunk {
>   };
>
>   /* drm_radeon_cs_reloc.flags */
> -#define RADEON_RELOC_DONT_SYNC		0x01
>
>   struct drm_radeon_cs_reloc {
>   	uint32_t		handle;

  parent reply	other threads:[~2012-05-04  7:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-03 17:44 [PATCH] drm/radeon: fix possible lack of synchronization btw ttm and other ring j.glisse
2012-05-03 18:25 ` Alex Deucher
2012-05-04  7:58 ` Christian König [this message]
2012-05-04  8:42   ` Dave Airlie
2012-05-04  8:48     ` 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=4FA38C20.4040705@vodafone.de \
    --to=deathsimple@vodafone.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=j.glisse@gmail.com \
    --cc=jglisse@redhat.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