Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/rockchip: inno_hdmi: Move ddc/i2c configuration and HOTPLUG unmute to inno_hdmi_init_hw

Putting these scattered initialization code together is helpful
for the following migration to the DRM bridge driver mode.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20250512124615.2848731-6-andyshrk@163.com

authored by

Andy Yan and committed by
Heiko Stuebner
52ac749b 55137487

+15 -15
+15 -15
drivers/gpu/drm/rockchip/inno_hdmi.c
··· 620 620 hdmi_modb(hdmi, HDMI_SYS_CTRL, msk, val); 621 621 622 622 inno_hdmi_standby(hdmi); 623 + 624 + /* 625 + * When the controller isn't configured to an accurate 626 + * video timing and there is no reference clock available, 627 + * then the TMDS clock source would be switched to PCLK_HDMI, 628 + * so we need to init the TMDS rate to PCLK rate, and 629 + * reconfigure the DDC clock. 630 + */ 631 + if (hdmi->refclk) 632 + inno_hdmi_i2c_init(hdmi, clk_get_rate(hdmi->refclk)); 633 + else 634 + inno_hdmi_i2c_init(hdmi, clk_get_rate(hdmi->pclk)); 635 + 636 + /* Unmute hotplug interrupt */ 637 + hdmi_modb(hdmi, HDMI_STATUS, m_MASK_INT_HOTPLUG, v_MASK_INT_HOTPLUG(1)); 623 638 } 624 639 625 640 static int inno_hdmi_disable_frame(struct drm_connector *connector, ··· 1314 1299 goto err_disable_clk; 1315 1300 } 1316 1301 1317 - /* 1318 - * When the controller isn't configured to an accurate 1319 - * video timing and there is no reference clock available, 1320 - * then the TMDS clock source would be switched to PCLK_HDMI, 1321 - * so we need to init the TMDS rate to PCLK rate, and 1322 - * reconfigure the DDC clock. 1323 - */ 1324 - if (hdmi->refclk) 1325 - inno_hdmi_i2c_init(hdmi, clk_get_rate(hdmi->refclk)); 1326 - else 1327 - inno_hdmi_i2c_init(hdmi, clk_get_rate(hdmi->pclk)); 1328 - 1329 1302 ret = inno_hdmi_register(drm, hdmi); 1330 1303 if (ret) 1331 1304 goto err_put_adapter; 1332 1305 1333 1306 dev_set_drvdata(dev, hdmi); 1334 - 1335 - /* Unmute hotplug interrupt */ 1336 - hdmi_modb(hdmi, HDMI_STATUS, m_MASK_INT_HOTPLUG, v_MASK_INT_HOTPLUG(1)); 1337 1307 1338 1308 ret = devm_request_threaded_irq(dev, irq, inno_hdmi_hardirq, 1339 1309 inno_hdmi_irq, IRQF_SHARED,