From patchwork Fri Oct 3 08:24:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 5023271 Return-Path: X-Original-To: patchwork-intel-gfx@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 F2CAD9F38C for ; Fri, 3 Oct 2014 15:43:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0FAEA201EF for ; Fri, 3 Oct 2014 15:43:43 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4D9252017E for ; Fri, 3 Oct 2014 15:43:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E302E6E702; Fri, 3 Oct 2014 08:43:39 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mailout4.w1.samsung.com (mailout4.w1.samsung.com [210.118.77.14]) by gabe.freedesktop.org (Postfix) with ESMTP id 47FB36E5A0; Fri, 3 Oct 2014 01:24:32 -0700 (PDT) Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NCV00DTA0TJUZ20@mailout4.w1.samsung.com>; Fri, 03 Oct 2014 09:27:19 +0100 (BST) X-AuditID: cbfec7f4-b7f156d0000063c7-55-542e5d3f230c Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id F9.CC.25543.F3D5E245; Fri, 03 Oct 2014 09:24:31 +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:31 +0100 (BST) From: Andrzej Hajda To: dri-devel@lists.freedesktop.org (open list:DRM DRIVERS) Date: Fri, 03 Oct 2014 10:24:11 +0200 Message-id: <1412324653-30677-3-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/xq7r2sXohBksmGVrcWneO1aL33Ekm i+Vn1jFbXPn6ns1i0v0JLBazJ2wGil1ez2jx4t5FFoveBVfZLM42vWG3uLxrDpvFjPP7mCzW HrnLbjFj8ks2Bz6PxXteMnls//aA1WPeyUCP+93HmTz6tqxi9Pi8SS6ALYrLJiU1J7MstUjf LoErY/W7o4wFa7grfnzczNTAuJOzi5GTQ0LARKLpwj8WCFtM4sK99WxdjFwcQgJLGSUmL2pm h3D6mCSWTVvBBlLFJqAp8XfzTSCbg0NEwFri2iRZkBpmgV5WiW9XmplBaoQFwiXaprxmBLFZ BFQlWp/fBOvlFXCWePTtEDvENjmJk8cms4LYnAIuEs97poHZQkA1Nx/8ZpvAyLuAkWEVo2hq aXJBcVJ6rqFecWJucWleul5yfu4mRkiQftnBuPiY1SFGAQ5GJR7ejzd0Q4RYE8uKK3MPMUpw MCuJ8E6O0gsR4k1JrKxKLcqPLyrNSS0+xMjEwSnVwNhnUtC8uPWd1lLO8KfX5m/zOOllbXlu Lr/xnjkPHE31rgdftzpZOHfawUOHTD8teeaZwqZyee2sU+Wzf9qseNlzp+L3Yca5/Ln9xWs8 KjIFN+08fU/xfZkP1+P+Sa7RPkJFC9bGT+DI1j7/kM9awGfvV5E989917ZuTvb/62D2WdQ7X H0kmiSkrsRRnJBpqMRcVJwIAlGW69DACAAA= 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 2/4] drm/core: re-enable suspend/resume callbacks for KMS drivers 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 Implementing suspend/resume functionality in componentized drm drivers using master component PM callbacks is problematic because those callbacks can be called asynchronously regardless of existence/state of drm device. The patch re-enables suspend/resume drm driver callbacks in drivers with modeset feature enabled. These callback can be used to implement suspend/resume functionality in more convenient way. The patch should not affect behavior of existing drm drivers. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/drm_sysfs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c index cc3d6d6..206afc4 100644 --- a/drivers/gpu/drm/drm_sysfs.c +++ b/drivers/gpu/drm/drm_sysfs.c @@ -45,7 +45,6 @@ static int __drm_class_suspend(struct device *dev, pm_message_t state) struct drm_device *drm_dev = drm_minor->dev; if (drm_minor->type == DRM_MINOR_LEGACY && - !drm_core_check_feature(drm_dev, DRIVER_MODESET) && drm_dev->driver->suspend) return drm_dev->driver->suspend(drm_dev, state); } @@ -86,7 +85,6 @@ static int drm_class_resume(struct device *dev) struct drm_device *drm_dev = drm_minor->dev; if (drm_minor->type == DRM_MINOR_LEGACY && - !drm_core_check_feature(drm_dev, DRIVER_MODESET) && drm_dev->driver->resume) return drm_dev->driver->resume(drm_dev); }