Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Apr 2012 15:30:44 GMT
From:      Andreas Tobler <andreast@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/166998: [patch] fix radeon driver for powerpc(64) xf84-video-ati (6.14.3)
Message-ID:  <201204161530.q3GFUilS084144@red.freebsd.org>
Resent-Message-ID: <201204161540.q3GFeAl8084538@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         166998
>Category:       ports
>Synopsis:       [patch] fix radeon driver for powerpc(64) xf84-video-ati (6.14.3)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 16 15:40:09 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Andreas Tobler
>Release:        -CURRENT
>Organization:
none
>Environment:
FreeBSD helium.andreas.nets 10.0-CURRENT FreeBSD 10.0-CURRENT #17 r234280:234281M: Sat Apr 14 23:04:49 CEST 2012     andreast@helium.andreas.nets:/usr/obj/export/devel/fbsd/src/sys/GENERIC32_G5  powerpc

>Description:
A longstanding bug in the RADEONCopySwap routine causes a Bus Error on FreeBSD powerpc during init.

The fix is present in the ati-git repo.
Tested on FreeBSD/ppc 32-bit (me) and 64-bit Ian Chapman <packages at amiga-hardware dot com>

>How-To-Repeat:

>Fix:
Put the attached file into the files directory of xf86-video-ati.

Further details here:

http://cgit.freedesktop.org/xorg/driver/xf86-video-ati/commit/?id=66b586b9b9cdaf70f0fcd547b5a04f044d848d44



Patch attached with submission follows:

--- src/radeon_accel.c.orig	2012-04-15 19:36:08.000000000 +0200
+++ src/radeon_accel.c	2012-04-15 19:36:15.000000000 +0200
@@ -982,10 +982,9 @@
 
 	    for (; nwords > 0; --nwords, ++d, ++s)
 #ifdef __powerpc__
-		asm volatile("stwbrx %0,0,%1" : : "r" (*s), "r" (d));
+		asm volatile("sthbrx %0,0,%1" : : "r" (*s), "r" (d));
 #else
-	        *d = ((*s >> 24) & 0xff) | ((*s >> 8) & 0xff00)
-			| ((*s & 0xff00) << 8) | ((*s & 0xff) << 24);
+		*d = (*s >> 8) | (*s << 8);
 #endif
 	    return;
 	}


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204161530.q3GFUilS084144>