Closed rpavlik closed 7 years ago
OK, this one is ready for review - I tested it locally on my HDK2, seems to improve behavior on AMD cards.
So it's related to HMD itself (not GPU, etc), right? So it means that it's smart to test if HMD works with this patch reverted 1st, right? (better performance or power consumption?)
I do also wonder how -HDMI_VERBOSE.hex differs. Do they put more info on serial interface, does they cause performance degradation (or something), that they aren't default option?
This is on legacy hardware from years ago, and it fixes a bug with some headsets and gpu combinations, as mentioned in the description. It doesn't hurt the ones that don't technically need it, it just makes it more reliable for everyone. The difference between polling and interrupts here is pretty negligible.
This is open source, you can see how the VERBOSE build differs :) IIRC it spews more junk to the serial output about the HDMI handshake and setup process, "debug print" type things, and it's pretty typical to turn those off in "production" builds.
Some units do not appear to successfully pass interrupts from the Toshiba chip to the XMEGA - some in all cases, some miss only occasional interrupts. These commits re-enable polling of the status register (checking bit 7 - rather than the full value) - but do so within the overall framework of the firmware which already has a mechanism for periodic video input status polling, rather than using a timer/counter as in old HDK2 code. (Adapting this periodic polling mechanism to use a timer/counter is a potential future enhancement if the polling regularity created by such a change is beneficial in some way, however, we'd have to be careful to avoid collision with other users of the timer/counter peripherals.)
See the commit message as for why acting on interrupts was disabled entirely - we may want to make this a configuration define in case future hardware using the TC chip have functional interrupts.
This branch needs more testing before merging. It only modifies HDK2 code, however.