What is the best way to check at run time if a device tree overlay is loaded?
I've found info about checking individual GPIO pin status, and info about how to load the overlay (via config.txt), but I'm not finding info about how to check if the actual device tree overlay is loaded. I am specifically interested in knowing if the dpi24 overlay is active.
EDIT: There are 2 reasons I asked this question:
I have an OpenGL program that runs on a RPi, and it needs to display differently depending on whether video is going directly to a monitor or it has been redirected to the GPIO pins (via the dpi24 overlay). Sure, I could add a command line switch or some other type of config parameter, but that violates the DRY principle, as well as introducing the possibility of the user choosing the wrong answer and then there is an inconsistency to resolve.
I searched and read thru a bunch of info and didn't find the answer. It should be possible to do this, but appears to be undocumented (or not easy to find). So in addition to the DRY reason, I'm now also curious about it.
sudo ls -R /sys
to a file. Reboot it without the overlay applied, do the same thing, diff the files. This should at least give you a starting point for poking around. If you figure it out and have time, please leave an answer of your own.