mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
drm/meson: gate px_clk when setting rate
Disable the px_clk when setting the rate to recover a fully
configured and correctly reset VCLK clock tree after the rate
is set.
Fixes: 77d9e1e6b8 ("drm/meson: add support for MIPI-DSI transceiver")
Reviewed-by: Nicolas Belin <nbelin@baylibre.com>
Link: https://lore.kernel.org/r/20240403-amlogic-v6-4-upstream-dsi-ccf-vim3-v12-4-99ecdfdc87fc@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240403-amlogic-v6-4-upstream-dsi-ccf-vim3-v12-4-99ecdfdc87fc@linaro.org
This commit is contained in:
@@ -95,6 +95,7 @@ static int dw_mipi_dsi_phy_init(void *priv_data)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clk_disable_unprepare(mipi_dsi->px_clk);
|
||||||
ret = clk_set_rate(mipi_dsi->px_clk, mipi_dsi->mode->clock * 1000);
|
ret = clk_set_rate(mipi_dsi->px_clk, mipi_dsi->mode->clock * 1000);
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
@@ -103,6 +104,12 @@ static int dw_mipi_dsi_phy_init(void *priv_data)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret = clk_prepare_enable(mipi_dsi->px_clk);
|
||||||
|
if (ret) {
|
||||||
|
dev_err(mipi_dsi->dev, "Failed to enable DSI Pixel clock (ret %d)\n", ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
switch (mipi_dsi->dsi_device->format) {
|
switch (mipi_dsi->dsi_device->format) {
|
||||||
case MIPI_DSI_FMT_RGB888:
|
case MIPI_DSI_FMT_RGB888:
|
||||||
dpi_data_format = DPI_COLOR_24BIT;
|
dpi_data_format = DPI_COLOR_24BIT;
|
||||||
|
|||||||
Reference in New Issue
Block a user