Hi,
First my config:
Slackware 7.0 with Kernel 2.4.4 and XFree 4.1.0 running at Matrox G450.
Some time ago I reported problems with Heretic2. Since some days I try to trace
down the problem using the x410-sources.
Heretic2 quits normally with this error message:
mga_get_buffer_ioctl: flush ret=-16
but the X-Server takes all the cpu-time and the last rendered image is shown.
Although the system runs, only reboot helps to get X run again.
This error comes from "mgaioctl.c" and I did some investigations around this
location.
One result is that in the function drmMGAFlushDMA a counter isn't reseted,
therefor I attached a little patch (but perhaps there is a reason to not
reset this counter).
Anyway, this fixes nothing :-(
It seems that the card goes into "busy"-state (Return code 16) and there is no
way out. Because Heretic2 normally exits during exit(1) in UPDATE_LOCK, I
assume it's not a problem in H2.
My summary:
mga_get_buffer_ioctl wants to get a buffer, but the device returns "Try Again"
(code 11).
Then a DMA-list get flushed (UPDATE_LOCK), but it always returns "Busy", so
after many retries the program will exits leaving the X-Server in an undefined
state.
My question:
How can the card get in this (never-ending) "Busy"-state (hw-lock?, crash?)
and is there something I can try to do?
I'm open for any hints and/or patches.
Ralf Hoffmann
xf86drmMga.c.diff