summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_drv.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index 73598892..a09fa96e 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -321,6 +321,11 @@ int drm_init(struct drm_driver *driver,
while ((pdev =
pci_get_subsys(pid->vendor, pid->device, pid->subvendor,
pid->subdevice, pdev))) {
+ /* Are there device class requirements? */
+ if ((pid->class != 0)
+ && ((pdev->class & pid->class_mask) != pid->class)) {
+ continue;
+ }
/* is there already a driver loaded, or (short circuit saves work) */
/* does something like VesaFB have control of the memory region? */
if (pci_dev_driver(pdev)
@@ -347,6 +352,11 @@ int drm_init(struct drm_driver *driver,
pci_get_subsys(pid->vendor, pid->device,
pid->subvendor, pid->subdevice,
pdev))) {
+ /* Are there device class requirements? */
+ if ((pid->class != 0)
+ && ((pdev->class & pid->class_mask) != pid->class)) {
+ continue;
+ }
/* stealth mode requires a manual probe */
pci_dev_get(pdev);
if ((rc = drm_get_dev(pdev, &pciidlist[i], driver))) {