From patchwork Mon Jul 27 14:12:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 6888811 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 82BEAC05AC for ; Wed, 29 Jul 2015 01:07:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A8DC22071C for ; Wed, 29 Jul 2015 01:07:12 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 68D81205EE for ; Wed, 29 Jul 2015 01:07:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BC1256EB31; Tue, 28 Jul 2015 18:07:09 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by gabe.freedesktop.org (Postfix) with ESMTPS id 127236E969 for ; Mon, 27 Jul 2015 07:12:44 -0700 (PDT) Received: by wicgb10 with SMTP id gb10so114331309wic.1 for ; Mon, 27 Jul 2015 07:12:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=KSQgf+bL1HLmyNUDaNuIqduUOxnMZI+CyW0JdSkqOeI=; b=APlwFePDlGNRBytyFPv8XsA61YMvwa0E2Ei85gRqFiKN7sl8ujTcGT38da5ksvobdz X3MC6BGHUIzbVcAbB7b8PN8m11az6BHOysr0dTQXKjk0PSwh+QuZd94VufegC6ihH8jI ZZCbRDwbhr8BQe7/pTyCKdwH0qyqkgArH7zLSIMvjIoWHnYxqxaD72M0uQZ1L0DIbot3 3K2fsRpzMTAnICZajtiV+p9JLBKZXmao3Iddr3zC9Ex7hxLSgvnHE4xOEtsgoYoHWPq7 sDusl4IyBPxLW6hnCqvcSVwXuF5jI7DCMIYo/KkXCN7gFs6bl5CJrbeUmY3MiyVtT6S8 RYxQ== X-Gm-Message-State: ALoCoQm2bEQMfD8XFh8frIEsYnwt6nLRRw5fAiIymHN4nasEidQh+QR0iKRCDL3n/kRBkglkIEYZ X-Received: by 10.194.122.132 with SMTP id ls4mr52567209wjb.130.1438006363121; Mon, 27 Jul 2015 07:12:43 -0700 (PDT) Received: from srini-ThinkPad-X1-Carbon-2nd.dlink.com (host-78-147-3-201.as13285.net. [78.147.3.201]) by smtp.gmail.com with ESMTPSA id lm5sm13851494wic.22.2015.07.27.07.12.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Jul 2015 07:12:42 -0700 (PDT) From: Srinivas Kandagatla To: robdclark@gmail.com, dri-devel@lists.freedesktop.org Subject: [PATCH] drm/msm: add calls to prepare and unprepare panel Date: Mon, 27 Jul 2015 15:12:39 +0100 Message-Id: <1438006359-16850-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 X-Mailman-Approved-At: Tue, 28 Jul 2015 18:07:08 -0700 Cc: linux-arm-msm@vger.kernel.org, Srinivas Kandagatla , linux-kernel@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Prepare the panel before it's enabled and un-prepare after disable, this will make sure that the regulators are switched on and off correctly. Tested it on APQ8064 based IFC6410 with panel. Signed-off-by: Srinivas Kandagatla --- drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c index c048433..4cd6e72 100644 --- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c +++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c @@ -346,8 +346,10 @@ static void mdp4_lcdc_encoder_disable(struct drm_encoder *encoder) mdp4_write(mdp4_kms, REG_MDP4_LCDC_ENABLE, 0); - if (panel) + if (panel) { drm_panel_disable(panel); + drm_panel_unprepare(panel); + } /* * Wait for a vsync so we know the ENABLE=0 latched before @@ -412,8 +414,10 @@ static void mdp4_lcdc_encoder_enable(struct drm_encoder *encoder) if (ret) dev_err(dev->dev, "failed to enable lcdc_clk: %d\n", ret); - if (panel) + if (panel) { + drm_panel_prepare(panel); drm_panel_enable(panel); + } setup_phy(encoder);