From patchwork Tue Feb 12 21:20:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 2132181 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 3A9CD3FD4F for ; Tue, 12 Feb 2013 21:21:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0B5AEE64E5 for ; Tue, 12 Feb 2013 13:21:28 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by gabe.freedesktop.org (Postfix) with ESMTP id BB7BFE64DC for ; Tue, 12 Feb 2013 13:20:30 -0800 (PST) Received: by mail-vc0-f176.google.com with SMTP id fk10so344552vcb.35 for ; Tue, 12 Feb 2013 13:20:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=sQLDZEN8F8BDhf1kMbhr3JBCeRpATGyvKNg0vkWJ3Fo=; b=jj6GvUu8cv3189nT7NyhRIFf+VHJW/ewfqnDZYnus0B5QKwWtGYokOlyYbpSyAG5yE BKjnwcbbwFQUyB/3OI7oZonBmuNqQ+qljc87/F5tqA+7idzAV0eZzvsJYHsJ2vvkLxJk 141tKZBhGOY/BiMiwpHujaIt82UhLz0mDanq693OkydfCiNR6vpekTjDudrUpUMOIyrD LbwaiCP8qUY9Fb5P3toSt2KCZqyb6q+o+pxrqGoeTaxLfInV0OnUsSaaD+B6LZeWaYw5 dRSK184EhfmqJezSKIA1td1A0mDPdo6xgB1o9iMJVDjZH3L1XfmKqM4NESKIFscGsDuD kDJw== MIME-Version: 1.0 X-Received: by 10.220.152.76 with SMTP id f12mr26250052vcw.51.1360704030217; Tue, 12 Feb 2013 13:20:30 -0800 (PST) Received: by 10.58.210.3 with HTTP; Tue, 12 Feb 2013 13:20:30 -0800 (PST) In-Reply-To: References: Date: Tue, 12 Feb 2013 19:20:30 -0200 Message-ID: Subject: Re: Building DRM for i.MX fails with linux-next 20130212 From: Fabio Estevam To: Sascha Hauer , airlied@linux.ie, bhelgaas@google.com Cc: linux-arm-kernel@lists.infradead.org, =?UTF-8?B?TWFyZWsgVmHFoXV0?= , pawel.moll@arm.com, DRI mailing list 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: , 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 Dave/Bjorn, On Tue, Feb 12, 2013 at 3:50 PM, Fabio Estevam wrote: > Hi, > > Building imx_v6_v7_defconfig on linux-next 20130212 gives me the > following build error: > > CC drivers/gpu/drm/drm_pci.o > drivers/gpu/drm/drm_pci.c: In function ‘drm_pcie_get_speed_cap_mask’: > drivers/gpu/drm/drm_pci.c:485:2: error: implicit declaration of > function ‘pcie_capability_read_dword’ > [-Werror=implicit-function-declaration] ,and it is caused by commit: commit dd66cc2e1f4765d0e6f39eb1e7d8d64d3f1cc522 Author: Bjorn Helgaas Date: Fri Jan 4 19:10:42 2013 +0000 drm/pci: Use PCI Express Capability accessors Use PCI Express Capability access functions to simplify this code a bit. For non-PCIe devices or pre-PCIe 3.0 devices that don't implement the Link Capabilities 2 register, pcie_capability_read_dword() reads a zero. Since we're only testing whether the bits we care about are set, there's no need to mask out the other bits we *don't* care about. Signed-off-by: Bjorn Helgaas Signed-off-by: Dave Airlie The patch below fixes the build on imx_v6_v7_defconfig (which has CONFIG_PCI unselected): struct pci_dev *root; @@ -503,3 +504,4 @@ int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *mask) return 0; } EXPORT_SYMBOL(drm_pcie_get_speed_cap_mask); +#endif If this looks good I can submit it formally. diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c index 86102a0..93ec85d 100644 --- a/drivers/gpu/drm/drm_pci.c +++ b/drivers/gpu/drm/drm_pci.c @@ -466,6 +466,7 @@ void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver) } EXPORT_SYMBOL(drm_pci_exit); +#ifdef CONFIG_PCI int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *mask) {