I have an HTPC connected to an AVR via DisplayPort. Initially the input on the AVR is set to the HTPC and I get the signal on the TV. When I then switch the input on the AVR to something else the Display Port on the HTPC is disabled and a new one is created / set to connected.
I can see this in /sys/class/drm when card0-DP-2 vanishes and card0-DP-3 is created and set to connected. After the next switch of the input card0-DP-3 vanishes and card0-DP-4 is created.
Using xrandr -q I initially see only DisplayPort-2. When switching inputs on the AVR DisplayPort-3 is created.
I tried to set X.org to the correct Display Port using udev to trigger a small script that restarts XORG and Kodi but after the second switch http://X.org/Kodi seem to hang and cannot be restarted. xrandr -q is hanging as well.