I thought Target Display Mode was dead for newer Macs. Realize that is only to be used as a display...I think.
My iMac is from 2009. I have tested TDM on it from my Retina 2015.
Target Display Mode was stopped being supported when they moved to 5K, the hypothesis at the time was there were some technical difficulties driving the 5K display over Thunderbolt 2. Part of me hopes with the new M1 Mac's that they bring back Target Display Mode because it was a cool feature and since it's firmware you can run something like a headless Linux server on the iMac whilst still using it as a display (I've got a 2011 iMac that eventually will end up there). When I look back I miss the days of old when the MBP came with every port that you could need with some extra features that were useful (miniTOS in the 3.5mm audio jack). It feels like Jony pushed radical simplification too far and with any luck that needle will move back towards the features that help the Pro community now he's left. Not that we need to go all the way back but would it kill them to put a HDMI port in?