From patchwork Thu Aug 13 20:06:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 7010701 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F03A5C05AD for ; Thu, 13 Aug 2015 20:06:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3D4872066F for ; Thu, 13 Aug 2015 20:06:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 518EA20661 for ; Thu, 13 Aug 2015 20:06:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753664AbbHMUGt (ORCPT ); Thu, 13 Aug 2015 16:06:49 -0400 Received: from mail-qk0-f181.google.com ([209.85.220.181]:36120 "EHLO mail-qk0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753564AbbHMUGt (ORCPT ); Thu, 13 Aug 2015 16:06:49 -0400 Received: by qkdv3 with SMTP id v3so19215597qkd.3 for ; Thu, 13 Aug 2015 13:06:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=I73HUBk0ljPK+cE69GGx9sBl5KCalKDnMlKuGNpK/ng=; b=EDNrBRUSaEn4rHzbiyIl6bSrgwFEFF6Z05znbQIroeH7Uu9pWga73u9V30jxjyZQKJ 3n4x51bilrUjiBqK2wB2RpMc09qtPcHeDxaJiVOzqw64bc6jAwLRfU4N/ZNR1q10PJPk TLk+In3jRbG02EGggOT4bkT1tGRxdWNnGSE+EnrJ79Q9HB9dSjo64WflA3WAqL3a2l4a KjEeZPstMrTjKMKrb8lY79hI3Eu9ePqwamFSEkdDUxbg3JVqeI0toww8UwayLylSBd46 q0tAH4FeUyL2H02bP7/0cfnTmF0YAp47FhFO/4YLsQhD13UpdalLtVz7vu4mIQ9SLVF6 vPkw== X-Received: by 10.55.40.220 with SMTP id o89mr72238228qko.90.1439496408555; Thu, 13 Aug 2015 13:06:48 -0700 (PDT) Received: from jade.localdomain ([187.35.192.214]) by smtp.gmail.com with ESMTPSA id e19sm1706244qhc.18.2015.08.13.13.06.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Aug 2015 13:06:47 -0700 (PDT) From: Gustavo Padovan To: linux-samsung-soc@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, inki.dae@samsung.com, jy0922.shim@samsung.com, tjakobi@math.uni-bielefeld.de, daniel@ffwll.ch, Gustavo Padovan Subject: [PATCH 2/2] drm: WARN_ON if a modeset driver uses legacy suspend/resume helpers Date: Thu, 13 Aug 2015 17:06:39 -0300 Message-Id: <1439496399-25791-2-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1439496399-25791-1-git-send-email-gustavo@padovan.org> References: <1439496399-25791-1-git-send-email-gustavo@padovan.org> 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, 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 From: Gustavo Padovan Legacy s/r hooks are only used for shadow-attaching drivers, warn when a KMS driver tries to use them. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/drm_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index b7bf4ce..4e76193 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -567,6 +567,8 @@ struct drm_device *drm_dev_alloc(struct drm_driver *driver, ret = drm_minor_alloc(dev, DRM_MINOR_CONTROL); if (ret) goto err_minors; + + WARN_ON(driver->suspend || driver->resume); } if (drm_core_check_feature(dev, DRIVER_RENDER)) {