Re: [PATCH] drm/radeon: make 64bit fences more robust

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx
> ---
>  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
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux