From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753181AbbBXQQW (ORCPT ); Tue, 24 Feb 2015 11:16:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44898 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752416AbbBXQQT (ORCPT ); Tue, 24 Feb 2015 11:16:19 -0500 Subject: [PATCH] vgaarb: Stub vga_set_legacy_decoding() From: Alex Williamson To: airlied@linux.ie, dri-devel@lists.freedesktop.org Cc: alex.williamson@redhat.com, linux-kernel@vger.kernel.org Date: Tue, 24 Feb 2015 09:16:13 -0700 Message-ID: <20150224161239.7482.76673.stgit@gimli.home> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org vga_set_legacy_decoding() is defined in drivers/gpu/vga/vgaarb.c, which is only compiled with CONFIG_VGA_ARB. A caller would therefore get an undefined symbol if the VGA arbiter is not enabled. Signed-off-by: Alex Williamson --- I'd like to use this function from vfio-pci to opt-out VGA devices from arbitration if vfio-pci VGA support is disabled. This helps to keep DRI2 enabled on the host if additional GPUs are installed for VMs and used without VGA support. I can pull this change in through my tree if someone wants to provide just an ack. Thanks! include/linux/vgaarb.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h index c37bd4d..8c3b412 100644 --- a/include/linux/vgaarb.h +++ b/include/linux/vgaarb.h @@ -65,8 +65,13 @@ struct pci_dev; * out of the arbitration process (and can be safe to take * interrupts at any time. */ +#if defined(CONFIG_VGA_ARB) extern void vga_set_legacy_decoding(struct pci_dev *pdev, unsigned int decodes); +#else +static inline void vga_set_legacy_decoding(struct pci_dev *pdev, + unsigned int decodes) { }; +#endif /** * vga_get - acquire & locks VGA resources