diff options
author | Inki Dae <inki.dae@samsung.com> | 2012-08-17 18:35:47 +0900 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2012-10-04 10:06:00 +0900 |
commit | 3d05859fd78bbc0b04cca929aea494f5e6b8235b (patch) | |
tree | aaafec776f63997bfa6c3ea116051c552ce787d7 /drivers/gpu/drm/exynos/exynos_mixer.c | |
parent | 479cbc3eeed060879dc89652e497d7719f7ee1dc (diff) | |
download | op-kernel-dev-3d05859fd78bbc0b04cca929aea494f5e6b8235b.zip op-kernel-dev-3d05859fd78bbc0b04cca929aea494f5e6b8235b.tar.gz |
drm/exynos: make sure that hardware overlay for hdmi is disabled
the values set to registers will be updated into real registers
at vsync so dma operation could be malfunctioned when accessed
to memory after gem buffer was released. this patch makes sure
that hw overlay is disabled before the gem buffer is released.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_mixer.c')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_mixer.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index 25b97d5e..8a43ee1 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -726,6 +726,18 @@ static void mixer_dpms(void *ctx, int mode) } } +static void mixer_wait_for_vblank(void *ctx) +{ + struct mixer_context *mixer_ctx = ctx; + struct mixer_resources *res = &mixer_ctx->mixer_res; + int ret; + + ret = wait_for((mixer_reg_read(res, MXR_INT_STATUS) & + MXR_INT_STATUS_VSYNC), 50); + if (ret < 0) + DRM_DEBUG_KMS("vblank wait timed out.\n"); +} + static void mixer_win_mode_set(void *ctx, struct exynos_drm_overlay *overlay) { @@ -818,6 +830,7 @@ static struct exynos_mixer_ops mixer_ops = { .dpms = mixer_dpms, /* overlay */ + .wait_for_vblank = mixer_wait_for_vblank, .win_mode_set = mixer_win_mode_set, .win_commit = mixer_win_commit, .win_disable = mixer_win_disable, |