From patchwork Mon Jun 11 12:24:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 138231 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp3990859lji; Mon, 11 Jun 2018 05:25:16 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK4CR8HiBrb+YYoVu83hmvjRK3tfXrK6DpgY9HkoH1qn0EOndlzEUOnTmDVbO1wI+bfJEMK X-Received: by 2002:a63:7c55:: with SMTP id l21-v6mr14914553pgn.352.1528719916195; Mon, 11 Jun 2018 05:25:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528719916; cv=none; d=google.com; s=arc-20160816; b=Ga0J5d7lNXxYMId9v+LDBQ8QHPeD79DcDcdsBdRsYceiKoyp6iM9X/J4z0WRIBVkFz v0Lp/seFpUOWkT82CeLjmoclrawBki/Z6TBRa0oohCGpYf7PGDJtSPgXNibOasgHDH14 OJgN1Iwmg7Fs30+Cj+zjrJNha2P7AUKTTpMfsQD3AqOK7X5ABsYz3E3SDTk3I6SKPcIc btzkRa3DUpaaUJTNZl0VB8PRhEV6hhOylKdwx9GlwizWdT5+0rqjQZRiKdfl0/irqjse llzv2zj1nxNCnybW2CF44kfg7ECG+clTw/Lzz2p/Eg+oM0kO3lS4ziHMPpEhV7N49xsj v9dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=jlY6pRvOQ45WMcM28LnzGPqsWsMcns4tGOVQXX4S+x4=; b=LjlRa4DCWuAL3PDefKyzWto7sCp2ogKzl5gL7EkcgxDff4pv7QrmsvH2hhpiWjWB3C JvfM0OW0Hs2ZzH/SNG8g+GhwvczomWslRmFbnr3YoA0fs2xbX6Y7zfamWcdJY4zxTFYA EI4A23bBZhIhNTIeXkDN3C1OvTFccRBpK5jCm2rWUWRoUIfpU2T+ntBIme6HXsPGSZZO 3PqaG9ZggbfhHHJiuYRzewvu8oatWDvc0cMXwWCnNZTdfFaX6zKR9Cs/ZeZkFBUn7dVx oqKISSgedZp2wgAfF2/OBajtrW7OA1Aj2VrA8J3JUxO0dFaRUvUisYFOPa9BmYvgrC87 7uog== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=kuzNCJ3r; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y15-v6si14596657pgv.452.2018.06.11.05.25.15; Mon, 11 Jun 2018 05:25:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=kuzNCJ3r; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932925AbeFKMZP (ORCPT + 3 others); Mon, 11 Jun 2018 08:25:15 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:57876 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932894AbeFKMZO (ORCPT ); Mon, 11 Jun 2018 08:25:14 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180611122512euoutp0222478b66de38adec4886d858b4fc2d28~3Gqkoym8Q1582915829euoutp02o; Mon, 11 Jun 2018 12:25:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180611122512euoutp0222478b66de38adec4886d858b4fc2d28~3Gqkoym8Q1582915829euoutp02o DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1528719912; bh=TTz0F0GooLjCqFkdIF08FfHuNjfNUdhJ4InuChlgpFs=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=kuzNCJ3ri6e7CA5kmERtdSYg//wWJEg7OYIPPA7wg9dSEq+OLNbVIdrz+qdqEYYpj XaY6z5E1U3cCL5k7EwaZMXimzkRNKGlRB+kEXmD/zZk9kkYsxWO+/5gSzlYqXqJQ6B Jsv0RtGTq3h13RCZS7mjRlTO2vKYkyfaCN2qTtD4= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180611122511eucas1p2e1f2fb5196c05bfe80ab4fc98ba91520~3GqjscH6W0810608106eucas1p2l; Mon, 11 Jun 2018 12:25:11 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 4F.0E.17380.62A6E1B5; Mon, 11 Jun 2018 13:25:11 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180611122510eucas1p192066be0ac16e18e17522a40d1fe2d1d~3GqizA5Uv0388103881eucas1p1b; Mon, 11 Jun 2018 12:25:10 +0000 (GMT) X-AuditID: cbfec7f4-b4fc79c0000043e4-ea-5b1e6a26f9c6 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id AF.54.04178.62A6E1B5; Mon, 11 Jun 2018 13:25:10 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PA500JG3RTSPN30@eusync1.samsung.com>; Mon, 11 Jun 2018 13:25:10 +0100 (BST) From: Marek Szyprowski To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Inki Dae , Seung-Woo Kim , Andrzej Hajda , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski Subject: [PATCH 1/3] drm/exynos: Drop useless check from exynos_drm_{suspend,resume} Date: Mon, 11 Jun 2018 14:24:58 +0200 Message-id: <20180611122500.11587-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20180611122500.11587-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrJIsWRmVeSWpSXmKPExsWy7djP87rqWXLRBncrLW6tO8dqsXHGelaL K1/fs1lMuj+BxeL8+Q3sFjPO72OyWHvkLpA1+SWbA4fHplWdbB73u48zefRtWcXo8XmTXABL FJdNSmpOZllqkb5dAlfG6Y/9TAWTOCs+r1RpYLzL3sXIySEhYCJxeN9Fti5GLg4hgRWMEp07 3jFDOJ8ZJV5c/cgKUzX58TNWiMQyRomZ/0+yQzgNTBIT13QyglSxCRhKdL3tYgOxRQTcJJoO zwTrYAYralkAtlBYIExi2pTNYEUsAqoSJw61M4PYvAK2Ekd3zWWBWCcvsXrDAaA4BwengJ3E rj4hkDkSAn9ZJd5Me8wIUeMi0TbrK1S9sMSr41ugHpKR6Ow4yATR0Mwo0T5jFjuE08MosXXO DjaIKmuJw8cvgj3HLMAnMWnbdLBtEgK8Eh1tQhAlHhJTFsyCenMio8TnWctYJzBKLmBkWMUo nlpanJueWmyUl1quV5yYW1yal66XnJ+7iREYgaf/Hf+yg3HXn6RDjAIcjEo8vArpstFCrIll xZW5hxglOJiVRHi9FOSihXhTEiurUovy44tKc1KLDzFKc7AoifPGadRFCQmkJ5akZqemFqQW wWSZODilGhj9XY9Pcgi55rz3p8O7N6tkrCQ6w/hkQ8NalNd113OY8NxaphvX3by84n+Anfl7 oR8xx2s2/InQ5BdZ77y/borgLKZsAVWzUrfHIuJhCZrrmTx7A2svXux3+3Hg0KLl+3u5b61Y +U7l8I7lbI+7Nh7+2LuN7X3Dx9nr1Pper/w7Kflc99ODe5KUWIozEg21mIuKEwGmXutkvAIA AA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjluLIzCtJLcpLzFFi42I5/e/4ZV21LLlog9+HBS1urTvHarFxxnpW iytf37NZTLo/gcXi/PkN7BYzzu9jslh75C6QNfklmwOHx6ZVnWwe97uPM3n0bVnF6PF5k1wA SxSXTUpqTmZZapG+XQJXxumP/UwFkzgrPq9UaWC8y97FyMkhIWAiMfnxM9YuRi4OIYEljBLt fQ/ZIZwmJolVu/6zgVSxCRhKdL3tArNFBNwkmg7PBOtgBim60rYTbJSwQJjEtCmbwYpYBFQl ThxqZwaxeQVsJY7umssCsU5eYvWGA0BxDg5OATuJXX1CIGEhoJItKyazT2DkWcDIsIpRJLW0 ODc9t9hQrzgxt7g0L10vOT93EyMwdLYd+7l5B+OljcGHGAU4GJV4eBXSZaOFWBPLiitzDzFK cDArifB6KchFC/GmJFZWpRblxxeV5qQWH2KU5mBREuc9b1AZJSSQnliSmp2aWpBaBJNl4uCU amDkOXD4S50922eRM0Fs2mbLOr2fsIf4dCR9Ktt37sTMw0c3hUr9PpmaFOi0wFrSWVvw/3rT 5P+iNvcd9m3459zQmj+zZEuPj+DqGn5zEYEDJ3giuXWun+R9PzfTbPr51ZYRXxPsebZd8m1g U72Z3/Fc8tTxT5vEF/XGV53e4RPIGxx8XeJaao0SS3FGoqEWc1FxIgApHkxbGQIAAA== X-CMS-MailID: 20180611122510eucas1p192066be0ac16e18e17522a40d1fe2d1d X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180611122510eucas1p192066be0ac16e18e17522a40d1fe2d1d References: <20180611122500.11587-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The virtual Exynos DRM device has no runtime PM enabled, so checking for its runtime suspended state is useless. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/exynos/exynos_drm_drv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.17.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index a81b4a5e24a7..c0b4a03ae1b6 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c @@ -153,7 +153,7 @@ static int exynos_drm_suspend(struct device *dev) struct drm_device *drm_dev = dev_get_drvdata(dev); struct exynos_drm_private *private; - if (pm_runtime_suspended(dev) || !drm_dev) + if (!drm_dev) return 0; private = drm_dev->dev_private; @@ -175,8 +175,8 @@ static int exynos_drm_resume(struct device *dev) struct drm_device *drm_dev = dev_get_drvdata(dev); struct exynos_drm_private *private; - if (pm_runtime_suspended(dev) || !drm_dev) - return 0; + if (!drm_dev) + return; private = drm_dev->dev_private; drm_atomic_helper_resume(drm_dev, private->suspend_state); From patchwork Mon Jun 11 12:24:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 138230 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp3990845lji; Mon, 11 Jun 2018 05:25:15 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLZ4l/Eaav2pxDV8232IWT/aNr339P/Ihg/a7WnhC3iqqiPzB4CoO8+0LEixRxJrhgaJIlZ X-Received: by 2002:a62:86c3:: with SMTP id x186-v6mr17383976pfd.4.1528719915715; Mon, 11 Jun 2018 05:25:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528719915; cv=none; d=google.com; s=arc-20160816; b=0KY7+q8dRwzjR+s0MZ8x+I0yNocNoWIjoeKNmTj30lmhUIvIqLIXz+wkWA7KwyQoAE mnrgap2xZuveajc+Ky6mIWY3gbrWRrgwwsInMRmBvTpYHMXdLLN15TQOH9k49ue+Y6Zm kxvl9r8fOl56zSgj+8Llm8o3kQyqyjbcZychk70ip9Q1mSfy9LEtfi2V8TYpQ9fff85A iI1wKXq9dCbc2JXQ0NpGbnESabu9eBPi4b1VwnlIpGwsPT0gi66ma7onv1q2mMhHvsWI G+JxBQt+K8A6fvLpB0+ADydP3xpAOFrSCppbn4tW3PezOq8CEMAaeG1LscMwPq9Zc5Qc KVrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=RNb+2C4KfiqsZ/QKrwJO+fD1YYEI60dVdhv5fj3FH7Q=; b=LvVhmXWr6Ro/Z/gy2g/M48kihbfCUusIfqnmJrVNWNZt81XppMQwHqPqlq27yK948Q /28t4fMawnIZunFwk1C6pce48aIZc/a5YF1NYE3w+LRFR3GHnoG8ryXrl66NEikO/brX GzwCowstxwPBuSGLtuCJm3OYywuqJO2Ufc/ZDzcbQHuu0nPmPqyykUMC0ml3LjrDP3x7 gsJ3t69RCyPjnzYQhXkMwcuJ4GZzdovMc9aSrWKkbATWsGYCl77/Lx0mpnFWll3IxqH4 kG672ebcwAVXCIGoOT/t+BbD28q8sGYGvXDPnXjj0tVKWCt7TffH1AEZwvAceVvPRjGh zp4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=U5elwYAn; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y15-v6si14596657pgv.452.2018.06.11.05.25.15; Mon, 11 Jun 2018 05:25:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=U5elwYAn; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932913AbeFKMZO (ORCPT + 3 others); Mon, 11 Jun 2018 08:25:14 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:41773 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932910AbeFKMZO (ORCPT ); Mon, 11 Jun 2018 08:25:14 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180611122512euoutp017681f4f49ec27af3e48603ec43e7fc8d~3Gqkpn4Rd0601206012euoutp01Z; Mon, 11 Jun 2018 12:25:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180611122512euoutp017681f4f49ec27af3e48603ec43e7fc8d~3Gqkpn4Rd0601206012euoutp01Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1528719912; bh=0D7xSowVUQJJd3aZN4x/nzTF51xFDT8uJOBd/tgBBsA=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=U5elwYAnJ1kwTNZhrIw0KPosJyXro6DiHLo9AL/3/CxnoiiZDinvlEhg9Au32uqo3 8kJpE5XFfYNg7wmK4D6RVewJO+agrCFptibW/l6IsXVjlnICU9l2wEnNhzfpJEJHH0 uhnxukdT/OQ6pUw58mNKsZrLUKGdGsrMofSFXvyw= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180611122511eucas1p1b46b6ed5804678afaef76e6ecd043a9e~3Gqj8eoMa0826408264eucas1p1_; Mon, 11 Jun 2018 12:25:11 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id EF.0E.17380.72A6E1B5; Mon, 11 Jun 2018 13:25:11 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180611122510eucas1p113bca5fb6c23a5e6a3357dc1efb362e2~3GqjK6VTb3174631746eucas1p16; Mon, 11 Jun 2018 12:25:10 +0000 (GMT) X-AuditID: cbfec7f4-6f9ff700000043e4-eb-5b1e6a2710f4 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 30.64.04178.62A6E1B5; Mon, 11 Jun 2018 13:25:10 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PA500JG3RTSPN30@eusync1.samsung.com>; Mon, 11 Jun 2018 13:25:10 +0100 (BST) From: Marek Szyprowski To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Inki Dae , Seung-Woo Kim , Andrzej Hajda , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski Subject: [PATCH 2/3] drm/exynos: Suspend/resume display pipeline as early/late as possible Date: Mon, 11 Jun 2018 14:24:59 +0200 Message-id: <20180611122500.11587-3-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20180611122500.11587-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrJIsWRmVeSWpSXmKPExsWy7djPc7rqWXLRBp+XClvcWneO1WLjjPWs Fle+vmezmHR/AovF+fMb2C1mnN/HZLH2yF0ga/JLNgcOj02rOtk87ncfZ/Lo27KK0ePzJrkA ligum5TUnMyy1CJ9uwSujAdLVjMXLBeqePW+h7WBcRN/FyMHh4SAicSHjT5djFwcQgIrGCVm X+hjhXA+M0p8f3WPqYuRE6zoz8MvLBCJZYwSb6/NY4dwGpgkJq7pZASpYhMwlOh628UGYosI uEk0HZ4JNooZrKhlATvIPmGBGIkFv1NBalgEVCWetU4C28ArYCuxe8ccdoht8hKrNxxgBinn FLCT2NUnBDJGQqCRTWLRg+PMEDUuEltmTGeDsIUlXh3fAtUrI9HZcZAJoqGZUaJ9xix2CKeH UWLrnB1QHdYSh49fZAWxmQX4JCZtm84MCQxeiY42IYgSD4nfC1dBvTwR6OX9+xgnMEouYGRY xSieWlqcm55abJSXWq5XnJhbXJqXrpecn7uJERiBp/8d/7KDcdefpEOMAhyMSjy8Cumy0UKs iWXFlbmHGCU4mJVEeL0U5KKFeFMSK6tSi/Lji0pzUosPMUpzsCiJ88Zp1EUJCaQnlqRmp6YW pBbBZJk4OKUaGOPk3yl5vF6jzd0cJjfNL3PDtd7uh18K/hQH1MlMumL3JfxQ1WR/88vzJNwV js3ruG0oxbd/Ubd5B4vgg7nP7/u7H7378fG3OVkhduEq6lGs/CvLXO7+3H2h57ZNn92rX4EP Y9UU5+f1dr7qyhWN4bnf/t5vw6SGwIbY+bK/lS/8M2FYsvJ1gxJLcUaioRZzUXEiAEiBxGC8 AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpnluLIzCtJLcpLzFFi42I5/e/4ZV21LLlog3+/NC1urTvHarFxxnpW iytf37NZTLo/gcXi/PkN7BYzzu9jslh75C6QNfklmwOHx6ZVnWwe97uPM3n0bVnF6PF5k1wA SxSXTUpqTmZZapG+XQJXxoMlq5kLlgtVvHrfw9rAuIm/i5GTQ0LAROLPwy8sXYxcHEICSxgl bvS3MEE4TUwSq3b9ZwOpYhMwlOh62wVmiwi4STQdnskKUsQMUnSlbSc7SEJYIEZi0eM9zCA2 i4CqxLPWSUwgNq+ArcTuHXPYIdbJS6zecACohoODU8BOYlefEEhYCKhky4rJ7BMYeRYwMqxi FEktLc5Nzy021CtOzC0uzUvXS87P3cQIDJ5tx35u3sF4aWPwIUYBDkYlHl6FdNloIdbEsuLK 3EOMEhzMSiK8Xgpy0UK8KYmVValF+fFFpTmpxYcYpTlYlMR5zxtURgkJpCeWpGanphakFsFk mTg4pRoYjWzunVB0sX4YkN70QUXIOCDpzZyFn+XuVmi0sV1XVJy5YmGLT1188r1li6e/sLBs yl38wvT91rSbchfcpjIHFuxT1PL227JplceEv0HzZ17tWX3r2fs5z2tm37+btCzpw8tPZ2Jv GLl2duv7XV++c9aUi03b1ohUC4S+8Z1tMp33mkr46/USu5RYijMSDbWYi4oTAddJDqsaAgAA X-CMS-MailID: 20180611122510eucas1p113bca5fb6c23a5e6a3357dc1efb362e2 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180611122510eucas1p113bca5fb6c23a5e6a3357dc1efb362e2 References: <20180611122500.11587-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org In the current code, exynos_drm_suspend() function is called after all real devices (CRTCs, Encoders, etc) are suspended, because Exynos DRM virtual platform device is created as last device in the system (as a part of DRM registration). None of the devices for real hardware modules has its own system suspend/resume callbacks, so it doesn't change any order of the executed code, but it has a side-effect: runtime PM callbacks for real devices are not executed, because those devices are considered by PM core as already suspended. This might cause issues on boards with complex pipelines, where something depends on the runtime PM state of the given device. To ensure that exynos_drm_suspend() is called before any suspend callback from the real devices, assign it to .prepare callback. Same for exynos_drm_resume(), using .complete callback ensures that all real devices have been resumed when calling it. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/exynos/exynos_drm_drv.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) -- 2.17.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index c0b4a03ae1b6..d98bc15d490d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c @@ -147,7 +147,6 @@ static struct drm_driver exynos_drm_driver = { .minor = DRIVER_MINOR, }; -#ifdef CONFIG_PM_SLEEP static int exynos_drm_suspend(struct device *dev) { struct drm_device *drm_dev = dev_get_drvdata(dev); @@ -170,7 +169,7 @@ static int exynos_drm_suspend(struct device *dev) return 0; } -static int exynos_drm_resume(struct device *dev) +static void exynos_drm_resume(struct device *dev) { struct drm_device *drm_dev = dev_get_drvdata(dev); struct exynos_drm_private *private; @@ -182,13 +181,11 @@ static int exynos_drm_resume(struct device *dev) drm_atomic_helper_resume(drm_dev, private->suspend_state); exynos_drm_fbdev_resume(drm_dev); drm_kms_helper_poll_enable(drm_dev); - - return 0; } -#endif static const struct dev_pm_ops exynos_drm_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(exynos_drm_suspend, exynos_drm_resume) + .prepare = exynos_drm_suspend, + .complete = exynos_drm_resume, }; /* forward declaration */ From patchwork Mon Jun 11 12:25:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 138232 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp3991076lji; Mon, 11 Jun 2018 05:25:26 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKYnYHU5R+OMkGaZrxcCA/DSs7U4HAkBvQlBfdayGucmDIkWlUwX+71qrtAy+kO71MgcSmX X-Received: by 2002:a65:6346:: with SMTP id p6-v6mr14530211pgv.281.1528719926448; Mon, 11 Jun 2018 05:25:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528719926; cv=none; d=google.com; s=arc-20160816; b=lw+nK775JQIyO/jgmPyU1aQs6+gCXbriqeNou8otAzvmEe/bo0hlP2NiNQN0V9vO+l 9NAZOmp4qC7F9dNv7nY4FEVzRrEyac73o0eR9abcit0GSyiP5ktJjGEDT8nDmW9e8PxH VuR7dr8tyEj98rADjCCf2AUcFmtTgFKL1Nc64VC+4tJRe5ItbDmHD4BPNbgByzRMg/Fm yQTF/lZbhpxsnPFpD+SdAG8xJmfiKXvnPQ2uWWlFiwtyT/1JnPFuKnIPf7hTfIxjBOdJ OgzOCfMOndOXpXVjsd+fsJ2/F1pdGDsnNC2GSl/UcLqnGfcXE76yrFuGcNgmd1V4gqf4 PSSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=RI+usLrpAeG+UyYLvqMqbAhjnxaBIGvVnhns6Rrh9GQ=; b=OKrP53dZA3TIAUEzJxQGhDv3mx0hoYAB97Fov7j5PkcCDkICZGpQ3epMUs3FjAlIPI NWlWcXNCsU1tVRc/5aabwM6tAYbD9nTyH6qRqbAkfHnfUCfD1e6j+amixnvPJAiCPlRh FUktDUKRHdnVnyIhPjIjraz3jiiU4ibSJWIVt6q2IeXRgSjRpr4PRCrZGKm0JGzI5Ent WfgbQUOIw2K0hVwOO12RkTnuyY4pLwEVEEmK4xvPM0Ds1jIxl+1/TWr5tR/j9q3NxH2a 2sZPmiRWScXdLLiluFJanp7YA5qc46JjttiXtdjO/RQugj/Xa48JelY5VOTFglIz8ZHc jHcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=KrreDM7R; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y15-v6si14596657pgv.452.2018.06.11.05.25.26; Mon, 11 Jun 2018 05:25:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=KrreDM7R; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932910AbeFKMZZ (ORCPT + 3 others); Mon, 11 Jun 2018 08:25:25 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:57918 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932894AbeFKMZZ (ORCPT ); Mon, 11 Jun 2018 08:25:25 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180611122523euoutp02e197b251e3cba827db3632a167bfe759~3Gqu3THAi1593415934euoutp02X; Mon, 11 Jun 2018 12:25:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180611122523euoutp02e197b251e3cba827db3632a167bfe759~3Gqu3THAi1593415934euoutp02X DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1528719923; bh=BX5Y+jTF/G9pPS+/YCSA5+dGGg8sEZfA3jztzseDQJU=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=KrreDM7RacnfkIlnQB4amTnXpzFdUBp/x+ufcOfl0bVc3Mj2JzOjUVDKduSAOlGv+ sQUFGjH6vZ8wo5p3Ma1TWhv4VwsOwY1hRmUTciUCJpNeWu5TdQinGifTiLP1eKCCKC fdEXbLf29W1aygXhPEbJ1+xo9Z57himzY+LKRGxs= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180611122512eucas1p2a688317698fc1588e0ea3b781d4265c5~3GqkjxuwZ0810708107eucas1p2U; Mon, 11 Jun 2018 12:25:12 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id CD.2B.05700.72A6E1B5; Mon, 11 Jun 2018 13:25:11 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180611122511eucas1p24427aac5e0fe4cc198fbcb43ef4f66c7~3Gqjej4kI1565415654eucas1p20; Mon, 11 Jun 2018 12:25:11 +0000 (GMT) X-AuditID: cbfec7f2-1dbff70000011644-e4-5b1e6a276d32 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 53.02.04183.72A6E1B5; Mon, 11 Jun 2018 13:25:11 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PA500JG3RTSPN30@eusync1.samsung.com>; Mon, 11 Jun 2018 13:25:11 +0100 (BST) From: Marek Szyprowski To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Inki Dae , Seung-Woo Kim , Andrzej Hajda , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski Subject: [PATCH 3/3] drm/exynos: Ensure suspended runtime PM state during system suspend Date: Mon, 11 Jun 2018 14:25:00 +0200 Message-id: <20180611122500.11587-4-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20180611122500.11587-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFIsWRmVeSWpSXmKPExsWy7djPc7rqWXLRBh8/mlncWneO1WLjjPWs Fle+vmezmHR/AovF+fMb2C1mnN/HZLH2yF0ga/JLNgcOj02rOtk87ncfZ/Lo27KK0ePzJrkA ligum5TUnMyy1CJ9uwSujJVPv7EWbNSt2HTzG2sD4yH1LkZODgkBE4mDu8+wg9hCAisYJbq+ enYxcgHZnxklVl/pY4YperGukw0isYxR4tG/WVBOA5PE3vb/YFVsAoYSXW+72EBsEQE3iabD M1lBiphBiia2LADbISwQJfH6wHZGEJtFQFVixZ5bYHFeAVuJV29OskCsk5dYveEA0FAODk4B O4ldfUIgcyQEGtkktl1qZIOocZF4uLgfql5Y4tXxLewQtozE5cndLBANzYwS7TNmsUM4PYwS W+fsgOq2ljh8/CIriM0swCcxadt0sG0SArwSHW1CECUeEle2H2GFeHMio8TJl3tYJzBKLmBk WMUonlpanJueWmyYl1quV5yYW1yal66XnJ+7iREYg6f/Hf+0g/HrpaRDjAIcjEo8vArpstFC rIllxZW5hxglOJiVRHi9FOSihXhTEiurUovy44tKc1KLDzFKc7AoifPGadRFCQmkJ5akZqem FqQWwWSZODilGhgnusR+b/13xmhrVc3kw8FxFVn3LqvEtVfdivl9Uff3tYtsoW9DbpzYUH25 7GnsdsYlc1P9OC/lch0rO/Uh6oqzbJK4Xez1M29Oq3u8W7LsI+dco6y2ecuSVpnPnlk7xXce v4iqwJZInpyFrBV5rpZSLu05OqfWi59Zu+/BHbUdSX2+GkW7GPcosRRnJBpqMRcVJwIAZCtq +b0CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpnluLIzCtJLcpLzFFi42I5/e/4ZV31LLlog+3PWCxurTvHarFxxnpW iytf37NZTLo/gcXi/PkN7BYzzu9jslh75C6QNfklmwOHx6ZVnWwe97uPM3n0bVnF6PF5k1wA SxSXTUpqTmZZapG+XQJXxsqn31gLNupWbLr5jbWB8ZB6FyMnh4SAicSLdZ1sXYxcHEICSxgl /r7ZzQzhNDFJPJz5gg2kik3AUKLrbReYLSLgJtF0eCYrSBEzSNGVtp3sIAlhgSiJ1we2M4LY LAKqEiv23AKL8wrYSrx6c5IFYp28xOoNB4A2cHBwCthJ7OoTAgkLAZVsWTGZfQIjzwJGhlWM IqmlxbnpucVGesWJucWleel6yfm5mxiBwbPt2M8tOxi73gUfYhTgYFTi4VVIl40WYk0sK67M PcQowcGsJMLrpSAXLcSbklhZlVqUH19UmpNafIhRmoNFSZz3vEFllJBAemJJanZqakFqEUyW iYNTqoHxFHds6lThf2azX82a3moaurw9TuZs0AvLBfWu1o0HdPR5s0o3x/7WnL20V9PYPc5u 4mNnizf/Ob+5/A/7erVvnaByxwneTffloudaHigWtj+2V3mz4XYt86Wn+8/8sJFaui9z4rmm 6ktfCxmm+x+J1rLhT73+V/6xvuAyP5mP71hCY42zLvoosRRnJBpqMRcVJwIAm2yQ+RoCAAA= X-CMS-MailID: 20180611122511eucas1p24427aac5e0fe4cc198fbcb43ef4f66c7 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180611122511eucas1p24427aac5e0fe4cc198fbcb43ef4f66c7 References: <20180611122500.11587-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Add calls to pm_runtime_force_{suspend,resume} as SYSTEM_SLEEP_PM_OPS for all drivers for the real Exynos DRM hardware modules. This ensures that the resources will be released for the system PM suspend/resume cycle. Exynos DRM core already takes care of suspending the whole display pipeline before PM callbacks of the real devices are called. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 ++ drivers/gpu/drm/exynos/exynos7_drm_decon.c | 2 ++ drivers/gpu/drm/exynos/exynos_dp.c | 3 +++ drivers/gpu/drm/exynos/exynos_drm_dsi.c | 2 ++ drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 ++ drivers/gpu/drm/exynos/exynos_drm_mic.c | 2 ++ drivers/gpu/drm/exynos/exynos_hdmi.c | 2 ++ drivers/gpu/drm/exynos/exynos_mixer.c | 2 ++ 8 files changed, 17 insertions(+) -- 2.17.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c index 82c95c34447f..aac0b383027e 100644 --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c @@ -673,6 +673,8 @@ static int exynos5433_decon_resume(struct device *dev) static const struct dev_pm_ops exynos5433_decon_pm_ops = { SET_RUNTIME_PM_OPS(exynos5433_decon_suspend, exynos5433_decon_resume, NULL) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) }; static const struct of_device_id exynos5433_decon_driver_dt_match[] = { diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c b/drivers/gpu/drm/exynos/exynos7_drm_decon.c index 3931d5e33fe0..88cbd000eb09 100644 --- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c @@ -832,6 +832,8 @@ static int exynos7_decon_resume(struct device *dev) static const struct dev_pm_ops exynos7_decon_pm_ops = { SET_RUNTIME_PM_OPS(exynos7_decon_suspend, exynos7_decon_resume, NULL) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) }; struct platform_driver decon_driver = { diff --git a/drivers/gpu/drm/exynos/exynos_dp.c b/drivers/gpu/drm/exynos/exynos_dp.c index 86330f396784..7bda7cbb6666 100644 --- a/drivers/gpu/drm/exynos/exynos_dp.c +++ b/drivers/gpu/drm/exynos/exynos_dp.c @@ -16,6 +16,7 @@ #include #include #include +#include #include