/* * Copyright (C) 2015 Red Hat, Inc. * All Rights Reserved. * * Authors: * Dave Airlie <[email protected]> * Gerd Hoffmann <[email protected]> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ #include <linux/module.h> #include <linux/pci.h> #include <linux/poll.h> #include <linux/wait.h> #include <drm/drm.h> #include <drm/drm_aperture.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_drv.h> #include <drm/drm_fbdev_shmem.h> #include <drm/drm_file.h> #include "virtgpu_drv.h" static const struct drm_driver driver; static int virtio_gpu_modeset = …; MODULE_PARM_DESC(…) …; module_param_named(modeset, virtio_gpu_modeset, int, 0400); static int virtio_gpu_pci_quirk(struct drm_device *dev) { … } static int virtio_gpu_probe(struct virtio_device *vdev) { … } static void virtio_gpu_remove(struct virtio_device *vdev) { … } static void virtio_gpu_config_changed(struct virtio_device *vdev) { … } static struct virtio_device_id id_table[] = …; static unsigned int features[] = …; static struct virtio_driver virtio_gpu_driver = …; module_virtio_driver(…) …; MODULE_DEVICE_TABLE(virtio, id_table); MODULE_DESCRIPTION(…) …; MODULE_LICENSE(…) …; MODULE_AUTHOR(…) …; MODULE_AUTHOR(…) …; MODULE_AUTHOR(…) …; DEFINE_DRM_GEM_FOPS(virtio_gpu_driver_fops); static const struct drm_driver driver = …;