From patchwork Tue Dec 4 14:26:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prathyush K X-Patchwork-Id: 1838011 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 1F025DF230 for ; Tue, 4 Dec 2012 14:14:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 05FE6E6388 for ; Tue, 4 Dec 2012 06:14:03 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by gabe.freedesktop.org (Postfix) with ESMTP id E02E3E6019 for ; Tue, 4 Dec 2012 06:05:29 -0800 (PST) Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MEI00AKKF525CS0@mailout1.samsung.com> for dri-devel@lists.freedesktop.org; Tue, 04 Dec 2012 23:05:29 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.125]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 60.EF.12699.8230EB05; Tue, 04 Dec 2012 23:05:29 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-e6-50be032881ed Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 10.EF.12699.8230EB05; Tue, 04 Dec 2012 23:05:28 +0900 (KST) Received: from localhost.localdomain ([107.108.73.106]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MEI00F96F2AW000@mmp2.samsung.com> for dri-devel@lists.freedesktop.org; Tue, 04 Dec 2012 23:05:28 +0900 (KST) From: Prathyush K To: dri-devel@lists.freedesktop.org Subject: [PATCH 3/3] drm/exynos: do not disable crtc if already off Date: Tue, 04 Dec 2012 19:56:51 +0530 Message-id: <1354631211-30346-3-git-send-email-prathyush.k@samsung.com> X-Mailer: git-send-email 1.7.0.4 In-reply-to: <1354631211-30346-1-git-send-email-prathyush.k@samsung.com> References: <1354631211-30346-1-git-send-email-prathyush.k@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDLMWRmVeSWpSXmKPExsWyRsSkVleTeV+AwbevTBZXvr5nc2D0uN99 nCmAMYrLJiU1J7MstUjfLoEro/HSB/aCKZwVPduvszUw3mHvYuTkkBAwkehe8pANwhaTuHBv PZDNxSEksJRRYtbvC2wwRbOP97BCJKYzSky+eoIVJCEksJpJ4vuNehCbTUBb4tecu2BxEQFl ib8TVzGC2MwCEhJH2s+CDRIWcJbYceATE4jNIqAq8WzSCjCbV8BdYlXPB0aIZQoSrcsOgV3H KeAhse3qEqhd7hI/t15lg+gVkPg2+RBLFyMHUL2sxKYDzCC3SQhcZpN4t3cmK8QcSYmDK26w TGAUXsDIsIpRNLUguaA4KT3XSK84Mbe4NC9dLzk/dxMjMAhP/3smvYNxVYPFIUYBDkYlHt4F L/YECLEmlhVX5h5ilOBgVhLhVfiwN0CINyWxsiq1KD++qDQntfgQow/QJROZpUST84ERklcS b2hsYm5qbGppZGRmaopDWEmct9kjJUBIID2xJDU7NbUgtQhmHBMHp1QDY1RW0ZegHW8v7Fuy o/3CwepgoXcqwkKB6Zzzd6z/lzmTcVJq8I9d9t0v/xkKbXrV0CPElRO6uudT+veIUzdVBRSF X7vO+RSePSmouLGc+cE3Re0lXeet3/jGzvq8SGbpU6mOedtDVjblTmQ8PecSo/zNsOKfZVyL phx5WpxfI6sScejSmYvrS5RYijMSDbWYi4oTAUweDVVvAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmkeLIzCtJLcpLzFFi42I5/e+xoK4G874Ag4YlFhZXvr5nc2D0uN99 nCmAMaqB0SYjNTEltUghNS85PyUzL91WyTs43jne1MzAUNfQ0sJcSSEvMTfVVsnFJ0DXLTMH aKySQlliTilQKCCxuFhJ3w7ThNAQN10LmMYIXd+QILgeIwM0kLCGMaPx0gf2gimcFT3br7M1 MN5h72Lk5JAQMJGYfbyHFcIWk7hwbz1bFyMXh5DAdEaJyVdPgCWEBFYzSXy/UQ9iswloS/ya cxcsLiKgLPF34ipGEJtZQELiSPtZNhBbWMBZYseBT0wgNouAqsSzSSvAbF4Bd4lVPR8YIZYp SLQuOwR2BKeAh8S2q0ugdrlL/Nx6lW0CI+8CRoZVjKKpBckFxUnpuUZ6xYm5xaV56XrJ+bmb GMEh/kx6B+OqBotDjAIcjEo8vAte7AkQYk0sK67MPcQowcGsJMKr8GFvgBBvSmJlVWpRfnxR aU5q8SFGH6CrJjJLiSbnA+MvryTe0NjE3NTY1NLEwsTMEoewkjhvs0dKgJBAemJJanZqakFq Ecw4Jg5OqQZGE9Y/ouElRld8tX+vKRVwMuTmuO6U/y/P91h35aYl0k+e2/CdLTLnrp6ScrN7 oad12l2vBVf+hrVtazteynZQTEj/tEECy5xr8YyrJr5WXWA/4dcEwfx/BjLXpbMc3cOMr8Tp JU0Oe2SUfXvHnNJ12+fKaTXySp++WCzRodzEYZ9/JPRf8TQlluKMREMt5qLiRADgNaK/ngIA AA== X-CFilter-Loop: Reflected X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org The crtc disable function should not disable the overlays if the crtc is already in DPMS_OFF as this will lead to register access when clock is off. Also the crtc disable function should not call DPMS OFF of the crtc. This is required to ensure we are able to wait for vblank before freeing any framebuffers after disabling the crtc. Signed-off-by: Prathyush K --- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index 2efa4b0..faa6ee0 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c @@ -186,8 +186,12 @@ static void exynos_drm_crtc_disable(struct drm_crtc *crtc) DRM_DEBUG_KMS("%s\n", __FILE__); + if (exynos_crtc->dpms > DRM_MODE_DPMS_ON) { + DRM_DEBUG_KMS("crtc is already off.\n"); + return; + } + exynos_plane_dpms(exynos_crtc->plane, DRM_MODE_DPMS_OFF); - exynos_drm_crtc_dpms(crtc, DRM_MODE_DPMS_OFF); } static struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = {