diff options
author | Prathyush K <prathyush.k@samsung.com> | 2012-12-06 09:46:02 -0500 |
---|---|---|
committer | Inki Dae <daeinki@gmail.com> | 2012-12-13 09:05:44 -0500 |
commit | 0703397039de7e87f780ebbf6283df7d89997075 (patch) | |
tree | 89e5ef4f383168e5c0eff73c477ca49a305e40c4 /drivers/gpu/drm | |
parent | 8137a2e21a3465d91d86b49cfebcc370438b77bd (diff) |
drm/exynos: move fimd wait_for_vblank to manager_ops
The wait for vblank callback is moved from overlay_ops to
manager_ops for fimd.
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_fimd.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 00bd266a31bb..1d46286adb30 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c | |||
@@ -308,12 +308,24 @@ static void fimd_disable_vblank(struct device *dev) | |||
308 | } | 308 | } |
309 | } | 309 | } |
310 | 310 | ||
311 | static void fimd_wait_for_vblank(struct device *dev) | ||
312 | { | ||
313 | struct fimd_context *ctx = get_fimd_context(dev); | ||
314 | int ret; | ||
315 | |||
316 | ret = wait_for((__raw_readl(ctx->regs + VIDCON1) & | ||
317 | VIDCON1_VSTATUS_VSYNC), 50); | ||
318 | if (ret < 0) | ||
319 | DRM_DEBUG_KMS("vblank wait timed out.\n"); | ||
320 | } | ||
321 | |||
311 | static struct exynos_drm_manager_ops fimd_manager_ops = { | 322 | static struct exynos_drm_manager_ops fimd_manager_ops = { |
312 | .dpms = fimd_dpms, | 323 | .dpms = fimd_dpms, |
313 | .apply = fimd_apply, | 324 | .apply = fimd_apply, |
314 | .commit = fimd_commit, | 325 | .commit = fimd_commit, |
315 | .enable_vblank = fimd_enable_vblank, | 326 | .enable_vblank = fimd_enable_vblank, |
316 | .disable_vblank = fimd_disable_vblank, | 327 | .disable_vblank = fimd_disable_vblank, |
328 | .wait_for_vblank = fimd_wait_for_vblank, | ||
317 | }; | 329 | }; |
318 | 330 | ||
319 | static void fimd_win_mode_set(struct device *dev, | 331 | static void fimd_win_mode_set(struct device *dev, |
@@ -593,22 +605,10 @@ static void fimd_win_disable(struct device *dev, int zpos) | |||
593 | win_data->enabled = false; | 605 | win_data->enabled = false; |
594 | } | 606 | } |
595 | 607 | ||
596 | static void fimd_wait_for_vblank(struct device *dev) | ||
597 | { | ||
598 | struct fimd_context *ctx = get_fimd_context(dev); | ||
599 | int ret; | ||
600 | |||
601 | ret = wait_for((__raw_readl(ctx->regs + VIDCON1) & | ||
602 | VIDCON1_VSTATUS_VSYNC), 50); | ||
603 | if (ret < 0) | ||
604 | DRM_DEBUG_KMS("vblank wait timed out.\n"); | ||
605 | } | ||
606 | |||
607 | static struct exynos_drm_overlay_ops fimd_overlay_ops = { | 608 | static struct exynos_drm_overlay_ops fimd_overlay_ops = { |
608 | .mode_set = fimd_win_mode_set, | 609 | .mode_set = fimd_win_mode_set, |
609 | .commit = fimd_win_commit, | 610 | .commit = fimd_win_commit, |
610 | .disable = fimd_win_disable, | 611 | .disable = fimd_win_disable, |
611 | .wait_for_vblank = fimd_wait_for_vblank, | ||
612 | }; | 612 | }; |
613 | 613 | ||
614 | static struct exynos_drm_manager fimd_manager = { | 614 | static struct exynos_drm_manager fimd_manager = { |