May have bricked my GPU
alexdeucher at gmail.com
Mon Mar 26 05:59:43 PDT 2012
On Sun, Mar 25, 2012 at 5:39 PM, Connor Behan <connor.behan at gmail.com> wrote:
> I really hope some one here is knowledgeable about this...
> My r128 card hangs indefinitely if any kind of acceleration is enabled.
> Running startx results in a black screen and I have to reboot with
> Alt+SysRq+REISUB. This was not caused by upgrading between any official
> releases of linux, xorg or my driver. It was caused because I was trying to
> hack my driver and I can tell you exactly how.
> I was working on adding EXA support to xf86-video-r128. I successfully got
> as far as https://bugs.freedesktop.org/show_bug.cgi?id=47866 and I still
> suggest that you accept this patch since it does not contain the dangerous
> part. The dangerous part came when I tried to support compositing as this
> needed some OUT_RING and OUTREG commands. I based this on the KAA approach:
> r128_composite.c. When I was finished, I ended up with an r128_exa.c file
> that looked like this: http://pastebin.com/HHsESs9q. Now I realize that I
> may be asking a difficult question as many of you haven't worked on this
> stuff for years, but here's how it went.
> I installed this new DDX and first tried to start the X server with EXA and
> DRI but the composite extension turned off. Just to make sure that
> everything that worked before still worked. However, it did not work. It
> gave me this log file: http://pastebin.com/XWYbtTcL showing the lines:
> R128(0): R128CCEWaitForIdle: (DEBUG) CCE idle took i = 1025 and R128(0):
> Idle timed out, resetting engine...
> I then stupidly thought "okay, maybe the composite code that has been added
> hangs if composite is disabled so I'll enable composite as well as EXA and
> DRI" Doing that gave me the log file: http://pastebin.com/3RJBNhAx with the
> lines: (**) R128(0): Idle timed out: 64 entries, stat=0x80400040,
> probe=0x00200000, (EE) R128(0): Idle timed out, resetting engine..., (EE)
> R128(0): R128WaitForIdle: CCE stop -22, (EE) R128(0): R128WaitForIdle: CCE
> reset -22 and (EE) R128(0): R128WaitForIdle: CCE start -22
> I get the same error if I switch back to XAA with DRI on. If I use XAA with
> DRI off, I get the log file: http://pastebin.com/VLEbsAfx with the line:
> (EE) R128(0): Idle timed out, resetting engine... As of this morning, the
> ONLY way for me to use X, regardless of what my package versions are is to
> specify "NoAccel" which is slow as hell. I've seen R128 infinite loop idling
> errors posted to mailing lists in the past. They are mostly posted by PPC
> users for whom the r128 driver never worked properly in the first place.
> They all say that they "fix" it by turning off acceleration. I obviously
> don't want this since my card worked perfectly with 2D and 3D acceleration
> for years and it's only my foolishness right now that broke it.
> Does anyone know a way this can be fixed? Does ATI provide a tool that will
> reflash a VBIOS and get rid of this error? Or does one of you have / know
> how to write this kind of utility? Is it common to permanently brick a GPU
> if you try writing the wrong bit to a register? Like the ones that are
> written to in my r128_exa.c? If so I have even more respect for open source
> driver hackers.
There's not really an easy way to wreck your vbios from bad
acceleration code. Moreover, all the vbios handles is modesetting and
card posting. The vbios does not load the cce ucode or touch anything
acceleration related. If you get something on the screen at boot,
then most likely your vbios is fine. I would guess that your system
is not using the ddx (xf86-video-r128) you think it is or your patches
made some subtle change that broke XAA. Does reverting the stock
versions of the graphics stack provided by your distro help?
More information about the xorg-devel