I resolved a few initial code issues, but the use of cursor plane freezes the system. The only good news here is that I do see a cursor on the screen. Apparently. the code is accessing the correct source address of the cursor pattern, and transferring it to the correct VRAM address reserved for a hardware cursor. Figuring out the correct way to do this was the biggest obstacle for implementing cursor plane code. I had to analyze DRM core code related to cursor callbacks to figure out what goes on inside the DRM core, and then use the knowledge gained from analyzing the code to write the cursor plane code.
The bug that is freezing the system currently appears to get triggered when a frame buffer is released. This appears to be a new bug introduced with the new TTM memory allocator I wrote fairly recently. As a result of having this bug, currently OpenChrome DRM will crash the system if one tries to change the screen resolution from a lower screen resolution to a higher screen resolution during runtime. I will now go figure out why this is happening.
What strategies do you use to debug this kind of issue?
I will provide updates on cursor plane implementation status during my presentation at XDC2019 next week. Stay tuned!