From patchwork Fri Oct 3 08:24:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 5023281 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1A8B9C11AB for ; Fri, 3 Oct 2014 15:43:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4D884201BB for ; Fri, 3 Oct 2014 15:43:44 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 42EB9201F5 for ; Fri, 3 Oct 2014 15:43:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D28066E727; Fri, 3 Oct 2014 08:43:40 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by gabe.freedesktop.org (Postfix) with ESMTP id 96573890C8; Fri, 3 Oct 2014 01:24:42 -0700 (PDT) Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NCV00MV20TTNI20@mailout2.w1.samsung.com>; Fri, 03 Oct 2014 09:27:29 +0100 (BST) X-AuditID: cbfec7f5-b7f776d000003e54-70-542e5d4775c8 Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id CB.0F.15956.74D5E245; Fri, 03 Oct 2014 09:24:39 +0100 (BST) Received: from AMDC1061.digital.local ([106.116.147.88]) by eusync3.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NCV007IE0OKK700@eusync3.samsung.com>; Fri, 03 Oct 2014 09:24:39 +0100 (BST) From: Andrzej Hajda To: dri-devel@lists.freedesktop.org (open list:DRM DRIVERS) Date: Fri, 03 Oct 2014 10:24:13 +0200 Message-id: <1412324653-30677-5-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1412324653-30677-1-git-send-email-a.hajda@samsung.com> References: <1412324653-30677-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprLLMWRmVeSWpSXmKPExsVy+t/xq7rusXohBuceMVncWneO1aL33Ekm i+Vn1jFbXPn6ns1i0v0JLBazJ2wGil1ez2jx4t5FFoveBVfZLM42vWG3uLxrDpvFjPP7mCzW HrnLbjFj8ks2Bz6PxXteMnls//aA1WPeyUCP+93HmTz6tqxi9Pi8SS6ALYrLJiU1J7MstUjf LoEr49+CPYwFFzkqXv1/yNrAuJq9i5GTQ0LAROLWzYUsELaYxIV769m6GLk4hASWMkpM7NzE CuH0MUncXPqBEaSKTUBT4u/mm0BVHBwiAtYS1ybJgtQwC/SySny70swMUiMsECJxp3Ei2AYW AVWJKb/Wgdm8As4SLUdus0Fsk5M4eWwyK4jNKeAi8bxnGpgtBFRz88FvtgmMvAsYGVYxiqaW JhcUJ6XnGukVJ+YWl+al6yXn525ihATp1x2MS49ZHWIU4GBU4uH9cEM3RIg1say4MvcQowQH s5II7+QovRAh3pTEyqrUovz4otKc1OJDjEwcnFINjHvfnWzJNVCrPSp/fsLTfF+T+6p3XISy V22a8dDCR9ffpujDFr45b7Qj9ZzKrS24rl0+UihoYJOX5JB2TmXBmUSlSK15AkcPnnnxeLvB 24C1eR13f8+/7LhdfQ7rJ6MPjn9DhZfqfHDc0MPkqTGH2XCSXXO+ue/X2u+zis+KtjbM/8bE ppKqrcRSnJFoqMVcVJwIALlgep8wAgAA X-Mailman-Approved-At: Fri, 03 Oct 2014 08:43:39 -0700 Cc: Kukjin Kim , Joonyoung Shim , David Airlie , "open list:INTEL DRM DRIVERS..." , Seung-Woo Kim , open list , Inki Dae , Andrzej Hajda , Kyungmin Park , "moderated list:ARM/S5P EXYNOS AR..." , "open list:DRM DRIVERS" , Daniel Vetter , Marek Szyprowski Subject: [Intel-gfx] [PATCH RFC 4/4] drm/exynos: correct connector->dpms field before resuming X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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 During system suspend after connector switch off its dpms field is set to connector previous dpms state. To properly resume dpms field should be set to its actual state (off) before resuming to previous dpms state. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/exynos/exynos_drm_drv.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index dca20b15..6746c5a 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c @@ -191,8 +191,12 @@ static int exynos_drm_resume(struct drm_device *dev) drm_modeset_lock_all(dev); list_for_each_entry(connector, &dev->mode_config.connector_list, head) { - if (connector->funcs->dpms) - connector->funcs->dpms(connector, connector->dpms); + if (connector->funcs->dpms) { + int old_dpms = connector->dpms; + + connector->dpms = DRM_MODE_DPMS_OFF; + connector->funcs->dpms(connector, old_dpms); + } } drm_modeset_unlock_all(dev);