[PATCH 3/4] drm-bridge: lontium lt9611c: fixes and improvements
From: Mohit Dsor
Date: Wed Jun 10 2026 - 17:17:32 EST
Remove two redundant lt9611c_reset() calls:
1. In lt9611c_bridge_atomic_pre_enable(): a reset is already performed
during probe and resume; calling it again on every display enable
adds ~440ms of unnecessary latency.
2. At the end of lt9611c_probe(): a reset was already performed earlier
in probe before lt9611c_lock(). The second reset is redundant.
Also, the DRM HDMI bridge framework requires hdmi_write_hdmi_infoframe and
hdmi_clear_hdmi_infoframe callbacks for HDMI vendor-specific infoframe
(VSI) support, used for features such as HDR metadata signalling.
This patch add stub implementations that return success. Wire them into the bridge
function table.
Also, Store the chip variant enum value in the of_match_table .data field and
retrieve it via of_device_get_match_data() when probing from a DT node.
Fall back to i2c_device_id.driver_data for non-DT (e.g. ACPI) probe
paths.
This is the standard kernel pattern for passing per-compatible data
through the OF match table, and avoids relying solely on the I2C device
ID table for chip type detection when DT is available.
Populate bridge.vendor and bridge.product so the DRM HDMI framework can
report the correct manufacturer and product name in the HDMI connector
properties (visible via xrandr --prop and related sysfs entries).
Signed-off-by: Mohit Dsor <mohit.dsor@xxxxxxxxxxxxxxxx>
---
drivers/gpu/drm/bridge/lontium-lt9611c.c | 31 ++++++++++++++++++++++++++-----
1 file changed, 26 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/bridge/lontium-lt9611c.c b/drivers/gpu/drm/bridge/lontium-lt9611c.c
index b0402726367e..fe51f4978546 100644
--- a/drivers/gpu/drm/bridge/lontium-lt9611c.c
+++ b/drivers/gpu/drm/bridge/lontium-lt9611c.c
@@ -622,7 +622,6 @@ static void lt9611c_bridge_atomic_pre_enable(struct drm_bridge *bridge,
ret = regulator_bulk_enable(ARRAY_SIZE(lt9611c->supplies), lt9611c->supplies);
if (ret)
dev_err(lt9611c->dev, "regulator bulk enable failed.\n");
- lt9611c_reset(lt9611c);
}
static void lt9611c_bridge_atomic_enable(struct drm_bridge *bridge,
@@ -777,6 +776,17 @@ static int lt9611c_hdmi_clear_avi_infoframe(struct drm_bridge *bridge)
return 0;
}
+static int lt9611c_hdmi_write_hdmi_infoframe(struct drm_bridge *bridge,
+ const u8 *buffer, size_t len)
+{
+ return 0;
+}
+
+static int lt9611c_hdmi_clear_hdmi_infoframe(struct drm_bridge *bridge)
+{
+ return 0;
+}
+
static int lt9611c_hdmi_write_audio_infoframe(struct drm_bridge *bridge,
const u8 *buffer, size_t len)
{
@@ -895,6 +905,8 @@ static const struct drm_bridge_funcs lt9611c_bridge_funcs = {
.hdmi_tmds_char_rate_valid = lt9611c_hdmi_tmds_char_rate_valid,
.hdmi_write_avi_infoframe = lt9611c_hdmi_write_avi_infoframe,
.hdmi_clear_avi_infoframe = lt9611c_hdmi_clear_avi_infoframe,
+ .hdmi_write_hdmi_infoframe = lt9611c_hdmi_write_hdmi_infoframe,
+ .hdmi_clear_hdmi_infoframe = lt9611c_hdmi_clear_hdmi_infoframe,
.hdmi_write_audio_infoframe = lt9611c_hdmi_write_audio_infoframe,
.hdmi_clear_audio_infoframe = lt9611c_hdmi_clear_audio_infoframe,
@@ -1025,6 +1037,13 @@ static int lt9611c_probe(struct i2c_client *client)
lt9611c->dev = dev;
lt9611c->client = client;
lt9611c->chip_type = id->driver_data;
+
+ if (dev->of_node) {
+ lt9611c->chip_type = (uintptr_t)of_device_get_match_data(dev);
+ } else {
+ lt9611c->chip_type = id->driver_data;
+ }
+
ret = devm_mutex_init(dev, <9611c->ocm_lock);
if (ret)
return dev_err_probe(dev, ret, "failed to init mutex\n");
@@ -1111,6 +1130,9 @@ static int lt9611c_probe(struct i2c_client *client)
DRM_BRIDGE_OP_HDMI_AUDIO;
lt9611c->bridge.type = DRM_MODE_CONNECTOR_HDMIA;
+ lt9611c->bridge.vendor = "Lontium";
+ lt9611c->bridge.product = "LT9611C";
+
lt9611c->bridge.hdmi_audio_dev = dev;
lt9611c->bridge.hdmi_audio_max_i2s_playback_channels = 8;
lt9611c->bridge.hdmi_audio_dai_port = 2;
@@ -1136,7 +1158,6 @@ static int lt9611c_probe(struct i2c_client *client)
lt9611c->hdmi_connected = false;
i2c_set_clientdata(client, lt9611c);
enable_irq(client->irq);
- lt9611c_reset(lt9611c);
return 0;
@@ -1214,9 +1235,9 @@ static struct i2c_device_id lt9611c_id[] = {
};
static const struct of_device_id lt9611c_match_table[] = {
- { .compatible = "lontium,lt9611c" },
- { .compatible = "lontium,lt9611ex" },
- { .compatible = "lontium,lt9611uxd" },
+ { .compatible = "lontium,lt9611c", .data = (void *)CHIP_LT9611C },
+ { .compatible = "lontium,lt9611ex", .data = (void *)CHIP_LT9611EX },
+ { .compatible = "lontium,lt9611uxd", .data = (void *)CHIP_LT9611UXD },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, lt9611c_match_table);
--
2.34.1