Issue with HDMI Extcon

The disp-state extcon is reporting wrong for hdmi. Instead of filling forward from HDMI to HDMI2, etc for each plugged display; it fills backwards from HDMI4 to HDMI3, etc.

I first saw this on android on the rel-shield-r kernel on t210, but I have reproduced on l4t r35.1 on t194 as well. Attached is a patch to kernel/nvidia that rectifies the issue.

0001-video-tegra-Use-first-free-hdmi-extcon-slot.patch (624 Bytes)

Hi,
Thanks for the patch. We will check and review it.

Hi @Steel01

Are you saying that it causes you got a wrong mapping in sysfs node?

For example, you expect first extcon should be HDMI0, but it turns out the reversed order. Is this the issue you want to say?

root@galen:/sys/class/extcon/extcon0# cat state
HDMI=0
DP=0
AUDIO_AUX0=0
AUDIO_AUX1=0
AUDIO_AUX2=1
AUDIO_AUX3=0
DSIHPD=0
HDMI2=0
HDMI3=0
HDMI4=1

I would expect the first plugged hdmi device to be assigned HDMI. But instead, it gets assigned HDMI4.

Hi,

Did you hit any error with current setup? I mean even without your patch.

No explicit user-facing errors, no. Just an obviously wrong value being reported by extcon.

I was debugging an issue with hdmi displays not initializing properly when booting a kernel via rcmboot (which is not a supported case to my knowledge, hence not reporting that) and saw the incorrect disp-state extcon value, so I started researching the issue. Reproduced the problem on multiple kernel branches. When I found the cause and fixed it, I thought I should send the patch in to get the issue fixed on future official kernel releases.

Hi,

We don’t guarantee the map of:
HDMI output, the first head → HDMI
HDMI output the second head → HDMI2

Thus, we won’t merge your fix. Also, the free cable ID is assigned based on the probing order, so even with your patch, the cable ID gets changed if the DT setting is changing.

Not guaranteeing that is fine. But I do want to point out that the commit message that added this support does say that mapping should happen in the order you describe as not being guaranteed. See:

https://nv-tegra.nvidia.com/r/gitweb?p=linux-nvidia.git;a=commit;h=5fdceddd13629b98094fe702b4455f6f37cb604c

What currently happens is the exact opposite of the intent described here.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.