dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <deathsimple@vodafone.de>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: Maling list - DRI developers <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/radeon: sync all BOs involved in a CS
Date: Thu, 27 Nov 2014 13:14:07 +0100	[thread overview]
Message-ID: <5477158F.7010707@vodafone.de> (raw)
In-Reply-To: <CADnq5_OCD-JwmxNg36hO977JQw9L2Npjzq=S=DuBAWMtOSKJBg@mail.gmail.com>

Am 27.11.2014 um 03:39 schrieb Alex Deucher:
> On Wed, Nov 26, 2014 at 10:29 AM, Christian König
> <deathsimple@vodafone.de> wrote:
>> From: Christian König <christian.koenig@amd.com>
>>
>> Not just the userspace relocs, otherwise we won't wait
>> for a swapped out page tables to be swapped in again.
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
>> Cc: stable@vger.kernel.org
> Pulled into my -next tree.  Unfortunately, this doesn't apply to
> -fixes or stable as is.

I've just send out an updated patch based on you drm-next-3.18 branch.

Please apply as well,
Christian.

>
> Alex
>
>
>> ---
>>   drivers/gpu/drm/radeon/radeon_cs.c | 19 +++++++------------
>>   1 file changed, 7 insertions(+), 12 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
>> index 75f22e5..f5e0a69 100644
>> --- a/drivers/gpu/drm/radeon/radeon_cs.c
>> +++ b/drivers/gpu/drm/radeon/radeon_cs.c
>> @@ -251,22 +251,20 @@ 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)
>>   {
>> -       int i, r = 0;
>> +       struct radeon_cs_reloc *reloc;
>> +       int r;
>>
>> -       for (i = 0; i < p->nrelocs; i++) {
>> +       list_for_each_entry(reloc, &p->validated, tv.head) {
>>                  struct reservation_object *resv;
>>
>> -               if (!p->relocs[i].robj)
>> -                       continue;
>> -
>> -               resv = p->relocs[i].robj->tbo.resv;
>> +               resv = reloc->robj->tbo.resv;
>>                  r = radeon_sync_resv(p->rdev, &p->ib.sync, resv,
>> -                                    p->relocs[i].tv.shared);
>> +                                    reloc->tv.shared);
>>
>>                  if (r)
>> -                       break;
>> +                       return r;
>>          }
>> -       return r;
>> +       return 0;
>>   }
>>
>>   /* XXX: note that this is called from the legacy UMS CS ioctl as well */
>> @@ -505,9 +503,6 @@ static int radeon_bo_vm_update_pte(struct radeon_cs_parser *p,
>>          if (r)
>>                  return r;
>>
>> -       radeon_sync_resv(p->rdev, &p->ib.sync, vm->page_directory->tbo.resv,
>> -                        true);
>> -
>>          r = radeon_vm_clear_freed(rdev, vm);
>>          if (r)
>>                  return r;
>> --
>> 1.9.1
>>

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2014-11-27 12:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26 15:29 [PATCH] drm/radeon: sync all BOs involved in a CS Christian König
2014-11-27  2:39 ` Alex Deucher
2014-11-27 12:14   ` Christian König [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=5477158F.7010707@vodafone.de \
    --to=deathsimple@vodafone.de \
    --cc=alexdeucher@gmail.com \
    --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