I've previously filed a bug report (bug #10211) about the R300_RB3D_DSTCACHE_CTLSTAT issue, however I couldn't prove the proposed patch was correct. I've investigated this further and I can confirm that the blob indeed writes 0xa to R300_RB3D_DSTCACHE_CTLSTAT before 3D operations, and 0x2 after 3D operations. I've also found some other issues that should probably be fixed, although they are not critical.
When drawing a simple triangle the blob produces a few type 1 packets, and an indirect buffer. The indirect buffer contains all of the "main" 3D commands. It should also be noted that the blob performs the writes to R300_RB3D_DSTCACHE_CTLSTAT inside the indirect buffer, while our driver does not. The blob then resets R300_RB3D_DSTCACHE_CTLSTAT to 0x0 after the indirect buffer, again, our driver doesn't do this. When drawing a simple triangle our driver produces mostly type 1 packets, and a few type 3 packets I've yet to decode. Our driver does not use an indirect buffer. So, I think that some improvement is required. Specifically: 1. Use indirect buffers in the same way the blob does, even for simple things like a single triangle. 2. Move the R300_RB3D_DSTCACHE_CTLSTAT writes (0xa/0x2) to the start and end of the indirect buffer. 3. Add a type 1 packet after the indirect buffer to reset R300_RB3D_DSTCACHE_CTLSTAT to 0x0. 4. Compare our drivers output with the blob again, and look into any other differences. I realize there will be some differences, but currently even drawing a simple triangle seems to be radically different. This probably won't help with lockups, but I think we should try and minimize the differences between what our driver outputs and what the blob outputs. We should try to match the blob as closely as possible, because this will make finding bugs a lot easier. I've already been able to confirm the R300_RB3D_DSTCACHE_CTLSTAT issue using my tool: http://gitweb.freedesktop.org/?p=users/z3ro/revenge.git;a=summary While this particular case is not a serious issue, I am convinced that serious issues exist in our driver, and are possibly the reason(s) for the lockups. I would be willing to work on this if someone can give me some pointers about where our driver does indirect buffer submission, etc. Basically the path of drawing a simple triangle. I'd also like to hear some other people's thoughts on this... ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel