Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

virtio: fix build for configs without dma-bufs

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: David Stevens <stevensd@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20200819031011.310180-1-stevensd@chromium.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

authored by

David Stevens and committed by
Gerd Hoffmann
9fe2f897 a25b6b27

+13 -1
+1
drivers/gpu/drm/virtio/Kconfig
··· 4 4 depends on DRM && VIRTIO && MMU 5 5 select DRM_KMS_HELPER 6 6 select DRM_GEM_SHMEM_HELPER 7 + select VIRTIO_DMA_SHARED_BUFFER 7 8 help 8 9 This is the virtual GPU driver for virtio. It can be used with 9 10 QEMU based VMMs (like KVM or Xen).
+7
drivers/virtio/Kconfig
··· 126 126 127 127 If unsure, say 'N'. 128 128 129 + config VIRTIO_DMA_SHARED_BUFFER 130 + tristate 131 + depends on DMA_SHARED_BUFFER 132 + help 133 + This option adds a flavor of dma buffers that are backed by 134 + virtio resources. 135 + 129 136 endif # VIRTIO_MENU
+2 -1
drivers/virtio/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - obj-$(CONFIG_VIRTIO) += virtio.o virtio_ring.o virtio_dma_buf.o 2 + obj-$(CONFIG_VIRTIO) += virtio.o virtio_ring.o 3 3 obj-$(CONFIG_VIRTIO_MMIO) += virtio_mmio.o 4 4 obj-$(CONFIG_VIRTIO_PCI) += virtio_pci.o 5 5 virtio_pci-y := virtio_pci_modern.o virtio_pci_common.o ··· 8 8 obj-$(CONFIG_VIRTIO_INPUT) += virtio_input.o 9 9 obj-$(CONFIG_VIRTIO_VDPA) += virtio_vdpa.o 10 10 obj-$(CONFIG_VIRTIO_MEM) += virtio_mem.o 11 + obj-$(CONFIG_VIRTIO_DMA_SHARED_BUFFER) += virtio_dma_buf.o
+3
drivers/virtio/virtio_dma_buf.c
··· 5 5 * Copyright (C) 2020 Google, Inc. 6 6 */ 7 7 8 + #include <linux/module.h> 8 9 #include <linux/virtio_dma_buf.h> 9 10 10 11 /** ··· 84 83 return ops->get_uuid(dma_buf, uuid); 85 84 } 86 85 EXPORT_SYMBOL(virtio_dma_buf_get_uuid); 86 + 87 + MODULE_LICENSE("GPL");