diff options
author | Dave Airlie <airlied@redhat.com> | 2019-01-10 15:29:26 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2019-01-10 15:29:31 -0500 |
commit | e3d093070eb0b5e3df668d3eb04100ea79343c65 (patch) | |
tree | 3b05c9566cbe17602da829bc8bf11e3e588e1672 /drivers/gpu | |
parent | a3115621c9341f288bb3468d72436e10f9c1573b (diff) | |
parent | 432973fd3a20102840d5f7e61af9f1a03c217a4c (diff) |
Merge tag 'tilcdc-4.22' of https://github.com/jsarha/linux into drm-next
tilcdc pull request for Linux v4.22
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Jyri Sarha <jsarha@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/cdf82a00-4e40-20a6-cc7d-3278dc23473e@ti.com
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/tilcdc/tilcdc_drv.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index 3dac08b24140..337e86a1d5ea 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c | |||
@@ -183,6 +183,12 @@ static void tilcdc_fini(struct drm_device *dev) | |||
183 | { | 183 | { |
184 | struct tilcdc_drm_private *priv = dev->dev_private; | 184 | struct tilcdc_drm_private *priv = dev->dev_private; |
185 | 185 | ||
186 | #ifdef CONFIG_CPU_FREQ | ||
187 | if (priv->freq_transition.notifier_call) | ||
188 | cpufreq_unregister_notifier(&priv->freq_transition, | ||
189 | CPUFREQ_TRANSITION_NOTIFIER); | ||
190 | #endif | ||
191 | |||
186 | if (priv->crtc) | 192 | if (priv->crtc) |
187 | tilcdc_crtc_shutdown(priv->crtc); | 193 | tilcdc_crtc_shutdown(priv->crtc); |
188 | 194 | ||
@@ -194,12 +200,6 @@ static void tilcdc_fini(struct drm_device *dev) | |||
194 | drm_mode_config_cleanup(dev); | 200 | drm_mode_config_cleanup(dev); |
195 | tilcdc_remove_external_device(dev); | 201 | tilcdc_remove_external_device(dev); |
196 | 202 | ||
197 | #ifdef CONFIG_CPU_FREQ | ||
198 | if (priv->freq_transition.notifier_call) | ||
199 | cpufreq_unregister_notifier(&priv->freq_transition, | ||
200 | CPUFREQ_TRANSITION_NOTIFIER); | ||
201 | #endif | ||
202 | |||
203 | if (priv->clk) | 203 | if (priv->clk) |
204 | clk_put(priv->clk); | 204 | clk_put(priv->clk); |
205 | 205 | ||
@@ -270,17 +270,6 @@ static int tilcdc_init(struct drm_driver *ddrv, struct device *dev) | |||
270 | goto init_failed; | 270 | goto init_failed; |
271 | } | 271 | } |
272 | 272 | ||
273 | #ifdef CONFIG_CPU_FREQ | ||
274 | priv->freq_transition.notifier_call = cpufreq_transition; | ||
275 | ret = cpufreq_register_notifier(&priv->freq_transition, | ||
276 | CPUFREQ_TRANSITION_NOTIFIER); | ||
277 | if (ret) { | ||
278 | dev_err(dev, "failed to register cpufreq notifier\n"); | ||
279 | priv->freq_transition.notifier_call = NULL; | ||
280 | goto init_failed; | ||
281 | } | ||
282 | #endif | ||
283 | |||
284 | if (of_property_read_u32(node, "max-bandwidth", &priv->max_bandwidth)) | 273 | if (of_property_read_u32(node, "max-bandwidth", &priv->max_bandwidth)) |
285 | priv->max_bandwidth = TILCDC_DEFAULT_MAX_BANDWIDTH; | 274 | priv->max_bandwidth = TILCDC_DEFAULT_MAX_BANDWIDTH; |
286 | 275 | ||
@@ -357,6 +346,17 @@ static int tilcdc_init(struct drm_driver *ddrv, struct device *dev) | |||
357 | } | 346 | } |
358 | modeset_init(ddev); | 347 | modeset_init(ddev); |
359 | 348 | ||
349 | #ifdef CONFIG_CPU_FREQ | ||
350 | priv->freq_transition.notifier_call = cpufreq_transition; | ||
351 | ret = cpufreq_register_notifier(&priv->freq_transition, | ||
352 | CPUFREQ_TRANSITION_NOTIFIER); | ||
353 | if (ret) { | ||
354 | dev_err(dev, "failed to register cpufreq notifier\n"); | ||
355 | priv->freq_transition.notifier_call = NULL; | ||
356 | goto init_failed; | ||
357 | } | ||
358 | #endif | ||
359 | |||
360 | if (priv->is_componentized) { | 360 | if (priv->is_componentized) { |
361 | ret = component_bind_all(dev, ddev); | 361 | ret = component_bind_all(dev, ddev); |
362 | if (ret < 0) | 362 | if (ret < 0) |