From: "Michel Dänzer" <michel@daenzer.net>
To: "Christian König" <deathsimple@vodafone.de>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/radeon: make 64bit fences more robust
Date: Mon, 10 Sep 2012 13:12:17 +0200 [thread overview]
Message-ID: <1347275537.30263.368.camel@thor.local> (raw)
In-Reply-To: <1347268383-4150-1-git-send-email-deathsimple@vodafone.de>
On Mon, 2012-09-10 at 11:13 +0200, Christian König wrote:
> Only increase the higher 32bits if we really detect a wrap around.
>
> Fixes:
> https://bugs.freedesktop.org/show_bug.cgi?id=54129
> https://bugs.freedesktop.org/show_bug.cgi?id=54662
>
> Possible fixes:
> https://bugzilla.redhat.com/show_bug.cgi?id=846505
> https://bugzilla.redhat.com/show_bug.cgi?id=845639
>
> Signed-off-by: Christian König <deathsimple@vodafone.de>
> Cc: stable@vger.kernel.org
> ---
> drivers/gpu/drm/radeon/radeon_fence.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
> index 7b737b9..4781e13 100644
> --- a/drivers/gpu/drm/radeon/radeon_fence.c
> +++ b/drivers/gpu/drm/radeon/radeon_fence.c
> @@ -160,7 +160,7 @@ void radeon_fence_process(struct radeon_device *rdev, int ring)
> do {
> seq = radeon_fence_read(rdev, ring);
> seq |= last_seq & 0xffffffff00000000LL;
> - if (seq < last_seq) {
> + if (seq < (last_seq - 0x80000000LL)) {
> seq += 0x100000000LL;
> }
Can you provide a bit more explanation for this change? In particular,
how could the code previously detect a wraparound when there was none,
and why is this the proper fix?
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Debian, X and DRI developer
next prev parent reply other threads:[~2012-09-10 11:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-10 9:13 [PATCH] drm/radeon: make 64bit fences more robust Christian König
2012-09-10 11:12 ` Michel Dänzer [this message]
2012-09-10 12:02 ` Christian König
2012-09-10 15:32 ` Jerome Glisse
2012-09-10 15:38 ` Michel Dänzer
2012-09-10 15:52 ` Jerome Glisse
2012-09-10 16:07 ` Jerome Glisse
2012-09-10 20:13 ` Dave Airlie
2012-09-10 21:10 ` Jerome Glisse
2012-09-10 21:11 ` Jerome Glisse
2012-09-11 10:11 ` Christian König
2012-09-11 10:23 ` Michel Dänzer
2012-09-11 16:03 ` Jerome Glisse
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=1347275537.30263.368.camel@thor.local \
--to=michel@daenzer.net \
--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 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.