From patchwork Thu Aug 8 10:20:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 2841695 Return-Path: X-Original-To: patchwork-dri-devel@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 A6CB99F295 for ; Fri, 9 Aug 2013 06:49:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CE5C420403 for ; Fri, 9 Aug 2013 06:49:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B9F2E203FD for ; Fri, 9 Aug 2013 06:49:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B097EE5C90 for ; Thu, 8 Aug 2013 23:49:46 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from cassiel.sirena.org.uk (cassiel.sirena.org.uk [80.68.93.111]) by gabe.freedesktop.org (Postfix) with ESMTP id E0E9FE6157 for ; Thu, 8 Aug 2013 03:21:01 -0700 (PDT) Received: from cpc11-sgyl31-2-0-cust68.sgyl.cable.virginmedia.com ([94.175.92.69] helo=finisterre) by cassiel.sirena.org.uk with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1V7NKv-0007sw-6J; Thu, 08 Aug 2013 11:20:54 +0100 Received: from broonie by finisterre with local (Exim 4.80) (envelope-from ) id 1V7NKu-0004q8-Kf; Thu, 08 Aug 2013 11:20:52 +0100 From: Mark Brown To: David Airlie , David Herrmann Date: Thu, 8 Aug 2013 11:20:42 +0100 Message-Id: <1375957242-18444-1-git-send-email-broonie@kernel.org> X-Mailer: git-send-email 1.8.4.rc1 X-SA-Exim-Connect-IP: 94.175.92.69 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, SUSPICIOUS_RECIPS, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Subject: [PATCH] drm/agp: Fix build for non-AGP platforms X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:57:07 +0000) X-SA-Exim-Scanned: Yes (on cassiel.sirena.org.uk) X-Mailman-Approved-At: Thu, 08 Aug 2013 22:41:15 -0700 Cc: linaro-kernel@lists.linaro.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Mark Brown 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-Virus-Scanned: ClamAV using ClamSMTP From: Mark Brown Commit 28ec711 (drm/agp: move AGP cleanup paths to drm_agpsupport.c) broke the build for platforms which do not have AGP since it moved the AGP cleanup code inside an #ifdef __OS_HAS_AGP which are referenced unconditionally in drm_drv.c. This causes build failures for embedded SoCs which use DRM but do not have AGP. Fix this by providing stub static inlines in the header. Signed-off-by: Mark Brown --- include/drm/drmP.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/drm/drmP.h b/include/drm/drmP.h index fba5473..e7f7da0 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1453,6 +1453,7 @@ extern int drm_modeset_ctl(struct drm_device *dev, void *data, struct drm_file *file_priv); /* AGP/GART support (drm_agpsupport.h) */ +#if __OS_HAS_AGP extern struct drm_agp_head *drm_agp_init(struct drm_device *dev); extern void drm_agp_destroy(struct drm_agp_head *agp); extern void drm_agp_clear(struct drm_device *dev); @@ -1480,6 +1481,10 @@ extern int drm_agp_unbind_ioctl(struct drm_device *dev, void *data, extern int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request); extern int drm_agp_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv); +#else +static inline void drm_agp_destroy(struct drm_agp_head *agp) { } +static inline void drm_agp_clear(struct drm_device *dev) { } +#endif /* Stub support (drm_stub.h) */ extern int drm_setmaster_ioctl(struct drm_device *dev, void *data,