From patchwork Thu Aug 8 22:00:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 2841436 Return-Path: X-Original-To: patchwork-dri-devel@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 5E78FBF546 for ; Thu, 8 Aug 2013 22:00:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7AC9D20205 for ; Thu, 8 Aug 2013 22:00:36 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 55CCE201DA for ; Thu, 8 Aug 2013 22:00:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 41D6AE6001 for ; Thu, 8 Aug 2013 15:00:35 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-gh0-f174.google.com (mail-gh0-f174.google.com [209.85.160.174]) by gabe.freedesktop.org (Postfix) with ESMTP id 3E39FE5D0E for ; Thu, 8 Aug 2013 15:00:21 -0700 (PDT) Received: by mail-gh0-f174.google.com with SMTP id r17so688737ghr.19 for ; Thu, 08 Aug 2013 15:00:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=4pvVewOn5grQjD9Fze9n3Ef75jf6ANLBI8vc7U15Kdc=; b=nZ65YfgSzHbkKzVE2R3BUK/ZW816GczXy9uCn4dXEs++1RsrCa2RG06aDdHCQZVBdV rqKk8VcZq6Ityp4gOFYVYPaSsjRhzT8nYIliQs84mgwTlqGSg6Is8y/m+YzHRgT0UiMM OqK3iEq+HUenJM4rQgazYJ8fuNuC3q+HOZK/UMMmii9MRiMj0TYwqSv5ubpHBLoZ58Bn 8MAS7cWMZT6FDWpV7e7WIwYuhMdzOHCd9LLQHmAZnEZUuiJMmErwJEGT9A4bypX5ZI1j MtjVdfsmD4Sz9k9q3iV1oeNTaNNTXMWGQ5p+lDQ6GdaU84xaPoKN5hVNJx6UrQZvnoYg GO2A== X-Received: by 10.236.42.196 with SMTP id j44mr4675423yhb.42.1375999220670; Thu, 08 Aug 2013 15:00:20 -0700 (PDT) Received: from localhost.localdomain ([189.5.16.50]) by mx.google.com with ESMTPSA id o1sm17107042yho.2.2013.08.08.15.00.18 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Aug 2013 15:00:20 -0700 (PDT) From: Fabio Estevam To: airlied@linux.ie Subject: [PATCH] drm: drm_drv: Only call drm_agp_clear() in __OS_HAS_AGP case Date: Thu, 8 Aug 2013 19:00:10 -0300 Message-Id: <1375999210-26044-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.8.1.2 Cc: Fabio Estevam , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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: Fabio Estevam Commit 28ec711 (drm/agp: move AGP cleanup paths to drm_agpsupport.c) causes the following link error on ARM (imx_v6_v7_defconfig): drivers/built-in.o: In function `drm_lastclose': :(.text+0x588a0): undefined reference to `drm_agp_clear' make: *** [vmlinux] Error 1 drm_agp_clear() is defined only '#if __OS_HAS_AGP' is true, so add this 'if' logic when calling it. Signed-off-by: Fabio Estevam --- 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 dddd799..58f7f39 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -195,7 +195,9 @@ int drm_lastclose(struct drm_device * dev) mutex_lock(&dev->struct_mutex); +#if __OS_HAS_AGP drm_agp_clear(dev); +#endif if (drm_core_check_feature(dev, DRIVER_SG) && dev->sg && !drm_core_check_feature(dev, DRIVER_MODESET)) {