If DDC/CI is supported across HDMI/DisplayPort connection

If DDC/CI is supported across HDMI/DisplayPort connection?

I have a TX2 devkit and PrismaECO-eDP LCD Panel Controller, which supports VESA DDC/CI. But the ddc does not work. I’d like to know if DDC/CI is supported in the driver?

I just checked but found not much info. Looks like no support.

According to the following post, NVIDIA drivers has a bug which will make ddcutil not able to get monitor info through HW i2c on Pascal.

https://devtalk.nvidia.com/default/topic/1038239/linux/survey-gddccontrol-issues-with-nvidia-drivers-i2c-monitor-display-ddc-/post/5276250/#5276250

A workaround for this bug is to use software I2C, as documented by http://www.ddcutil.com/nvidia/

We can specify it by adding the following option to /etc/X11/xorg.conf.d

Option     "RegistryDwords"  "RMUseSwI2c=0x01; RMI2cSpeed=100"

Or change the nvidia kernel module parameters by adding /etc/modprobe.d/nvidia.conf

options nvidia NVreg_RegistryDwords=RMUseSwI2c=0x01;RMI2cSpeed=100

I have tried the workaround with Ubuntu Desktop and it works. Unfortunately, I still can not make it work with TX2.

Have any ideas?

robin.qxcao,

The link you shared is for desktop host. That driver is not the same one as what you are using on tegra.

What is the purpose of this issue here?

I have a display connected with TX2 using HDMI cable, and I’d like to control the display brightness using the vesa DDC/CI protocol. But no displays can be detected using the ddcutil or ddccontrol tool. As I understand it, the DDC/CI protocol is based on I2C.

I’m wondering is there anything special that needs to be done when detecting and communicating with a I2C device on the TX2.

I posted the link for desktop just because the purpose of that issue is very similar.

Something quite interesting (at least to me) which I just recently became aware of is that after the initial EDID query the power is disabled to the i2c for DDC for power saving. Try enabling i2c DDC power rails first before you do whatever it is you are working on:

sudo echo 1 > /sys/kernel/debug/tegra_hdmi/ddc_power_toggle

(disable would of course be “echo 0”)

Hi linuxdev,

Thank you so much for the info. I’m not sure if this is a good solution to my problem, but it did work like magic. The display brightness can be changed using DDC/CI protocol after enabling i2c DDC power using:

echo 1 > /sys/kernel/debug/tegra_hdmi/ddc_power_toggle

robin.qxcao,

My apology if using “ddcutil” is the original question you are asking. I thought you were asking something like if our BSP has such tools provided.

Hi WayneWWW,

Thanks for the reply!

Could you please confirm if the solution proposed by linuxdev is good for a user-space app such as ddcutil? Or is it only for debugging?

Does the driver disable ddc just for power saving? Or is it for supporting both DP and HDMI?

The following is the function in driver to disable ddc:

// kernel/display/drivers/video/tegra/dc/hdmi2.0.c
static inline void _tegra_hdmi_ddc_disable(struct tegra_hdmi *hdmi)
{
    mutex_lock(&hdmi->ddc_refcount_lock);

    if (WARN_ONCE(hdmi->ddc_refcount <= 0, "ddc refcount imbalance"))
        goto fail;
    if (--hdmi->ddc_refcount != 0)
        goto fail;

    /*   
     * hdmi uses i2c lane muxed on dpaux1 pad.
     * Disable dpaux1 pads.
     */
    tegra_dpaux_pad_power(hdmi->dpaux, false);
    tegra_hdmi_put(hdmi->dc);
    tegra_dpaux_clk_dis(hdmi->dpaux);
    tegra_powergate_partition(hdmi->dpaux->powergate_id);

fail:
    mutex_unlock(&hdmi->ddc_refcount_lock);
}

Yes, that is only for debug use.

Our hdmi driver only enables ddc power when there is request for doing edid read.
Below are the codes where we need to do such operations.

_tegra_hdmi_ddc_disable(hdmi); in tegra_hdmi_ddc_i2c_xfer() 
 _tegra_hdmi_ddc_disable(hdmi); in tegra_hdmi_scdc_read() 
 _tegra_hdmi_ddc_disable(hdmi); in tegra_hdmi_scdc_write() 
 _tegra_hdmi_ddc_disable(hdmi); in tegra_dc_hdmi_ddc_disable() 
 _tegra_hdmi_ddc_disable(dc_hdmi); in tegra_hdmi_ddc_power_toggle()

As for dp, I don’t see we toggle any dpaux power during edid read. It should be always readable.

@linuxdev
@WayneWWW
@robin.qxcao

I am able to change HDMI display brightness with ddcutil, same is not working for DP display. Is there any commands/utilities to change DP display brightness?

Thanks,
Arun

That’s one I don’t know the answer to.

@WayneWWW

Do you have any inputs here.
DP display brightness control is one of the important requirements for us.

Thanks,
Arun

As what I already shared in your post, the only interface we have now is the dpaux debugfs to directly communicate with kernel. If you know how ddcutil is implemented, then maybe you can write similar tool for debugfs too.

And besides DDC/CI, currently there is no other method to configure DP brightness on jetson either.