Detect HDMI Hot plug at user space

HI, All

we have a question about HDMI Hotplug at Jeston NX

we want to provide user-space application a mechanism /event to know HDMI cable is plug or unplugged,
but we don’t konw how to implement at the driver level as well as user-space framework,
any code can we refer at Linux?

 Thanks for advance 

BRs
Stephen