diff options
author | rnoland <rnoland@FreeBSD.org> | 2009-03-17 03:53:44 +0000 |
---|---|---|
committer | rnoland <rnoland@FreeBSD.org> | 2009-03-17 03:53:44 +0000 |
commit | 6c3703e6cd1897a3a8f3a430408b93b5e4ffdd29 (patch) | |
tree | 10df7fb15e87cda441e462aa0b91eb6878557e31 /sys/dev/drm | |
parent | 224f04f590ec44f9783e92ad0b2a564eba6f422c (diff) | |
download | FreeBSD-src-6c3703e6cd1897a3a8f3a430408b93b5e4ffdd29.zip FreeBSD-src-6c3703e6cd1897a3a8f3a430408b93b5e4ffdd29.tar.gz |
Add support for matching solely on vendor id.
We will use this method with nouveau
MFC after: 3 days
Diffstat (limited to 'sys/dev/drm')
-rw-r--r-- | sys/dev/drm/drm_drv.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/drm/drm_drv.c b/sys/dev/drm/drm_drv.c index 207fb54..1612120 100644 --- a/sys/dev/drm/drm_drv.c +++ b/sys/dev/drm/drm_drv.c @@ -182,7 +182,10 @@ int drm_probe(device_t kdev, drm_pci_id_list_t *idlist) id_entry = drm_find_description(vendor, device, idlist); if (id_entry != NULL) { - device_set_desc(kdev, id_entry->name); + if (!device_get_desc(kdev)) { + DRM_DEBUG("desc : %s\n", device_get_desc(kdev)); + device_set_desc(kdev, id_entry->name); + } return 0; } @@ -290,7 +293,8 @@ drm_pci_id_list_t *drm_find_description(int vendor, int device, for (i = 0; idlist[i].vendor != 0; i++) { if ((idlist[i].vendor == vendor) && - (idlist[i].device == device)) { + ((idlist[i].device == device) || + (idlist[i].device == 0))) { return &idlist[i]; } } |