diff options
author | Hoegeun Kwon <hoegeun.kwon@samsung.com> | 2017-01-05 05:20:06 -0500 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2017-01-30 18:49:31 -0500 |
commit | e87eb57c69003a99b18d43abe58d5850ad19e188 (patch) | |
tree | af73e579202b6649319447ce57f06fbac1ee03cc | |
parent | a5b2b6ebf34b20e70a2bdb5214c371744e7fa260 (diff) |
drm/exynos: mic: Add mode_set callback function
Before applying the patch, used the of_get_videomode function to
parse the display-timings in the panel which is the child driver
of dsi in the devicetree. this is wrong. So removed the
of_get_videomode and fixed to get videomode struct through
mode_set callback function.
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_mic.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c index a0def0be6d65..fed1a940ca5d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_mic.c +++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c | |||
@@ -286,13 +286,6 @@ static int parse_dt(struct exynos_mic *mic) | |||
286 | } | 286 | } |
287 | nodes[j++] = remote_node; | 287 | nodes[j++] = remote_node; |
288 | 288 | ||
289 | ret = of_get_videomode(remote_node, | ||
290 | &mic->vm, 0); | ||
291 | if (ret) { | ||
292 | DRM_ERROR("mic: failed to get videomode"); | ||
293 | goto exit; | ||
294 | } | ||
295 | |||
296 | break; | 289 | break; |
297 | default: | 290 | default: |
298 | DRM_ERROR("mic: Unknown endpoint from MIC"); | 291 | DRM_ERROR("mic: Unknown endpoint from MIC"); |
@@ -329,6 +322,17 @@ already_disabled: | |||
329 | mutex_unlock(&mic_mutex); | 322 | mutex_unlock(&mic_mutex); |
330 | } | 323 | } |
331 | 324 | ||
325 | static void mic_mode_set(struct drm_bridge *bridge, | ||
326 | struct drm_display_mode *mode, | ||
327 | struct drm_display_mode *adjusted_mode) | ||
328 | { | ||
329 | struct exynos_mic *mic = bridge->driver_private; | ||
330 | |||
331 | mutex_lock(&mic_mutex); | ||
332 | drm_display_mode_to_videomode(mode, &mic->vm); | ||
333 | mutex_unlock(&mic_mutex); | ||
334 | } | ||
335 | |||
332 | static void mic_pre_enable(struct drm_bridge *bridge) | 336 | static void mic_pre_enable(struct drm_bridge *bridge) |
333 | { | 337 | { |
334 | struct exynos_mic *mic = bridge->driver_private; | 338 | struct exynos_mic *mic = bridge->driver_private; |
@@ -377,6 +381,7 @@ static void mic_enable(struct drm_bridge *bridge) { } | |||
377 | static const struct drm_bridge_funcs mic_bridge_funcs = { | 381 | static const struct drm_bridge_funcs mic_bridge_funcs = { |
378 | .disable = mic_disable, | 382 | .disable = mic_disable, |
379 | .post_disable = mic_post_disable, | 383 | .post_disable = mic_post_disable, |
384 | .mode_set = mic_mode_set, | ||
380 | .pre_enable = mic_pre_enable, | 385 | .pre_enable = mic_pre_enable, |
381 | .enable = mic_enable, | 386 | .enable = mic_enable, |
382 | }; | 387 | }; |