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: 5021481 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 04ECF9F349 for ; Fri, 3 Oct 2014 08:26:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4276F20158 for ; Fri, 3 Oct 2014 08:26:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5282E200FF for ; Fri, 3 Oct 2014 08:26:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751170AbaJCIZ5 (ORCPT ); Fri, 3 Oct 2014 04:25:57 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:62932 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751282AbaJCIYe (ORCPT ); Fri, 3 Oct 2014 04:24:34 -0400 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) Cc: Andrzej Hajda , Marek Szyprowski , David Airlie , Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Kukjin Kim , Daniel Vetter , Jani Nikula , dri-devel@lists.freedesktop.org (open list:DRM DRIVERS), linux-kernel@vger.kernel.org (open list), linux-samsung-soc@vger.kernel.org (moderated list:ARM/S5P EXYNOS AR...), intel-gfx@lists.freedesktop.org (open list:INTEL DRM DRIVERS...) Subject: [PATCH RFC 2/4] drm/core: re-enable suspend/resume callbacks for KMS 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= Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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); }