Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752008AbbGIG0l (ORCPT ); Thu, 9 Jul 2015 02:26:41 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:18460 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751822AbbGIG0Y (ORCPT ); Thu, 9 Jul 2015 02:26:24 -0400 X-AuditID: cbfec7f4-f79c56d0000012ee-f3-559e140d5435 From: Andrzej Hajda To: inki.dae@samsung.com Cc: Andrzej Hajda , Marek Szyprowski , Kyungmin Park , b.zolnierkie@samsung.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND 3/6] drm/exynos/mixer: correct vsync configuration sequence Date: Thu, 09 Jul 2015 08:25:40 +0200 Message-id: <1436423143-22027-4-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1436423143-22027-1-git-send-email-a.hajda@samsung.com> References: <1436423143-22027-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupiluLIzCtJLcpLzFFi42I5/e/4VV1ekXmhBgdnC1vcWneO1WLjjPWs Fle+vmezmHR/AovF2aY37BaXd81hs1h75C67A7vH/e7jTB59W1YxenzeJBfAHMVlk5Kak1mW WqRvl8CVsXrKVMaCo9wV5/e3sjcwfuDsYuTkkBAwkdh//hg7hC0mceHeerYuRi4OIYGljBKn j/VCOU1MElNWLGQEqWIT0JT4u/kmG4gtIiAhMfPVRSYQm1ngHlDHCw0QW1ggROL9jJPMIDaL gKrE+r4nYL28As4SE0/sZ4LYJidx8thkVhCbU8BF4vafHrAaIaCaMyt2ME9g5F3AyLCKUTS1 NLmgOCk911CvODG3uDQvXS85P3cTIySEvuxgXHzM6hCjAAejEg9v4865oUKsiWXFlbmHGCU4 mJVEeDVWAoV4UxIrq1KL8uOLSnNSiw8xSnOwKInzzt31PkRIID2xJDU7NbUgtQgmy8TBKdXA OPHFmR7G3QvFrv0Se8dR0/8+/jP/72+clx3Dwhec//FvFnPAgYlTM0XUuds+nMjVmOD/huGX aiPvwjdVK/wu84TZ8LEuKyj7I75ZyYBdLofhfodVlC9/r8NcXrt3qQz6Net6tUvmSn4oD4xh 7frk+ePW/Cny/DkiLFcOV8QoHZZm+fzW6GC3EktxRqKhFnNRcSIA7Ls8oB0CAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1680 Lines: 47 Specification advises to clear vsync indicator before configuring vsync. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/exynos/exynos_mixer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index 0686484..b338a10 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -905,8 +905,8 @@ static int mixer_enable_vblank(struct exynos_drm_crtc *crtc) } /* enable vsync interrupt */ - mixer_reg_writemask(res, MXR_INT_EN, MXR_INT_EN_VSYNC, - MXR_INT_EN_VSYNC); + mixer_reg_writemask(res, MXR_INT_STATUS, ~0, MXR_INT_CLEAR_VSYNC); + mixer_reg_writemask(res, MXR_INT_EN, ~0, MXR_INT_EN_VSYNC); return 0; } @@ -917,6 +917,7 @@ static void mixer_disable_vblank(struct exynos_drm_crtc *crtc) struct mixer_resources *res = &mixer_ctx->mixer_res; /* disable vsync interrupt */ + mixer_reg_writemask(res, MXR_INT_STATUS, ~0, MXR_INT_CLEAR_VSYNC); mixer_reg_writemask(res, MXR_INT_EN, 0, MXR_INT_EN_VSYNC); } @@ -1045,6 +1046,8 @@ static void mixer_enable(struct exynos_drm_crtc *crtc) mixer_reg_writemask(res, MXR_STATUS, ~0, MXR_STATUS_SOFT_RESET); + if (ctx->int_en & MXR_INT_EN_VSYNC) + mixer_reg_writemask(res, MXR_INT_STATUS, ~0, MXR_INT_CLEAR_VSYNC); mixer_reg_write(res, MXR_INT_EN, ctx->int_en); mixer_win_reset(ctx); } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/