summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2015-04-12 12:14:31 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2015-04-12 12:14:31 +0000
commitfea85a46faeb0fd471740c4028baeceb3c6d8ecc (patch)
treee35e4da33671f09d51c5dace67f3365f1298819d
parentcbb7a00fe77fd8ac2625d42d7201adcf950f9d58 (diff)
change back to linux style pci vendor/device defines
-rw-r--r--sys/dev/pci/drm/drm_linux.h13
-rw-r--r--sys/dev/pci/drm/radeon/radeon_agp.c88
-rw-r--r--sys/dev/pci/drm/radeon/radeon_bios.c8
3 files changed, 60 insertions, 49 deletions
diff --git a/sys/dev/pci/drm/drm_linux.h b/sys/dev/pci/drm/drm_linux.h
index 825a7250951..66e89bad939 100644
--- a/sys/dev/pci/drm/drm_linux.h
+++ b/sys/dev/pci/drm/drm_linux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: drm_linux.h,v 1.22 2015/04/12 05:31:23 jsg Exp $ */
+/* $OpenBSD: drm_linux.h,v 1.23 2015/04/12 12:14:30 jsg Exp $ */
/*
* Copyright (c) 2013, 2014 Mark Kettenis
*
@@ -473,6 +473,17 @@ struct pci_dev {
};
#define PCI_ANY_ID (uint16_t) (~0U)
+#define PCI_VENDOR_ID_ASUSTEK PCI_VENDOR_ASUSTEK
+#define PCI_VENDOR_ID_ATI PCI_VENDOR_ATI
+#define PCI_VENDOR_ID_DELL PCI_VENDOR_DELL
+#define PCI_VENDOR_ID_HP PCI_VENDOR_HP
+#define PCI_VENDOR_ID_IBM PCI_VENDOR_IBM
+#define PCI_VENDOR_ID_INTEL PCI_VENDOR_INTEL
+#define PCI_VENDOR_ID_SONY PCI_VENDOR_SONY
+#define PCI_VENDOR_ID_VIA PCI_VENDOR_VIATECH
+
+#define PCI_DEVICE_ID_ATI_RADEON_QY PCI_PRODUCT_ATI_RADEON_QY
+
#define memcpy_toio(d, s, n) memcpy(d, s, n)
#define memcpy_fromio(d, s, n) memcpy(d, s, n)
#define memset_io(d, b, n) memset(d, b, n)
diff --git a/sys/dev/pci/drm/radeon/radeon_agp.c b/sys/dev/pci/drm/radeon/radeon_agp.c
index 86c737f2780..946675f9cdb 100644
--- a/sys/dev/pci/drm/radeon/radeon_agp.c
+++ b/sys/dev/pci/drm/radeon/radeon_agp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: radeon_agp.c,v 1.4 2015/04/06 06:12:25 jsg Exp $ */
+/* $OpenBSD: radeon_agp.c,v 1.5 2015/04/12 12:14:30 jsg Exp $ */
/*
* Copyright 2008 Red Hat Inc.
* Copyright 2009 Jerome Glisse.
@@ -43,84 +43,84 @@ struct radeon_agpmode_quirk {
static struct radeon_agpmode_quirk radeon_agpmode_quirk_list[] = {
/* Intel E7505 Memory Controller Hub / RV350 AR [Radeon 9600XT] Needs AGPMode 4 (deb #515326) */
- { PCI_VENDOR_INTEL, 0x2550, PCI_VENDOR_ATI, 0x4152, 0x1458, 0x4038, 4},
+ { PCI_VENDOR_ID_INTEL, 0x2550, PCI_VENDOR_ID_ATI, 0x4152, 0x1458, 0x4038, 4},
/* Intel 82865G/PE/P DRAM Controller/Host-Hub / Mobility 9800 Needs AGPMode 4 (deb #462590) */
- { PCI_VENDOR_INTEL, 0x2570, PCI_VENDOR_ATI, 0x4a4e, PCI_VENDOR_DELL, 0x5106, 4},
+ { PCI_VENDOR_ID_INTEL, 0x2570, PCI_VENDOR_ID_ATI, 0x4a4e, PCI_VENDOR_ID_DELL, 0x5106, 4},
/* Intel 82865G/PE/P DRAM Controller/Host-Hub / RV280 [Radeon 9200 SE] Needs AGPMode 4 (lp #300304) */
- { PCI_VENDOR_INTEL, 0x2570, PCI_VENDOR_ATI, 0x5964,
+ { PCI_VENDOR_ID_INTEL, 0x2570, PCI_VENDOR_ID_ATI, 0x5964,
0x148c, 0x2073, 4},
/* Intel 82855PM Processor to I/O Controller / Mobility M6 LY Needs AGPMode 1 (deb #467235) */
- { PCI_VENDOR_INTEL, 0x3340, PCI_VENDOR_ATI, 0x4c59,
- PCI_VENDOR_IBM, 0x052f, 1},
+ { PCI_VENDOR_ID_INTEL, 0x3340, PCI_VENDOR_ID_ATI, 0x4c59,
+ PCI_VENDOR_ID_IBM, 0x052f, 1},
/* Intel 82855PM host bridge / Mobility 9600 M10 RV350 Needs AGPMode 1 (lp #195051) */
- { PCI_VENDOR_INTEL, 0x3340, PCI_VENDOR_ATI, 0x4e50,
- PCI_VENDOR_IBM, 0x0550, 1},
+ { PCI_VENDOR_ID_INTEL, 0x3340, PCI_VENDOR_ID_ATI, 0x4e50,
+ PCI_VENDOR_ID_IBM, 0x0550, 1},
/* Intel 82855PM host bridge / Mobility M7 needs AGPMode 1 */
- { PCI_VENDOR_INTEL, 0x3340, PCI_VENDOR_ATI, 0x4c57,
- PCI_VENDOR_IBM, 0x0530, 1},
+ { PCI_VENDOR_ID_INTEL, 0x3340, PCI_VENDOR_ID_ATI, 0x4c57,
+ PCI_VENDOR_ID_IBM, 0x0530, 1},
/* Intel 82855PM host bridge / FireGL Mobility T2 RV350 Needs AGPMode 2 (fdo #20647) */
- { PCI_VENDOR_INTEL, 0x3340, PCI_VENDOR_ATI, 0x4e54,
- PCI_VENDOR_IBM, 0x054f, 2},
+ { PCI_VENDOR_ID_INTEL, 0x3340, PCI_VENDOR_ID_ATI, 0x4e54,
+ PCI_VENDOR_ID_IBM, 0x054f, 2},
/* Intel 82855PM host bridge / Mobility M9+ / VaioPCG-V505DX Needs AGPMode 2 (fdo #17928) */
- { PCI_VENDOR_INTEL, 0x3340, PCI_VENDOR_ATI, 0x5c61,
- PCI_VENDOR_SONY, 0x816b, 2},
+ { PCI_VENDOR_ID_INTEL, 0x3340, PCI_VENDOR_ID_ATI, 0x5c61,
+ PCI_VENDOR_ID_SONY, 0x816b, 2},
/* Intel 82855PM Processor to I/O Controller / Mobility M9+ Needs AGPMode 8 (phoronix forum) */
- { PCI_VENDOR_INTEL, 0x3340, PCI_VENDOR_ATI, 0x5c61,
- PCI_VENDOR_SONY, 0x8195, 8},
+ { PCI_VENDOR_ID_INTEL, 0x3340, PCI_VENDOR_ID_ATI, 0x5c61,
+ PCI_VENDOR_ID_SONY, 0x8195, 8},
/* Intel 82830 830 Chipset Host Bridge / Mobility M6 LY Needs AGPMode 2 (fdo #17360)*/
- { PCI_VENDOR_INTEL, 0x3575, PCI_VENDOR_ATI, 0x4c59,
- PCI_VENDOR_DELL, 0x00e3, 2},
+ { PCI_VENDOR_ID_INTEL, 0x3575, PCI_VENDOR_ID_ATI, 0x4c59,
+ PCI_VENDOR_ID_DELL, 0x00e3, 2},
/* Intel 82852/82855 host bridge / Mobility FireGL 9000 RV250 Needs AGPMode 1 (lp #296617) */
- { PCI_VENDOR_INTEL, 0x3580, PCI_VENDOR_ATI, 0x4c66,
- PCI_VENDOR_DELL, 0x0149, 1},
+ { PCI_VENDOR_ID_INTEL, 0x3580, PCI_VENDOR_ID_ATI, 0x4c66,
+ PCI_VENDOR_ID_DELL, 0x0149, 1},
/* Intel 82855PM host bridge / Mobility FireGL 9000 RV250 Needs AGPMode 1 for suspend/resume */
- { PCI_VENDOR_INTEL, 0x3340, PCI_VENDOR_ATI, 0x4c66,
- PCI_VENDOR_IBM, 0x0531, 1},
+ { PCI_VENDOR_ID_INTEL, 0x3340, PCI_VENDOR_ID_ATI, 0x4c66,
+ PCI_VENDOR_ID_IBM, 0x0531, 1},
/* Intel 82852/82855 host bridge / Mobility 9600 M10 RV350 Needs AGPMode 1 (deb #467460) */
- { PCI_VENDOR_INTEL, 0x3580, PCI_VENDOR_ATI, 0x4e50,
+ { PCI_VENDOR_ID_INTEL, 0x3580, PCI_VENDOR_ID_ATI, 0x4e50,
0x1025, 0x0061, 1},
/* Intel 82852/82855 host bridge / Mobility 9600 M10 RV350 Needs AGPMode 1 (lp #203007) */
- { PCI_VENDOR_INTEL, 0x3580, PCI_VENDOR_ATI, 0x4e50,
+ { PCI_VENDOR_ID_INTEL, 0x3580, PCI_VENDOR_ID_ATI, 0x4e50,
0x1025, 0x0064, 1},
/* Intel 82852/82855 host bridge / Mobility 9600 M10 RV350 Needs AGPMode 1 (lp #141551) */
- { PCI_VENDOR_INTEL, 0x3580, PCI_VENDOR_ATI, 0x4e50,
- PCI_VENDOR_ASUSTEK, 0x1942, 1},
+ { PCI_VENDOR_ID_INTEL, 0x3580, PCI_VENDOR_ID_ATI, 0x4e50,
+ PCI_VENDOR_ID_ASUSTEK, 0x1942, 1},
/* Intel 82852/82855 host bridge / Mobility 9600/9700 Needs AGPMode 1 (deb #510208) */
- { PCI_VENDOR_INTEL, 0x3580, PCI_VENDOR_ATI, 0x4e50,
+ { PCI_VENDOR_ID_INTEL, 0x3580, PCI_VENDOR_ID_ATI, 0x4e50,
0x10cf, 0x127f, 1},
/* ASRock K7VT4A+ AGP 8x / ATI Radeon 9250 AGP Needs AGPMode 4 (lp #133192) */
- { 0x1849, 0x3189, PCI_VENDOR_ATI, 0x5960,
+ { 0x1849, 0x3189, PCI_VENDOR_ID_ATI, 0x5960,
0x1787, 0x5960, 4},
/* VIA K8M800 Host Bridge / RV280 [Radeon 9200 PRO] Needs AGPMode 4 (fdo #12544) */
- { PCI_VENDOR_VIATECH, 0x0204, PCI_VENDOR_ATI, 0x5960,
+ { PCI_VENDOR_ID_VIA, 0x0204, PCI_VENDOR_ID_ATI, 0x5960,
0x17af, 0x2020, 4},
/* VIA KT880 Host Bridge / RV350 [Radeon 9550] Needs AGPMode 4 (fdo #19981) */
- { PCI_VENDOR_VIATECH, 0x0269, PCI_VENDOR_ATI, 0x4153,
- PCI_VENDOR_ASUSTEK, 0x003c, 4},
+ { PCI_VENDOR_ID_VIA, 0x0269, PCI_VENDOR_ID_ATI, 0x4153,
+ PCI_VENDOR_ID_ASUSTEK, 0x003c, 4},
/* VIA VT8363 Host Bridge / R200 QL [Radeon 8500] Needs AGPMode 2 (lp #141551) */
- { PCI_VENDOR_VIATECH, 0x0305, PCI_VENDOR_ATI, 0x514c,
- PCI_VENDOR_ATI, 0x013a, 2},
+ { PCI_VENDOR_ID_VIA, 0x0305, PCI_VENDOR_ID_ATI, 0x514c,
+ PCI_VENDOR_ID_ATI, 0x013a, 2},
/* VIA VT82C693A Host Bridge / RV280 [Radeon 9200 PRO] Needs AGPMode 2 (deb #515512) */
- { PCI_VENDOR_VIATECH, 0x0691, PCI_VENDOR_ATI, 0x5960,
- PCI_VENDOR_ASUSTEK, 0x004c, 2},
+ { PCI_VENDOR_ID_VIA, 0x0691, PCI_VENDOR_ID_ATI, 0x5960,
+ PCI_VENDOR_ID_ASUSTEK, 0x004c, 2},
/* VIA VT82C693A Host Bridge / RV280 [Radeon 9200 PRO] Needs AGPMode 2 */
- { PCI_VENDOR_VIATECH, 0x0691, PCI_VENDOR_ATI, 0x5960,
- PCI_VENDOR_ASUSTEK, 0x0054, 2},
+ { PCI_VENDOR_ID_VIA, 0x0691, PCI_VENDOR_ID_ATI, 0x5960,
+ PCI_VENDOR_ID_ASUSTEK, 0x0054, 2},
/* VIA VT8377 Host Bridge / R200 QM [Radeon 9100] Needs AGPMode 4 (deb #461144) */
- { PCI_VENDOR_VIATECH, 0x3189, PCI_VENDOR_ATI, 0x514d,
+ { PCI_VENDOR_ID_VIA, 0x3189, PCI_VENDOR_ID_ATI, 0x514d,
0x174b, 0x7149, 4},
/* VIA VT8377 Host Bridge / RV280 [Radeon 9200 PRO] Needs AGPMode 4 (lp #312693) */
- { PCI_VENDOR_VIATECH, 0x3189, PCI_VENDOR_ATI, 0x5960,
+ { PCI_VENDOR_ID_VIA, 0x3189, PCI_VENDOR_ID_ATI, 0x5960,
0x1462, 0x0380, 4},
/* VIA VT8377 Host Bridge / RV280 Needs AGPMode 4 (ati ML) */
- { PCI_VENDOR_VIATECH, 0x3189, PCI_VENDOR_ATI, 0x5964,
+ { PCI_VENDOR_ID_VIA, 0x3189, PCI_VENDOR_ID_ATI, 0x5964,
0x148c, 0x2073, 4},
/* ATI Host Bridge / RV280 [M9+] Needs AGPMode 1 (phoronix forum) */
- { PCI_VENDOR_ATI, 0xcbb2, PCI_VENDOR_ATI, 0x5c61,
- PCI_VENDOR_SONY, 0x8175, 1},
+ { PCI_VENDOR_ID_ATI, 0xcbb2, PCI_VENDOR_ID_ATI, 0x5c61,
+ PCI_VENDOR_ID_SONY, 0x8175, 1},
/* HP Host Bridge / R300 [FireGL X1] Needs AGPMode 2 (fdo #7770) */
- { PCI_VENDOR_HP, 0x122e, PCI_VENDOR_ATI, 0x4e47,
- PCI_VENDOR_ATI, 0x0152, 2},
+ { PCI_VENDOR_ID_HP, 0x122e, PCI_VENDOR_ID_ATI, 0x4e47,
+ PCI_VENDOR_ID_ATI, 0x0152, 2},
{ 0, 0, 0, 0, 0, 0, 0 },
};
#endif
diff --git a/sys/dev/pci/drm/radeon/radeon_bios.c b/sys/dev/pci/drm/radeon/radeon_bios.c
index a7b988bd600..ff98adee436 100644
--- a/sys/dev/pci/drm/radeon/radeon_bios.c
+++ b/sys/dev/pci/drm/radeon/radeon_bios.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: radeon_bios.c,v 1.5 2015/04/08 04:03:06 jsg Exp $ */
+/* $OpenBSD: radeon_bios.c,v 1.6 2015/04/12 12:14:30 jsg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -554,7 +554,7 @@ static bool legacy_read_disabled_bios(struct radeon_device *rdev)
crtc_ext_cntl = RREG32(RADEON_CRTC_EXT_CNTL);
fp2_gen_cntl = 0;
- if (rdev->ddev->pci_device == PCI_PRODUCT_ATI_RADEON_QY) {
+ if (rdev->ddev->pci_device == PCI_DEVICE_ID_ATI_RADEON_QY) {
fp2_gen_cntl = RREG32(RADEON_FP2_GEN_CNTL);
}
@@ -591,7 +591,7 @@ static bool legacy_read_disabled_bios(struct radeon_device *rdev)
(RADEON_CRTC_SYNC_TRISTAT |
RADEON_CRTC_DISPLAY_DIS)));
- if (rdev->ddev->pci_device == PCI_PRODUCT_ATI_RADEON_QY) {
+ if (rdev->ddev->pci_device == PCI_DEVICE_ID_ATI_RADEON_QY) {
WREG32(RADEON_FP2_GEN_CNTL, (fp2_gen_cntl & ~RADEON_FP2_ON));
}
@@ -609,7 +609,7 @@ static bool legacy_read_disabled_bios(struct radeon_device *rdev)
WREG32(RADEON_CRTC2_GEN_CNTL, crtc2_gen_cntl);
}
WREG32(RADEON_CRTC_EXT_CNTL, crtc_ext_cntl);
- if (rdev->ddev->pci_device == PCI_PRODUCT_ATI_RADEON_QY) {
+ if (rdev->ddev->pci_device == PCI_DEVICE_ID_ATI_RADEON_QY) {
WREG32(RADEON_FP2_GEN_CNTL, fp2_gen_cntl);
}
return r;