From 5af3f531a8b3627162fadb10394e394b115c6535 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Tigeot?= Date: Sat, 4 Oct 2014 09:45:33 +0200 Subject: [PATCH] drm: Add Linux PCI headers --- sys/dev/drm/i915/intel_display.c | 2 - sys/dev/drm/include/drm/drmP.h | 1 + sys/dev/drm/include/drm/drm_os_freebsd.h | 11 ----- sys/dev/drm/include/linux/pci.h | 34 ++++++++++++++ sys/dev/drm/include/linux/pci_ids.h | 56 ++++++++++++++++++++++++ 5 files changed, 91 insertions(+), 13 deletions(-) create mode 100644 sys/dev/drm/include/linux/pci.h create mode 100644 sys/dev/drm/include/linux/pci_ids.h diff --git a/sys/dev/drm/i915/intel_display.c b/sys/dev/drm/i915/intel_display.c index 28e47ea0bd..d937628c67 100644 --- a/sys/dev/drm/i915/intel_display.c +++ b/sys/dev/drm/i915/intel_display.c @@ -8909,8 +8909,6 @@ static const struct intel_dmi_quirk intel_dmi_quirks[] = { }, }; -#define PCI_ANY_ID (~0u) - static struct intel_quirk intel_quirks[] = { /* HP Mini needs pipe A force quirk (LP: #322104) */ { 0x27ae, 0x103c, 0x361a, quirk_pipea_force }, diff --git a/sys/dev/drm/include/drm/drmP.h b/sys/dev/drm/include/drm/drmP.h index 17741ea775..17c5e04894 100644 --- a/sys/dev/drm/include/drm/drmP.h +++ b/sys/dev/drm/include/drm/drmP.h @@ -95,6 +95,7 @@ #include #include +#include #include #include #include diff --git a/sys/dev/drm/include/drm/drm_os_freebsd.h b/sys/dev/drm/include/drm/drm_os_freebsd.h index 46fc875d31..dcd23b2e01 100644 --- a/sys/dev/drm/include/drm/drm_os_freebsd.h +++ b/sys/dev/drm/include/drm/drm_os_freebsd.h @@ -53,17 +53,6 @@ #define KTR_DRM KTR_DEV #define KTR_DRM_REG KTR_SPARE3 -#define PCI_VENDOR_ID_APPLE 0x106b -#define PCI_VENDOR_ID_ASUSTEK 0x1043 -#define PCI_VENDOR_ID_ATI 0x1002 -#define PCI_VENDOR_ID_DELL 0x1028 -#define PCI_VENDOR_ID_HP 0x103c -#define PCI_VENDOR_ID_IBM 0x1014 -#define PCI_VENDOR_ID_INTEL 0x8086 -#define PCI_VENDOR_ID_SERVERWORKS 0x1166 -#define PCI_VENDOR_ID_SONY 0x104d -#define PCI_VENDOR_ID_VIA 0x1106 - #define hweight32(i) bitcount32(i) static inline unsigned long diff --git a/sys/dev/drm/include/linux/pci.h b/sys/dev/drm/include/linux/pci.h new file mode 100644 index 0000000000..3bf8568e94 --- /dev/null +++ b/sys/dev/drm/include/linux/pci.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2014 François Tigeot + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef LINUX_PCI_H +#define LINUX_PCI_H + +#define PCI_ANY_ID (~0u) + +#include + +#endif /* LINUX_PCI_H */ diff --git a/sys/dev/drm/include/linux/pci_ids.h b/sys/dev/drm/include/linux/pci_ids.h new file mode 100644 index 0000000000..b8487a4298 --- /dev/null +++ b/sys/dev/drm/include/linux/pci_ids.h @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2014 François Tigeot + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef LINUX_PCI_IDS_H +#define LINUX_PCI_IDS_H + +#define PCI_BASE_CLASS_DISPLAY 0x03 + +#define PCI_VENDOR_ID_ATI 0x1002 + +#define PCI_VENDOR_ID_IBM 0x1014 + +#define PCI_VENDOR_ID_DELL 0x1028 + +#define PCI_VENDOR_ID_HP 0x103c + +#define PCI_VENDOR_ID_ASUSTEK 0x1043 + +#define PCI_VENDOR_ID_SONY 0x104d + +#define PCI_VENDOR_ID_APPLE 0x106b + +#define PCI_VENDOR_ID_NVIDIA 0x10de + +#define PCI_VENDOR_ID_VIA 0x1106 + +#define PCI_VENDOR_ID_SERVERWORKS 0x1166 + +#define PCI_VENDOR_ID_NVIDIA_SGS 0x12d2 + +#define PCI_VENDOR_ID_INTEL 0x8086 + +#endif /* LINUX_PCI_IDS_H */ -- 2.41.0