Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753847AbbLJIzP (ORCPT ); Thu, 10 Dec 2015 03:55:15 -0500 Received: from lucky1.263xmail.com ([211.157.147.132]:38834 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751136AbbLJIzN (ORCPT ); Thu, 10 Dec 2015 03:55:13 -0500 X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 X-RL-SENDER: ykk@rock-chips.com X-FST-TO: inki.dae@samsung.com X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: ykk@rock-chips.com X-UNIQUE-TAG: <8dd3386fc96f247810a42cd29349b275> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 From: Yakir Yang To: Inki Dae , Mark Yao , Jingoo Han , Heiko Stuebner Cc: Thierry Reding , Krzysztof Kozlowski , Rob Herring , Andrzej Hajda , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Russell King , emil.l.velikov@gmail.com, Gustavo Padovan , Kishon Vijay Abraham I , ajaynumb@gmail.com, javier@osg.samsung.com, Andy Yan , Yakir Yang , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v10 18/19] drm: bridge: analogix/dp: add panel prepare/unprepare in suspend/resume time Date: Thu, 10 Dec 2015 16:52:59 +0800 Message-Id: <1449737579-13417-1-git-send-email-ykk@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1449470239-30667-1-git-send-email-ykk@rock-chips.com> References: <1449470239-30667-1-git-send-email-ykk@rock-chips.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1640 Lines: 60 Turn off the panel power in suspend time would help to reduce power waste. Signed-off-by: Yakir Yang --- This patch was introduced in v10.1, suggested by Heiko Changes in v10: None Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index f5047ac..79ba88e 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1364,6 +1364,12 @@ int analogix_dp_suspend(struct device *dev) struct analogix_dp_device *dp = dev_get_drvdata(dev); clk_disable_unprepare(dp->clock); + + if (dp->plat_data->panel) { + if (drm_panel_unprepare(dp->plat_data->panel)) + DRM_ERROR("failed to turnoff the panel\n"); + } + return 0; } EXPORT_SYMBOL_GPL(analogix_dp_suspend); @@ -1379,6 +1385,13 @@ int analogix_dp_resume(struct device *dev) return ret; } + if (dp->plat_data->panel) { + if (drm_panel_prepare(dp->plat_data->panel)) { + DRM_ERROR("failed to setup the panel\n"); + return -EBUSY; + } + } + return 0; } EXPORT_SYMBOL_GPL(analogix_dp_resume); -- 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/