drm/rockchip: dsi2: disable BTA during auto calculation training

when DSI operates in auto calculation mode,it sends a dsc read
get_scanline request to the peripheral devices to automatically
calculate phy_max_rd_time_auto during the auto calculation training.
However,if the peripheral devices,such as a bridge chip or some panel,
lack the capability to respond to read-back requests,they cannot respond
to the DSI host’s BTA,leading to the signal control not being properly
returned to the DSI host,Therefore,the BTA function should be disabled
in such case.

Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: Iddac487ade3de49e73594e92ad2f7b537ddf2335
This commit is contained in:
Guochun Huang
2024-09-23 17:54:31 +08:00
committed by Tao Huang
parent 0e331cdb70
commit 042b41bb3c

View File

@@ -920,12 +920,16 @@ static void dw_mipi_dsi2_enable(struct dw_mipi_dsi2 *dsi2)
dw_mipi_dsi2_ipi_set(dsi2);
if (dsi2->auto_calc_mode) {
regmap_update_bits(dsi2->regmap, DSI2_DSI_GENERAL_CFG, BTA_EN, 0);
regmap_write(dsi2->regmap, DSI2_MODE_CTRL, AUTOCALC_MODE);
ret = regmap_read_poll_timeout(dsi2->regmap, DSI2_MODE_STATUS,
mode, mode == IDLE_MODE,
1000, MODE_STATUS_TIMEOUT_US);
if (ret < 0)
dev_err(dsi2->dev, "auto calculation training failed\n");
regmap_update_bits(dsi2->regmap, DSI2_DSI_GENERAL_CFG, BTA_EN, BTA_EN);
}
if (dsi2->mode_flags & MIPI_DSI_MODE_VIDEO)