mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
UPSTREAM: drm/tegra: dc: Don't set PLL clock to 0Hz
RGB output doesn't allow to change parent clock rate of the display and PCLK rate is set to 0Hz in this case. The tegra_dc_commit_state() shall not set the display clock to 0Hz since this change propagates to the parent clock. The DISP clock is defined as a NODIV clock by the tegra-clk driver and all NODIV clocks use the CLK_SET_RATE_PARENT flag. This bug stayed unnoticed because by default PLLP is used as the parent clock for the display controller and PLLP silently skips the erroneous 0Hz rate changes because it always has active child clocks that don't permit rate changes. The PLLP isn't acceptable for some devices that we want to upstream (like Samsung Galaxy Tab and ASUS TF700T) due to a display panel clock rate requirements that can't be fulfilled by using PLLP and then the bug pops up in this case since parent clock is set to 0Hz, killing the display output. Don't touch DC clock if pclk=0 in order to fix the problem. Change-Id: Id8bece2a314f354bacbab4e567d7fbd8470d1c3c Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2545937 Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Laxman Dewangan
parent
4657f58728
commit
f34bc1606f
@@ -1738,6 +1738,11 @@ static void tegra_dc_commit_state(struct tegra_dc *dc,
|
||||
dev_err(dc->dev,
|
||||
"failed to set clock rate to %lu Hz\n",
|
||||
state->pclk);
|
||||
|
||||
err = clk_set_rate(dc->clk, state->pclk);
|
||||
if (err < 0)
|
||||
dev_err(dc->dev, "failed to set clock %pC to %lu Hz: %d\n",
|
||||
dc->clk, state->pclk, err);
|
||||
}
|
||||
|
||||
DRM_DEBUG_KMS("rate: %lu, div: %u\n", clk_get_rate(dc->clk),
|
||||
@@ -1748,11 +1753,6 @@ static void tegra_dc_commit_state(struct tegra_dc *dc,
|
||||
value = SHIFT_CLK_DIVIDER(state->div) | PIXEL_CLK_DIVIDER_PCD1;
|
||||
tegra_dc_writel(dc, value, DC_DISP_DISP_CLOCK_CONTROL);
|
||||
}
|
||||
|
||||
err = clk_set_rate(dc->clk, state->pclk);
|
||||
if (err < 0)
|
||||
dev_err(dc->dev, "failed to set clock %pC to %lu Hz: %d\n",
|
||||
dc->clk, state->pclk, err);
|
||||
}
|
||||
|
||||
static void tegra_dc_stop(struct tegra_dc *dc)
|
||||
|
||||
Reference in New Issue
Block a user