I am currently looking for a way to detect when a monitor is connected or disconnected via DisplayPort in an application. However, I am struggling due to my limited knowledge.
I thought it could be detected through udev events, but when I ran udevadm monitor and tried plugging and unplugging the DisplayPort, no event information was displayed. Since event information does flow when USB devices are plugged in and out, I believe the command itself is functioning.
If there are any good methods to detect the connection and disconnection of DisplayPort on an Orin nano board, I would appreciate your guidance.
Hi, Trumany. Thank you for your response. I have some remaining questions about the content you provided.
Based on the information given as an example on the reference page, am I correct in understanding that a good practice for verifying the connection and disconnection of DP is to ‘poll the HPD gpio information in the file system’? If that’s the case, I have the following concerns:
In my environment (Orin NX on Orin Nano board), it seems that the file /sys/kernel/debug/tegra_gpio mentioned on the reference page does not exist. Should I be using /sys/kernel/debug/gpio instead?
When using the method of polling HPD gpio for verification, I am concerned that it becomes difficult to detect the plugging and unplugging beyond a user-attached hub, etc. Is there a better way to handle this?
I apologize for any inconvenience due to my lack of knowledge and thank you for your assistance.
Thank you for your response.
I understand that you believe there is a lack of proper device tree support in my environment.
However, based on your reply, I am still not clear on what you think is suitable for detecting plug and unplug events.
Are you suggesting that if the device tree is correctly set up, udev events should occur and that would be appropriate?
Additionally, this issue occurs with Display Port when I flash the OrinNx on Orin Nano sample board using jetson-orin-nano-devkit-nvme.conf. Which sample conf or dts should I use in this case? Or, is there no dts that addresses Display Port HPD specifically for the Orin Nano board?
It might be a repetition of what was confirmed with Methods to detect the connection and disconnection of DisplayPort - #5 by koichi.tanoiri , but I would like to confirm: the HPD functionality in the Orin environment does not trigger udev events or similar, but is rather a feature for polling the state of HPD, is that correct? (Or, if it is a function to detect pure GPIO Low-to-High/High-to-Low interrupts, then my following question remains the same.) In that case, I am also concerned about the question I asked earlier. If a user connects a hub or similar device to the outside of the devkit, would it be correct to understand that detecting plug and play via the HPD functionality in the Orin Nano environment becomes difficult (or is unsupported)?
I understand that as the system for Orin, the HPD is handled via the SFIO pin and controlled by the display driver. My misunderstanding led us off-topic, but the main issue is about “appropriate methods for applications running on Orin to detect the results of Orin’s detection.” If there is a suitable method, I would appreciate it if you could let me know. (When I was using HDMI on Tx2, I used to check with udev events, but it seems that udev events do not occur for Orin Displayport, so I am curious if there is an appropriate alternative.)
Also, I would be grateful if you could inform me whether the method you suggested can detect situations such as being DaisyChain connected as a DisplayPort. (For example, I am thinking it might be difficult to accommodate cases like DaisyChaining just by checking HPD’s high/low.)