diff options
author | Thierry Reding <treding@nvidia.com> | 2014-12-19 09:19:21 -0500 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2015-01-27 04:14:56 -0500 |
commit | 3f0fb52ef013e76159b35386f22924f99d8034a4 (patch) | |
tree | d6378cbe5c1dc692c39b781463801ce84fdccf3e /drivers/gpu/drm/tegra/rgb.c | |
parent | 1503ca47d76e184eaeabe7cfa31de97b5ec36a04 (diff) |
drm/tegra: Remove unused ->mode_fixup() callbacks
All output drivers have now been converted to use the ->atomic_check()
callback, so the ->mode_fixup() callbacks are no longer used.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/rgb.c')
-rw-r--r-- | drivers/gpu/drm/tegra/rgb.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/drivers/gpu/drm/tegra/rgb.c b/drivers/gpu/drm/tegra/rgb.c index be1b38936dbe..0c8b458b2364 100644 --- a/drivers/gpu/drm/tegra/rgb.c +++ b/drivers/gpu/drm/tegra/rgb.c | |||
@@ -129,43 +129,6 @@ static void tegra_rgb_encoder_dpms(struct drm_encoder *encoder, int mode) | |||
129 | { | 129 | { |
130 | } | 130 | } |
131 | 131 | ||
132 | static bool tegra_rgb_encoder_mode_fixup(struct drm_encoder *encoder, | ||
133 | const struct drm_display_mode *mode, | ||
134 | struct drm_display_mode *adjusted) | ||
135 | { | ||
136 | struct tegra_output *output = encoder_to_output(encoder); | ||
137 | unsigned long pclk = mode->clock * 1000; | ||
138 | struct tegra_rgb *rgb = to_rgb(output); | ||
139 | unsigned int div; | ||
140 | int err; | ||
141 | |||
142 | /* | ||
143 | * We may not want to change the frequency of the parent clock, since | ||
144 | * it may be a parent for other peripherals. This is due to the fact | ||
145 | * that on Tegra20 there's only a single clock dedicated to display | ||
146 | * (pll_d_out0), whereas later generations have a second one that can | ||
147 | * be used to independently drive a second output (pll_d2_out0). | ||
148 | * | ||
149 | * As a way to support multiple outputs on Tegra20 as well, pll_p is | ||
150 | * typically used as the parent clock for the display controllers. | ||
151 | * But this comes at a cost: pll_p is the parent of several other | ||
152 | * peripherals, so its frequency shouldn't change out of the blue. | ||
153 | * | ||
154 | * The best we can do at this point is to use the shift clock divider | ||
155 | * and hope that the desired frequency can be matched (or at least | ||
156 | * matched sufficiently close that the panel will still work). | ||
157 | */ | ||
158 | div = ((clk_get_rate(rgb->clk) * 2) / pclk) - 2; | ||
159 | |||
160 | err = tegra_dc_setup_clock(rgb->dc, rgb->clk_parent, pclk, div); | ||
161 | if (err < 0) { | ||
162 | dev_err(output->dev, "failed to setup DC clock: %d\n", err); | ||
163 | return false; | ||
164 | } | ||
165 | |||
166 | return true; | ||
167 | } | ||
168 | |||
169 | static void tegra_rgb_encoder_prepare(struct drm_encoder *encoder) | 132 | static void tegra_rgb_encoder_prepare(struct drm_encoder *encoder) |
170 | { | 133 | { |
171 | } | 134 | } |
@@ -278,7 +241,6 @@ tegra_rgb_encoder_atomic_check(struct drm_encoder *encoder, | |||
278 | 241 | ||
279 | static const struct drm_encoder_helper_funcs tegra_rgb_encoder_helper_funcs = { | 242 | static const struct drm_encoder_helper_funcs tegra_rgb_encoder_helper_funcs = { |
280 | .dpms = tegra_rgb_encoder_dpms, | 243 | .dpms = tegra_rgb_encoder_dpms, |
281 | .mode_fixup = tegra_rgb_encoder_mode_fixup, | ||
282 | .prepare = tegra_rgb_encoder_prepare, | 244 | .prepare = tegra_rgb_encoder_prepare, |
283 | .commit = tegra_rgb_encoder_commit, | 245 | .commit = tegra_rgb_encoder_commit, |
284 | .mode_set = tegra_rgb_encoder_mode_set, | 246 | .mode_set = tegra_rgb_encoder_mode_set, |