<div dir="ltr">Hello,<div><br></div><div>DDC/CI is an interface that allows changing of display settings like brightness, contrast, colors, selection of input.</div><div><br>DDC/CI implemented in i915 driver operates over I2C with a hard-coded speed of 100KHz.<br><br>This speed works for most of the displays, but not all of them.</div><div><br>Would you consider lowering the default speed of I2C to support additional displays?<br><br>Does the change below look acceptable, or do you expect some issues with it?<br><pre class="gmail-code gmail-highlight" lang="diff"><span class="gmail-gh">diff --git a/drivers/gpu/drm/i915/display/intel_gmbus.c b/drivers/gpu/drm/i915/display/intel_gmbus.c</span>
<span class="gmail-gh">index e9e4dcf34..88aba021e 100644</span>
<span class="gmail-gd">--- a/drivers/gpu/drm/i915/display/intel_gmbus.c</span>
<span class="gmail-gi">+++ b/drivers/gpu/drm/i915/display/intel_gmbus.c</span>
<span class="gmail-p">@@ -200,7 +200,7 @@</span> bool intel_gmbus_is_valid_pin(struct drm_i915_private *i915, unsigned int pin)
/* Intel GPIO access functions */
<span class="gmail-gd">-#define I2C_RISEFALL_TIME 10</span>
<span class="gmail-gi">+#define I2C_RISEFALL_TIME 5</span>
static inline struct intel_gmbus *
to_intel_gmbus(struct i2c_adapter *i2c)
<span class="gmail-p">@@ -916,7 +916,7 @@</span> int intel_gmbus_setup(struct drm_i915_private *i915)
bus->adapter.retries = 1;
/* By default use a conservative clock rate */
<span class="gmail-gd">- bus->reg0 = pin | GMBUS_RATE_100KHZ;</span>
<span class="gmail-gi">+ bus->reg0 = pin | GMBUS_RATE_50KHZ;</span>
/* gmbus seems to be broken on i830 */
if (IS_I830(i915))
</pre><br>I have tested this change by recompiling my system kernel. The change fixes DDC/CI for one of my displays, while not breaking any other displays that I had.<br><br>What would be even more flexible is some way to change the speed run-time or boot-time. I can try to implement it if you suggest what mechanism to use for that. Otherwise, would you accept a simple change of lowering the speed?<br><br>Related issue <a href="https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11528">https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11528</a><br><br>--<br>Maciej Wójcik<br></div></div>