All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
To: Monk Liu <Monk.Liu-5C7GfCeVMHo@public.gmane.org>,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH] drm/amdgpu:fix race condition bug
Date: Fri, 7 Apr 2017 13:27:39 +0200	[thread overview]
Message-ID: <57837990-fd0c-a74f-6844-ea1828332ac7@vodafone.de> (raw)
In-Reply-To: <0d66797c-de99-75e4-bea3-c8dc725940d0-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>

Am 07.04.2017 um 13:26 schrieb Christian König:
> Am 07.04.2017 um 12:52 schrieb Monk Liu:
>> Change-Id: Ib7a03f3cf5594deeb4ad333cc59b47a6bddfd1ad
>> Signed-off-by: Monk Liu <Monk.Liu@amd.com>
>
> NAK, that is a not backward compatible change to the IOCTL interface.

To make it clear, something like "if(seq == ~0L)" should work.

Christian.

>
> And BTW what's the background of it?
>
> Christian.
>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c 
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
>> index 6d86eae..b8c11fe 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
>> @@ -277,6 +277,9 @@ struct fence *amdgpu_ctx_get_fence(struct 
>> amdgpu_ctx *ctx,
>>         spin_lock(&ctx->ring_lock);
>>   +    if (!seq)
>> +        seq = ctx->rings[ring->idx].sequence - 1;
>> +
>>       if (seq >= cring->sequence) {
>>           spin_unlock(&ctx->ring_lock);
>>           return ERR_PTR(-EINVAL);
>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2017-04-07 11:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-07 10:52 [PATCH] drm/amdgpu:fix race condition bug Monk Liu
     [not found] ` <1491562320-10812-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-04-07 11:26   ` Christian König
     [not found]     ` <0d66797c-de99-75e4-bea3-c8dc725940d0-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-04-07 11:27       ` Christian König [this message]
     [not found]         ` <57837990-fd0c-a74f-6844-ea1828332ac7-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-04-07 13:32           ` 答复: " Liu, Monk
     [not found]             ` <MWHPR12MB1615122AFAF4819617344E0E840C0-Gy0DoCVfaSVb47PzedaHsgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-04-07 13:41               ` Christian König
     [not found]                 ` <5e3ba61a-2bb6-63f0-e4cb-79332d97d621-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-04-07 13:59                   ` 答复: " Liu, Monk
     [not found]                     ` <MWHPR12MB1615B6148A25B08BEADCE4B3840C0-Gy0DoCVfaSVb47PzedaHsgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-04-07 14:57                       ` 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=57837990-fd0c-a74f-6844-ea1828332ac7@vodafone.de \
    --to=deathsimple-antagkrnahcb1svskn2v4q@public.gmane.org \
    --cc=Monk.Liu-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.