From patchwork Thu Jul 31 17:42:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Kumar X-Patchwork-Id: 4658431 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 42B379F2B8 for ; Thu, 31 Jul 2014 17:45:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 793562011D for ; Thu, 31 Jul 2014 17:45:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8F11E20145 for ; Thu, 31 Jul 2014 17:45:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753178AbaGaRpr (ORCPT ); Thu, 31 Jul 2014 13:45:47 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:34902 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753080AbaGaRpp (ORCPT ); Thu, 31 Jul 2014 13:45:45 -0400 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N9L00KPJ808HHA0@mailout1.samsung.com>; Fri, 01 Aug 2014 02:45:44 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.123]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id C6.95.19786.8C08AD35; Fri, 01 Aug 2014 02:45:44 +0900 (KST) X-AuditID: cbfee68e-b7fab6d000004d4a-d0-53da80c86f22 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 77.AA.04943.8C08AD35; Fri, 01 Aug 2014 02:45:44 +0900 (KST) Received: from chromebld-server.sisodomain.com ([107.108.73.106]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N9L00GWZ7ZJ9070@mmp1.samsung.com>; Fri, 01 Aug 2014 02:45:44 +0900 (KST) From: Ajay Kumar To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, thierry.reding@gmail.com Cc: inki.dae@samsung.com, seanpaul@google.com, ajaynumb@gmail.com, jg1.han@samsung.com, joshi@samsung.com, prashanth.g@samsung.com, Ajay Kumar Subject: [PATCH 07/15] drm/exynos: dsi: Add support for panel prepare and unprepare routines Date: Thu, 31 Jul 2014 23:12:06 +0530 Message-id: <1406828534-10072-8-git-send-email-ajaykumar.rs@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1406828534-10072-1-git-send-email-ajaykumar.rs@samsung.com> References: <1406828534-10072-1-git-send-email-ajaykumar.rs@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpnkeLIzCtJLcpLzFFi42JZI2JSrXui4VawweTFIhYH3h9ksdjwZiGz xfwj51gtrnx9z2Yx6f4EFovLCy+xWnzf9YXdYsb5fUwWqw5vYLeYezDX4ueueSwO3B47Z91l 91iwqdTjfvdxJo++LasYPT5vkgtgjeKySUnNySxLLdK3S+DKaF00maXgEnfFj2372BsYH3N2 MXJySAiYSEy484gRwhaTuHBvPVsXIxeHkMBSRokvc44xwhT1nL8OlVjEKPH52yZGCGcCk8T1 h1fAqtgEtCW2Tb/JAmKLCNRJ7F9+H6yIWWAto8TTeZPBEsICcRKXp+xm72Lk4GARUJU4e0Ac JMwr4CHx4O0asLCEgILEnEk2IGFOAU+Jqb2XwcJCQCXPjqeBTJQQ2MYusffKdXaQGhYBAYlv kw+xQLTKSmw6wAxxs6TEwRU3WCYwCi9gZFjFKJpakFxQnJReZKRXn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v0l5d5ecS7/vP8f554L+AaXfjyiPM/RR/fziRf1O14PNlx52G fN+tvA/dsvr+6ZjePIXHaVV1TnIMLg/Yth8S6NfvZVX86s5pej9r+6rfd5kf5hxx2r/6i6QS S3FGoqEWc1FxIgDaFD0PyQIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Modify exynos_dsi driver to support the new panel calls: prepare and unprepare. Signed-off-by: Ajay Kumar Acked-by: Inki Dae --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index dc7c80b..4834932 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1351,7 +1351,7 @@ static int exynos_dsi_enable(struct exynos_dsi *dsi) if (ret < 0) return ret; - ret = drm_panel_enable(dsi->panel); + ret = drm_panel_prepare(dsi->panel); if (ret < 0) { exynos_dsi_poweroff(dsi); return ret; @@ -1360,6 +1360,13 @@ static int exynos_dsi_enable(struct exynos_dsi *dsi) exynos_dsi_set_display_mode(dsi); exynos_dsi_set_display_enable(dsi, true); + ret = drm_panel_enable(dsi->panel); + if (ret < 0) { + exynos_dsi_set_display_enable(dsi, false); + exynos_dsi_poweroff(dsi); + return ret; + } + dsi->state |= DSIM_STATE_ENABLED; return 0; @@ -1370,8 +1377,9 @@ static void exynos_dsi_disable(struct exynos_dsi *dsi) if (!(dsi->state & DSIM_STATE_ENABLED)) return; - exynos_dsi_set_display_enable(dsi, false); drm_panel_disable(dsi->panel); + exynos_dsi_set_display_enable(dsi, false); + drm_panel_unprepare(dsi->panel); exynos_dsi_poweroff(dsi); dsi->state &= ~DSIM_STATE_ENABLED;