From patchwork Fri Oct 3 08:24:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 5023291 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 7E9D4C11AC 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 65CCA201EF 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 0F288201C8 for ; Fri, 3 Oct 2014 15:43:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EBCD56E704; 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 F3B476E5A0; Fri, 3 Oct 2014 01:24:31 -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 <0NCV00DT80THUZ20@mailout4.w1.samsung.com>; Fri, 03 Oct 2014 09:27:17 +0100 (BST) X-AuditID: cbfec7f4-b7f156d0000063c7-4f-542e5d3e2e5c Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 88.CC.25543.E3D5E245; Fri, 03 Oct 2014 09:24:30 +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:30 +0100 (BST) From: Andrzej Hajda To: dri-devel@lists.freedesktop.org (open list:DRM DRIVERS) Date: Fri, 03 Oct 2014 10:24:10 +0200 Message-id: <1412324653-30677-2-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+NgFprDLMWRmVeSWpSXmKPExsVy+t/xq7p2sXohBm9/MlvcWneO1aL33Ekm i+Vn1jFbXPn6ns1i0v0JLBazJ2wGil1ez2jx4t5FFoveBVfZLM42vWG3uLxrDpvFjPP7mCzW HrnLbjFj8ks2Bz6PxXteMnls//aA1WPeyUCP+93HmTz6tqxi9Pi8SS6ALYrLJiU1J7MstUjf LoEr4+29RYwFG7gqGn/9ZWpgvMrRxcjJISFgInHx11YmCFtM4sK99WxdjFwcQgJLGSUuLlnP BOH0MUmsP3mSHaSKTUBT4u/mm0BVHBwiAtYS1ybJgtQwC/SySny70swMUiMsECwxtaWFBcRm EVCVuDx9DytIPa+As8T9XRoQy+QkTh6bzApicwq4SDzvmQZmCwGV3Hzwm20CI+8CRoZVjKKp pckFxUnpuYZ6xYm5xaV56XrJ+bmbGCEh+mUH4+JjVocYBTgYlXh4P97QDRFiTSwrrsw9xCjB wawkwjs5Si9EiDclsbIqtSg/vqg0J7X4ECMTB6dUA6PPee+lPxiCzj6yk1O3CG4omD5BOviT ZGTww7o63SX/3mxj75jPaj7v+h7Gng2HP/RuOfzKYILF4/f5ks3l+fMrLyxrcF7itqzCLv9M TeHiN4eqzPlTHU9efD3XP2u2Kefdhu3Bks98fy8IFz/lM3Fn/jXDlcHHJrIvKy47dOASu9zm R9NPBTcosRRnJBpqMRcVJwIA/F7Ybi8CAAA= 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 1/4] drm/i915: set PM callbacks only if modeset is turned off 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 Currently suspend and resume callbacks are called only if driver have modeset feature disabled. This patch moves the check directly to i915 driver, it will allow to remove the check from the core in the future. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/i915/i915_drv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 3870c73..481f62f 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -1617,10 +1617,6 @@ static struct drm_driver driver = { .postclose = i915_driver_postclose, .set_busid = drm_pci_set_busid, - /* Used in place of i915_pm_ops for non-DRIVER_MODESET */ - .suspend = i915_suspend, - .resume = i915_resume_legacy, - .device_is_agp = i915_driver_device_is_agp, .master_create = i915_master_create, .master_destroy = i915_master_destroy, @@ -1684,6 +1680,8 @@ static int __init i915_init(void) if (!(driver.driver_features & DRIVER_MODESET)) { driver.get_vblank_timestamp = NULL; + driver.suspend = i915_suspend; + driver.resume = i915_resume_legacy; #ifndef CONFIG_DRM_I915_UMS /* Silently fail loading to not upset userspace. */ DRM_DEBUG_DRIVER("KMS and UMS disabled.\n");