mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: airlied@linux.ie, dri-devel@lists.freedesktop.org
Cc: alex.williamson@redhat.com, linux-kernel@vger.kernel.org
Subject: [PATCH] vgaarb: Stub vga_set_legacy_decoding()
Date: Tue, 24 Feb 2015 09:16:13 -0700	[thread overview]
Message-ID: <20150224161239.7482.76673.stgit@gimli.home> (raw)

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 <alex.williamson@redhat.com>
---

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


             reply	other threads:[~2015-02-24 16:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-24 16:16 Alex Williamson [this message]
2015-03-04 23:43 ` Dave Airlie
2015-03-04 23:51   ` Alex Williamson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150224161239.7482.76673.stgit@gimli.home \
    --to=alex.williamson@redhat.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®