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

drm/tegra: dc: Make sure to set the module clock rate

When applying the PLL changes from the computed state object, make sure
to set the rate of the display controller module clock. Failing to do so
can yield to a situation where the parent will be set to the proper
pixel clock, but the module clock will be divided down to the rate that
is happened to be set to before the parent rate change.

Signed-off-by: Thierry Reding <treding@nvidia.com>

+5
+5
drivers/gpu/drm/tegra/dc.c
··· 1138 1138 1139 1139 value = SHIFT_CLK_DIVIDER(state->div) | PIXEL_CLK_DIVIDER_PCD1; 1140 1140 tegra_dc_writel(dc, value, DC_DISP_DISP_CLOCK_CONTROL); 1141 + 1142 + err = clk_set_rate(dc->clk, state->pclk); 1143 + if (err < 0) 1144 + dev_err(dc->dev, "failed to set clock %pC to %lu Hz: %d\n", 1145 + dc->clk, state->pclk, err); 1141 1146 } 1142 1147 1143 1148 static void tegra_dc_stop(struct tegra_dc *dc)